The variable in it, I can’t tell if you mean (dig1 var) +1 or dig1 (var+1).
but I don’t know that is the problem, or which way PBP would read it.
You might as well log a write error it doesn’t hurt even if you don’t use it,
and if it was an EEPROM value you’d want to display there was an error.
What is the zero for? .. the last data in the command?
Code:
' start of code where other variables are defined
'
buff var byte
badwrite var bit
badwrite = 0
‘where your write command is
'
buff = Pid_channel + 1
I2CWRITE SDApin,SDLpin,0,$42,[$54,$50,DEC1 buff,0],error
doneread:
' somewhere at the bottom of program
'
error:
badwrite = 1
goto doneread
Bookmarks