LED Blink with PIC16F887 microcontroller – CCS C

This simple post shows how to blink an LED using PIC16F887 microcontroller and CCS C compiler.
The LED here is connected to pin RA0 as shown in the circuit schematic below and easily that LED can be connected to other output pin or other LEDs can be added to the circuit which require code modification.
I this example there is no need for oscillator and MCLR circuits because the internal oscillator of the microcontroller is used at 8MHz and MCLR pin function is disabled (MCLR pin is configured as I/O pin).

Circuit diagram:

PIC16F887 LED blink circuit

C Code:

CCS C and Proteus simulation files can be downloaded from the following link:
Download

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.