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:

Discover more from Simple Circuit

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

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

Scroll to Top