Hi Muddy,
First make a short loop blinking the LED's on PORTB to make sure they work and that the port is set up correct. (Which they seem to be since it reflects changes on reset).
Then try to read PortD to a variable first and then write that variable to PortD.Code:For i = 1 to 5 PortB = %00001111 Pause 200 PortB = %00000000 Next
How about that, does that work?Code:Switch VAR Byte Loop: Switch = PortD 'Read PortD, store in Switch PortB = Switch 'Write switch to PortB Pause 10 'Wait 10mS Goto Loop 'Do it again.
/Henrik Olsson. (At work, no board to test with here.)




Bookmarks