OK, this is for the PIC18F2550. It should work for most, if not all of the PIC18’s, with a few minor changes – Like the TRIS outputs. It will not work with the PIC16’s. It will not work with the …

Pulse Width Modulation on a PIC18F2550 – PWM1 & PWM2, XC8 Read more »

This example demonstrates a high priority interrupt on the PIC18F2550 and MPLABX 3.40 IDE with the XC 1.38 compiler. Make sure YOU remove the spaces WordPress throws in, if not your compiler will whine. Sorry, I can’t assist if you …

High Priority Timer on a PIC18F2550, XC8 Read more »

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 »