Learning PIC Coding using C Language
Firstly, I start with LED. You can connect LED to PIC by 2 ways.
![[IMG]](proxy.php?image=http%3A%2F%2Fimg81.imageshack.us%2Fimg81%2F472%2Fledschematic.jpg&hash=652b9da11526c1b30336755412759840)
You can program like
RB0=1; //Turn ON LED RB0=0; //Turn OFF LEDor
PORTB=0b00000001; //Turn ON LED PORTB=0b00000000; //Turn OFF LEDTo do LED Blinking
for( ; ; ){ //loop forever PORTB=0b00000001; //Turn ON LED for(i=0;i<=100;i++) __delay_ms(10); PORTB=0b00000000; //Turn OFF LED for(i=0;i<=100;i++) __delay_ms(10);}