Led ( Light emitting diode) : Light Emitting Diodes are the mostly commonly used components in many applications. They are made of semiconducting material. This article describes about basic interfacing of LEDs to the 8051 family microcontrollers.
Interfacing of led with PIC:
Program:
#include<pic.h>
#include<htc.h>
#define __PIC16f877A_H
__CONFIG (WDTE_OFF&FOSC_HS&PWRTE_ON&LVP_OFF);
void delay(unsigned int i)
{
while(i--);
}
void main()
{
while(1)
{
TRISB=0x00;
PORTB=0xFF;
delay(5000);
PORTB=0x00;
delay(5000);
}
}
0 comments:
Post a Comment
if you have any doubt please let me know