Thursday, 12 June 2014

BLINK LED IN MIKROC COMPILER


 



 unsigned int i;   // creating a variable i

void main(){
                  PORTA=PORTB=PORTC=TRISA=TRISB=TRISC =0x00; // making ports output
               
               while(1)    //endless loop
    {
              PORTB.B0 =1 ;    //  on portb bit 0
              DELAY_MS(1000);      //   delay 1s
              PORTB.B0  = 0;      //  of portb bit 0
              DELAY_MS(1000);  // delay 1s
  }
                }
         

No comments:

Post a Comment