#include<htc.h>
#define led_1 P20
#define led_2 P21
#define led_3 P22
void delay(int a);
void main()
{
led_1=1;
led_2=0;
led_3=0;
delay(5);
led_1=0;
led_2=1;
led_3=0;
delay(5);
led_1=0;
led_2=0;
led_3=1;
delay(5);
/* Insert your code here. */
}
void delay(int a){
int i;
int j;
for(i=0;i<a; ++i){
for(j=0; j<500; ++j){
}
}
}
Schematic Diagram:
where do i get htc.h file
ReplyDelete