Not what i find . it may vary by pic18/16 and/or pbp versionUnfortunately, it never checks the return value so it continues on with the rest of the bytes in the I2CWRITE statement (here you have four of them).
i my test the transaction terminates at the first nak and is followed by a "funny start" dud transaction , the data in the sq brackets is never sent
pic18f45k80
editCode:'OSCTUNE.6 = 1 ; Enable 4x PLL OSCCON = 110000 TRISD=000110 'set PORTD define OSC 16 DEFINE I2C_SLOW 1 ADR VAR BYTE ADR2 VAR BYTE CMD VAR BYTE ADR=$48 ADR2=$70 SDA VAR PORTD.3 SCL VAR PORTD.2 CMD= $48 FEDO: I2CWRITE SDA,SCL,ADR,[5] I2CWRITE SDA,SCL,ADR2,CMD,[3,4] PAUSE 250 I2CWRITE SDA,SCL,ADR,[0] I2CWRITE SDA,SCL,ADR2,$48,[2,7] PAUSE 250 GOTO FEDO
might be a proteus artifact also, i have not scoped it




Bookmarks