void main () {
trisd = 0;
PORTD = 0;
while (1) {
portd.f1 = 1;
Delay_ms (3000); //Give large delay, you can not detect 300msec with eyes give at-least 1 second delay
portd.f1 = 0;
Delay_ms (3000);
}
}
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 void main() { OSCCON = 0xF2; OSCTUNE = 0x00; trisb=0; portb=0; while(1){ portb.f1=1; Delay_ms(3000); portb.f1=0; Delay_ms(3000); } }
//Led Connected at RB1 pin of Controller
sbit LED at RB1_bit;
void main()
{
OSCCON = 0xF2;
TRISB = 0x00;
PORTB = 0x00;
while(1)
{
LED = 1;
Delay_ms(1000);
LED = 0;
Delay_ms(1000);
}
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?