Old Stuff

Julian on January 1st, 2006

This program uses the PIC’s internal 16-bit timer (Timer1) to flash the LED. The timer is started by writing 0×31 to the T1CON register. This sets the pre-scaler to 8:1. The most significant bit of the timer (TMR1H bit 7) is rotated into the carry flag and then into bit 0 of TEMP (a user [...]

Continue reading about 12F675 Flashing LED using Timer1

Julian on January 1st, 2006

This program is similar to the LED dimmer except that when one LED is turned on, the other is turned off. As the potentiometer is turned from left to right, the brightness of LED D2 decreases and the brightness of LED D6 increases. Both LEDs are the same brightness when the pot is in its [...]

Continue reading about 12F675 Artificial Horizon

Julian on January 1st, 2006

A 10-bit counter is compared with the value of the A/D from the pot. 4 LEDs are used to display the value, starting with the bottom LED. The brightness increases until it is at full brightness, then the next LED starts to light. By changing ‘btfsc STATUS,C’ to ‘btfsc STATUS,Z’ (at around line 86), the [...]

Continue reading about 12F675 LED bargraph by D. Jansons

Julian on January 1st, 2006

In this program, the brightness of LED D0 is controlled by the position of the potentiometer, fully clockwise being maximum. The program uses the analogue to digital converter to read the potentiometer voltage and convert it to an 8-bit digital value. This value is used to control how early the LED is switched on in [...]

Continue reading about 12F675 LED dimmer

Julian on January 1st, 2006

In this program LED D0 fades repeatedly from off to full brightness and back again. There are three nested loops starting at the ‘fade’ label. In the first loop (the inner loop) TRIG is compared with BRIGHT and the LED is switched on if they’re the same. The higher the value in BRIGHT, the earlier [...]

Continue reading about 12F675 LED heartbeat

Julian on January 1st, 2006

;12F675 Flashing LED using Timer1 list p=12F675 #include “p12f675.inc” __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF TEMP equ 0×20 org 0×00 nop goto init org 0×04 return init banksel 0×80 clrf ANSEL ;make all I/O ports digital movlw 0f movwf TRISIO ;make GP4 and GP5 outputs banksel 0×00 movlw 0×31 movwf T1CON ;start Timer1 running with 8:1 prescale [...]

Continue reading about 12F675 Flashing LED using Timer1 overflow flag

Julian on October 16th, 2004

Microchip’s advanced new family of 8 and 14-pin FLASH PIC microcontrollers now consists of 7 devices. Since the 14-pin PICs have just one less I/O pin than the original 18 pin devices, due to the development of internal clock and reset modules, it’s clear that this package size will become increasingly popular. Microchip are packing [...]

Continue reading about 8 and 14-pin flash PIC family

Julian on June 28th, 2004

The PICkit 1 is Microchip’s new low-cost PIC programmer supporting the latest family of advanced 8 and 14-pin FLASH PIC microcontrollers. It’s the perfect way to get into programming PIC microcontrollers! Simply install the programmer software on your PC, connect the USB cable and start programming. There are lots of tutorial files provided on the [...]

Continue reading about Microchip PICkit 1 FLASH Starter kit

Google+