From: Dave H. <dhy...@gm...> - 2007-04-20 02:57:56
|
Hi Cliff, > One interesting thing about the avrlib library is that you can specify > the i2c bus address. In the example, it is set to 0xA0, which is > than > 128, so i2c complains. I set it to 0x50, and the hex program runs, and > send data to 'itself' ( from the uart control) but still can't seem to > send from the gumstix. So i2c addresses are only 7-bits (0-127). Some people confuse things and use what's known as the address byte (which has the address in the upper 7-bits and the R/W bit in the low bit). So when you read the data sheet you need to figure out whether they're talking about the 7-bit or 8-bit address and adjust accordingly. Also, when using i2c, one side has to be the master and one side has to be the slave. I've only ever used the gumstix as the master, and the robostix as the slave. I used my own code rather than the avrlib code, since I needed to get my bootloader to fit in 2k. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |