Sorry to poke my nose in, but I would not like inaccurate information about BASIC to go into the record.
pygmy_giant is correct: %1 (binary) is identical to 1 and DIM Data% 3 reserves 4 bytes.
I think Grump Mike has spotted one reason there might be a problem in that you are using a R/W bit of 1 in a write instruction and I, too, think it ought to be 0.
In general, I think it would be advisable to use SWI "OS_IICOp" rather than "IIC_Control" on the basis that it is more likely to be up-to-date.
Purely speculatively, and a bit of a stab in the dark, based on what I have done with another IIC device, you could try this:
Code: Select all
DIM send% 23, data% 15
REM write transfer block
send%!00=90 :REM write address
send%!08=3 :REM write 3 bytes
REM read transfer block
send%!12=91 :REM read address
send%!20=0 :REM no write bytes
REM data block
data%?0=&FE :REM command byte
data%?1=&03 :REM set lcd brightness
data%?2=&00 :REM off
SYS"OS_IICOp",send%,1 :REM send 1 transfer block to write only
If the command is to read data then send both, 2, transfer blocks. Good luck.