Hi,
I'm using an 18M2 to drive both an LCD and an I2C EEPROM using some common pins.
Is there a way to turn off I2C functionality and restore normal I/O on the pins so I can control the LCD before and after an I2C action.
1) writing to the I2C bus seems to be Ok as I can afterwards still control the LCD
2) have tried using dirsB to reset pin directions
3) reading from the I2C bus seems to upset things (after restoring directions info goes to the LCD, but its garbled)
4) "HI2CSETUP OFF" seems to reset the picaxe and code after this command doesn't execute
5) only success I have is using an EEPROM location as flag and RESET restart my program after I2C activity to branch to the LCD code. This indicates the problem is inside the PicAxe therefore software correctable
Hoping for a better solution the 5)
Cheers,
Nick
I'm using an 18M2 to drive both an LCD and an I2C EEPROM using some common pins.
Is there a way to turn off I2C functionality and restore normal I/O on the pins so I can control the LCD before and after an I2C action.
1) writing to the I2C bus seems to be Ok as I can afterwards still control the LCD
2) have tried using dirsB to reset pin directions
3) reading from the I2C bus seems to upset things (after restoring directions info goes to the LCD, but its garbled)
4) "HI2CSETUP OFF" seems to reset the picaxe and code after this command doesn't execute
5) only success I have is using an EEPROM location as flag and RESET restart my program after I2C activity to branch to the LCD code. This indicates the problem is inside the PicAxe therefore software correctable
Hoping for a better solution the 5)
Cheers,
Nick