lockman_akim
Advanced Member level 1
in BASIC if i do
if portb.0 = 0 then
portd.0 = 1
else
portd.0 = 0
end if
so when push switch, led is on
but when try using c,
push switch = off led
im just 2 hours ago learning c..:-D
if portb.0 = 0 then
portd.0 = 1
else
portd.0 = 0
end if
so when push switch, led is on
but when try using c,
push switch = off led
im just 2 hours ago learning c..:-D
Code:
void main() {
TRISB = 0xFF;
TRISD = 0x00;
PORTD = 0x00;
do{
if (PORTB.F0 = 0)
PORTD.F0 = 1;
else
{PORTD.F0 = 0;}
}while (1);
}