Page 1 of 1

I2C

Posted: Sat Sep 20, 2008 4:35 pm
by docaberle
I'm new to netburner and am trying to get the I2C bus to talk to an AtoD chip. Seems fairly straight forward but I get a "Failed to read error: 9" when I try the sample "Mod5270 I2C2Serial" program that came with the board. I am running only one netburner module so I have the "#include "i2cmaster.h" " code uncommented and I just took out the other code relating to multi master mode.

I don't know where these errors are to be found in the documentation. I believe I have the hardware hooked up correctly with the pullup resistors, etc. I had to change the while statement so that my address of 91 Hex was valid.

Re: I2C

Posted: Sun Sep 21, 2008 12:30 am
by yevgenit
I2C functions with "#include "i2cmaster.h" operate correctly with my mod5270 together with at24c64b EEPROM together with Rel22_rc2.
Of course, I call the I2C functions from the custom at24c64b specific module (which cares I2C address, page write, etc).
I didn't try to use the "Mod5270 I2C2Serial" program that came with the board.

Re: I2C

Posted: Mon Sep 22, 2008 12:20 pm
by lgitlitz
Hello,

I just answered this ticket in the NetBurner support queue but this might be a helpful solution to post for the group. I2C only has seven bit addressing. Some data sheets will show the R/W bit as the least significant bit in an address but this is not truly part of the address. Shift this whole address word over 1 bit to the right to get the real I2C address. The NetBurner I2C functions will automatically control the R/W bit.

-Larry