formatting HEX variables
gtslabs
Posts: 40
I am using the SERIN to get GAIN as a value from 0-4
Int_Zero_Scale_Cal VAR Word
Gain·············· VAR nib
'Using Gain from 0 to 3 I am looking for the value to set Int_Zero_Scale_Cal to.
LOOKUP Gain, [noparse][[/noparse]$8180,$8190,$81A0,$81B0],Int_zero_Scale_Cal·
'I have been using the value directly as below.
SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$02, $8190\16]
'But I need to use the following but having trouble with the formatting
SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$02, Int_Zero_Scale_Cal\16]
'How do I make that variable look like the $8190 so I can use the Shiftout?
Thanks
Steve
Int_Zero_Scale_Cal VAR Word
Gain·············· VAR nib
'Using Gain from 0 to 3 I am looking for the value to set Int_Zero_Scale_Cal to.
LOOKUP Gain, [noparse][[/noparse]$8180,$8190,$81A0,$81B0],Int_zero_Scale_Cal·
'I have been using the value directly as below.
SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$02, $8190\16]
'But I need to use the following but having trouble with the formatting
SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$02, Int_Zero_Scale_Cal\16]
'How do I make that variable look like the $8190 so I can use the Shiftout?
Thanks
Steve