In this project we will interface a push button switch with PIC16F877A 8-bit microcontroller. If you are new to PIC microcontroller programming we suggest you to execute the basic led blinking project here before trying this project.
The setup requirement for this project is as given below:
Learn firmware development theory, applications, get practical skills from online tests, projects and earn certificate for software jobs
The required hardware and software for this project is as below:
An electrical switch is any device used to interrupt the flow of electrons in a circuit. Switches are essentially binary devices: they are either completely on (“closed”) or completely off (“open”).
PORT B, PIN 5 is connected to one side of the push button switch. An external resistor is connected to VDD(+5V) on one end and to PORT B, PIN 5 on the other end. The +ve end of the led is connected to the PORTA, PA0 pin and -ve end of the led is connected to the ground through a 1K resistor.