
Originally Posted by
HenrikOlsson
Hi,
What version of PBP do you have? As of v2.50 32bit variables are available in PBP...
And you can access the individual BYTES in a LONG with
myLong.BYTE0,
myLong.BYTE1 and so on.
/Henrik.
Looks like a good solution. I tried it but it give an incorrect result on the third highest byte.
here a portion of the code.
Code:
rd_addr2 var long
rd_addr2 = $01FE
Readout_Strings:
gosub BusyWait
Low CSEE
Shiftout SDO,SCK,Msbfirst,[$E8]
Shiftout SDO,SCK,Msbfirst,[rd_addr2.byte2]
Shiftout SDO,SCK,Msbfirst,[rd_addr2.byte1]
Shiftout SDO,SCK,Msbfirst,[rd_addr2.byte0]
Shiftout SDO,SCK,Msbfirst,[$00]
Shiftout SDO,SCK,Msbfirst,[$00]
Shiftout SDO,SCK,Msbfirst,[$00]
Shiftout SDO,SCK,Msbfirst,[$00]
return
rd_addr2.byte2 = 16 or binary 10000 which is wrong it should be 0. Nothing else changes the value of rd_addr2 it's value is defined at the start of the code and nothing else alters it. Is, there any possible explaination for this that can cause the value to be wrong?
Thanks,
Bryan
Bookmarks