Led blinking program with pic16f887 and mikroC PRO for PIC
Description
The following program flashes 8 LEDs on the PORTC pins of the pic16f887.Source Code
void main() {PORTC=0; //initialize portc
TRISC=0b00000000; //configure portc as output
ANSELH=0; //configure an pin as digital I/O
ANSEL=0;
while(1){
PORTC=~PORTC; //toggle portc
delay_ms(10000); //1s delay
}
}
No comments:
Post a Comment