Re: Index a bit through a portion of a port
This has been fun, I found a who;e new set of threads!
According to this http://www.picbasic.co.uk/forum/show...t=4074&p=22065 what I have below should work, but no LEDs come on...... Any help??
start1:
if packetRcvd=1 then 'Packet has arrived!
pkt_cntr = pkt_cntr+1 'Increase the counter so we can turn on new LED
lookup pkt_cntr, [6, 5, 4, 3],j 'Lookup (better) for the offsets from A.0
toggle PORTA.0[j] 'Should toggle the required port
endif
if pkt_cntr=4 then pkt_cntr=0 'We have run through all 4 LEDs so reset counter
PacketRcvd=0 'Done processing packet data so reset flag
goto start1
"If we knew what we were doing, it wouldn't be called research"
- Albert Einstein
Bookmarks