Question

what does this code do?

int main (void)
{
//Configuration
PORTB = 0x00;
LATB = 0x00;
TRISBbits.TRISB0 = 0;
TRISBbits.TRISB7 = 1;
while(1)
{//infinite loop
if(PORTBbits.RB7 == 0)//if switch is closed
PORTBbits.RB0 = 1; //Led is ON
else
PORTBbits.RB0 = 0; //Led is OFF
}
return -1;
}

Answers

There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions