Hello Moz,
I made just a few corrections in that psuedo code...
TRISA="11111111" 'set Porta to all input...8 bit
TRISB="00000000" 'set Portb to all output...8 bit.
ReadData var byte
HoldData var byte
TranslateData var byte
Counter var byte
MainLoop:
ReadData=Porta
If ReadData!=HoldData then Gosub TableLookup
HoldData=ReadData
Goto MainLoop
TableLookup:
Counter=0
Loop2:
Read Counter,Holddata 'read table
if Holdata=$FF then Goto Baddata 'bad data
If Holddata=ReadData then goto TransmitPortb 'MATCH!!!
Counter=Counter+2 'Must skip every other byte for table!
Goto Loop2
TransmitPortb:
Read Counter+1, HoldData 'reads Translated value
Portb=Holddata 'outputs to portb
Baddata:
Return
End
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks