westaust55
Moderator
What are the limitation on using a predefined group of HI2CSETUP commands?
I have a number of HI2CSETUP commands in a block in the initialization part of my program.
I have found that if I have the setup command for EEPROM first it does work,
whereas if the same line is the last setup command it does work correctly.
For example, with the following commands, a read of the EEPROM does not function correctly:
Whereas the following sequence will work for the IO expanders AND the reading of the EEPROM:
With the first group of commands above, if I repeat the line
Just prior to the EEPROM read command, then the EEPROM data is read (correctly)
Any thoughts or known isssues?
I have a number of HI2CSETUP commands in a block in the initialization part of my program.
I have found that if I have the setup command for EEPROM first it does work,
whereas if the same line is the last setup command it does work correctly.
For example, with the following commands, a read of the EEPROM does not function correctly:
Code:
Init: HI2CSETUP i2cmaster, EEPROM_0, i2cfast, i2cword
HI2CSETUP i2cmaster, expand_0, i2cslow, i2cbyte
HI2CSETUP i2cmaster, expand_1, i2cslow, i2cbyte
HI2CSETUP i2cmaster, rtc1307, i2cslow, i2cbyte
HI2CSETUP i2cmaster, cmps03_0, i2cslow, i2cbyte
HI2CSETUP i2cmaster, srf008_0, i2cslow, i2cbyte
HI2CSETUP i2cmaster, spe030_0, i2cslow, i2cbyte
Whereas the following sequence will work for the IO expanders AND the reading of the EEPROM:
Code:
Init: HI2CSETUP i2cmaster, expand_0, i2cslow, i2cbyte
HI2CSETUP i2cmaster, expand_1, i2cslow, i2cbyte
HI2CSETUP i2cmaster, rtc1307, i2cslow, i2cbyte
HI2CSETUP i2cmaster, cmps03_0, i2cslow, i2cbyte
HI2CSETUP i2cmaster, srf008_0, i2cslow, i2cbyte
HI2CSETUP i2cmaster, spe030_0, i2cslow, i2cbyte
HI2CSETUP i2cmaster, EEPROM_0, i2cfast, i2cword
With the first group of commands above, if I repeat the line
Code:
HI2CSETUP i2cmaster, EEPROM_0, i2cfast, i2cword
Any thoughts or known isssues?