Tag: TMR0

The LED flashes approximately 150ms every 5 seconds. RC1 (pin 9), triggers the LED. Interestingly, the PIC consumes 28uA at idle, no matter which method is used. Compiles with Microchip’s XC8 (v1.38) Delay function, 28 bytes Timer 0 delay, 31 …

PIC16F684 Flashing an LED with delay_ms, TMR0, Interrupt, & WDT Read More »

Tagged with: , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Below is a 16-bit Timer0 example for the PIC18F2550 using the XC8 1.38 compiler. I’ve included two examples: INITCONbits and straight up INTCON. Why? Well, In one project, the XC8 compiler bitched with: C:\Program Files (x86)\Microchip\xc8\v1.38\include\pic18f2550.h:8051: error: (1098) conflicting declarations …

Microchip MPLABX XC8 PIC18F2550 Timer0 example Read More »

Tagged with: , , , , , , , , ,