Why can't I make this assignment?
Guess I've been away from PBP too long. Don't understand why I can't make this assignment:
'======================
DIPSWITCHES:
'======================
I2CREAD SDA1,SCL1,DIPSWITCH,[X] 'READ DIPSWITCH
X=X^%11111111 'INVERT
DEBUG "BIN X.BIT7=",BIN X.BIT7,13,10
RELAYBOARD = BIN X.BIT7
(I've tried declaring RELAYBOARD as a BIT and a BTYE)
Re: Why can't I make this assignment?
BIN is an output modifier for commands like SEROUT2, ARRAYWRITE, DEBUG etc.
It sends out an ASCII string representing a binary value such as 10111011, or in your case a single bit 1 or 0.
It can not be assigned to a variable.
If you just want a bit value equal to X.7, then remove the BIN modifier.
Re: Why can't I make this assignment?