fbpx

Interface Led With PIC

Description

Led have two pins, Anode(+) and Cathode(-), Anode connected with PIC P1.0 pin and Cathode is connected with 5v in Series with 220 ohms resistor.

Hardware Required

  • Led.
  • Pic16f877a MicroController.

Circuit

Virtual Circuit

Code

 void main()
 {
 TRISA.F0=0;
 while(1)
 {
 PORTA.F0=1;
 Delay_ms(100);
 PORTA.F0=0;
 Delay_ms(100);
 }
 } 

Leave a Reply

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