Can some one tell me why this code works
And this code works as well ...Code:OSCCON = %01100010
ADCON1 = %01111111
TRISB = 0
loop:
Pause 500 ' Wait .5 second
PORTB.3 = 1
Pause 500 ' Wait .5 second
PORTB.3 = 0
Goto loop
END
But this code does not...Code:OSCCON = %01100010
ADCON1 = %01111111
TRISB = 0
loop:
Pause 500 ' Wait .5 second
PORTB = %11111111
Pause 500 ' Wait .5 second
PORTB = %00000000
Goto loop
END
I tried searching for the answer and I could not find anything. Maybe I don't know how to search properly.Code:OSCCON = %01100010
ADCON1 = %01111111
TRISB = 0
loop:
Pause 500 ' Wait .5 second
PORTB = 1
Pause 500 ' Wait .5 second
PORTB = 0
Goto loop
END
Thanks in advance,
Matt
p.s. I'm using a pic18f1320 and programming it using the PICKIT 2
p.s.s. Sorry if this post is in the wrong forum