Monday, November 13, 2017

LED Blinking - 1

Name: LED Blinking
Microcontroller: PIC16F877A
Description: This is very simple hello world poject.  all the pins of Port-C will be on/off with one second interval.



Codes:
void main()
{
portc=0; //set port - C all pin zero
trisc=0; //defined the port - C as output.
while(1) // infinite loop
        {
        portc=~portc;  // inerting command
        delay_ms(1000); // delay of 1000 mili seconds.
        }
}





No comments:

Post a Comment