I want to run my I2C bus at around 50khz to allow for the capacitance of the length of my cable run whilst limiting the pullup resistors to keep the bus current within spec (4ma).
Looking at the values of i2cfast_64 (0x27), i2cfast_32 (0x13), and i2cfast_16 (0x09) they make sense as the values to be loaded into the brg register of the i2c baud rate generator in the PIC18F14K22 chip.
However, i2cslow_64 (0xFF), i2cslow_32 (0xCF), and i2cslow_16 (0xA7) don't make sense as I think the actual brg values should be 0x9F, 0x4F, and 0x27 respectively. I assume there must be some coding in these values that the compiler is using?
Based on my understanding I can't get 50kHz at 64Meg as the brg register is only 8 bits. But at 32 meg the value should be 0x9F. Will this work as a literal in the hi2csetup command or am I missing something?
Thanks
Peter
Looking at the values of i2cfast_64 (0x27), i2cfast_32 (0x13), and i2cfast_16 (0x09) they make sense as the values to be loaded into the brg register of the i2c baud rate generator in the PIC18F14K22 chip.
However, i2cslow_64 (0xFF), i2cslow_32 (0xCF), and i2cslow_16 (0xA7) don't make sense as I think the actual brg values should be 0x9F, 0x4F, and 0x27 respectively. I assume there must be some coding in these values that the compiler is using?
Based on my understanding I can't get 50kHz at 64Meg as the brg register is only 8 bits. But at 32 meg the value should be 0x9F. Will this work as a literal in the hi2csetup command or am I missing something?
Thanks
Peter