I2C

Discussion to talk about hardware related topics only.
Post Reply
docaberle
Posts: 10
Joined: Tue Aug 26, 2008 2:39 pm

I2C

Post 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.
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Re: I2C

Post 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.
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: I2C

Post 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
Post Reply