## Re: [Gumstix-users] I2C Problem

 Re: [Gumstix-users] I2C Problem From: Adam Salamon - 2007-12-11 15:53:05 ```Yep. I used a 10k on both lines (as per my device datasheet). They are on the external board that I'm connecting to. Adam ```

 Re: [Gumstix-users] I2C Problem From: Adam Salamon - 2007-12-11 15:53:05 ```Yep. I used a 10k on both lines (as per my device datasheet). They are on the external board that I'm connecting to. Adam ```
 Re: [Gumstix-users] I2C Problem From: Dave Hylands - 2007-12-11 15:58:33 ```Hi Adam, On Dec 11, 2007 7:52 AM, Adam Salamon wrote: > Yep. I used a 10k on both lines (as per my device datasheet). They are > on the external board that I'm connecting to. The other common problem is using the incorrect address. The i2c address is the upper 7-bits in the address byte. Many data sheets present the address byte and not the address itself. The actual address is normally the address byte divided by 2. So from linux's perspective the address is a number from 0-127 (0x00 to 0x7F) Which device are you connecting to? -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ ```
 Re: [Gumstix-users] I2C Problem From: Adam Salamon - 2007-12-11 16:01:39 ```I'm using a Honeywell HMC6352. The write address is 0x42 which is what I'm passing to the program. Datasheet: http://www.sparkfun.com/datasheets/Components/HMC6352.pdf Adam ```
 Re: [Gumstix-users] I2C Problem From: Adam Salamon - 2007-12-11 16:17:12 ```This is what dmesg shows (truncated) i2c_adapter i2c-0: ioctl, cmd=0x703, arg=0x43 i2c_adapter i2c-0: ioctl, cmd=0x707, arg=0xbeaf5c90 i2c_adapter i2c-0: master_xfer[0] W, addr=0x43, len=1 i2c_adapter i2c-0: master_xfer[1] R, addr=0x43, len=1 i2c: error: exhausted retries i2c: msg_num: 0 msg_idx: -2000 msg_ptr: 0 i2c: ICR: 000007e0 ISR: 00000002 i2c: log: [00000446:000007e0] Dave Hylands wrote: > Hi Adam, > > On Dec 11, 2007 7:52 AM, Adam Salamon wrote: > >> Yep. I used a 10k on both lines (as per my device datasheet). They are >> on the external board that I'm connecting to. >> > > The other common problem is using the incorrect address. > > The i2c address is the upper 7-bits in the address byte. Many data > sheets present the address byte and not the address itself. The actual > address is normally the address byte divided by 2. > > So from linux's perspective the address is a number from 0-127 (0x00 to 0x7F) > > Which device are you connecting to? > > ```
 Re: [Gumstix-users] I2C Problem From: Adam Salamon - 2007-12-11 21:10:05 ```Figured it out..... sure enough it was the wrong address. I2C only takes the most significant 7 bits. Dave Hylands wrote: > Hi Adam, > > On Dec 11, 2007 7:52 AM, Adam Salamon wrote: > >> Yep. I used a 10k on both lines (as per my device datasheet). They are >> on the external board that I'm connecting to. >> > > The other common problem is using the incorrect address. > > The i2c address is the upper 7-bits in the address byte. Many data > sheets present the address byte and not the address itself. The actual > address is normally the address byte divided by 2. > > So from linux's perspective the address is a number from 0-127 (0x00 to 0x7F) > > Which device are you connecting to? > > -- Adam Salamon Member, Engineering Staff Lockheed Martin Advanced Technology Lab asalamon@... | (856) 792-9718 ```