GreenLeader
Senior Member
I suspect there may be a bug in v5.2.0 compared to v5.1.7. The simulator seems to be ignoring the slave address for hi2c commands.
My code seems to work on 5.1.7 but I get a message "The simulated RTC does not use word mode i2cword" when I run in 5.2.0.
I have the checkboxes for simulated 24LC256 and DS1307 selected and I am using a 40X1.
I set up the RTC and 24LC256 like this:
The attempt to read the clock with hi2cin fails.
However, if I comment out the 2nd hi2csetup command (ie for the EEPROM) then the code runs....
My code seems to work on 5.1.7 but I get a message "The simulated RTC does not use word mode i2cword" when I run in 5.2.0.
I have the checkboxes for simulated 24LC256 and DS1307 selected and I am using a 40X1.
I set up the RTC and 24LC256 like this:
Code:
#PICAXE 40X1
' Setup i2c for RTC and 24LC256 EEPROMS
hi2csetup i2cmaster,%11010000,i2cslow,i2cbyte 'DS1307 RTC
hi2csetup i2cmaster,%10100000,i2cfast,i2cword 'EEPROM addr 0
hi2cin [%11010000],0,(b8,b9,b10,b11,b12,b13,b14,b15)
However, if I comment out the 2nd hi2csetup command (ie for the EEPROM) then the code runs....