Professional Documents
Culture Documents
Increment Ing LED On B Code
Increment Ing LED On B Code
while (1) {
/* send the LED bit pattern to PORT B LEDS */
PORTB = value;
/*delay*/
delay();
/*increase the value of the increment by one */
value= value + 1;
/*check if the value is less than 255 (hex ff)*/
if(value == 0xff)
/*reset the variable if value is at max limit*/
{value = 0;}
}
}