PIC16F877A read inputs example using CCS C compiler

PIC16F877A buttons read

This is PIC16F877A read inputs example. LEDs are going to be controlled using push buttons as shown in the circuit schematic below.

PIC16F877A read inputs example circuit:
Example circuit schematic is shown below.
PIC16F877A read inputs and buttons circuit
As shown in the circuit schematic there are two push buttons and two LEDs. Each button controls one LED, the first button which is connected to RD0 toggles ON and OFF the LED connected to RB0 and the second button toggles ON and OFF the other LED.

PIC16F877A read inputs example C code:
Example C code is the one below, it was tested with CCS C compiler version 5.051.

Leave a Reply

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