PBP can't use HighByte and Lowbyte because it doesn't know where the variable is when PBP is compiling. The location isn't known until it's Assembled.
Try it like this, which specifies the High and Low bytes as EXT too.
Code:
DSbuffer VAR BYTE[9] BANK0
ASM ;Typcasting Variables inside of Arrays
DSstat = _DSbuffer ; byte
DStemp = _DSbuffer + 1 ; word
DSvolts = _DSbuffer + 3 ; word
DSvoltsL = _DSbuffer + 3 ; byte
DSvoltsH = _DSbuffer + 4 ; byte
DScurrent = _DSbuffer + 5 ; word
DSthres = _DSbuffer + 7 ; byte
DScrc = _DSbuffer + 8 ; byte
ENDASM
DSstat VAR BYTE EXT ; Status/Configuration
DStemp VAR WORD EXT ; Temperature
DSvolts VAR WORD EXT ; Voltage
DSvoltsH VAR BYTE EXT
DSvoltsL VAR BYTE EXT
DScurrent VAR WORD EXT ; Current
DSthres VAR BYTE EXT ; Threshold
DScrc VAR BYTE EXT ; CRC
Serout2 TX_USB, 84,[" DSvolts is ",bin DSvoltsH,bin DSvoltsL,13,10]
Bookmarks