Go Down

Topic: I2C Data Shifted Left 1-bit (Read 481 times) previous topic - next topic

halfapizza

I'm trying to talk to an AS1538 8-ch ADC from ams.  I send the address and watch on the scope.  Address sent is 0x90, but what I see on the scope is 0x20.  The SDA and SCK lines look like they doing the right thing.  I also see 9 clocks, last one is ACK maybe?  but the 9th clock corresponds to a '1' being written on SDA.  Also, no matter what address I send I see the same '1' written on that 9th clock.
Examples of shifted data.
Write See
0x96 -> 0x2c      0x55 -> 0xaa      0xaa -> 0x54      0x22 -> 0x44      0x44 -> 0x88      0x88 -> 0x10

Here is the code

#include <Wire.h>
void setup()
{
    Wire.begin();
}

void loop()
{
    Wire.beginTransmission(0x90);
    Wire.endTransmission();
    delay(1);
}
Any thoughts anyone?
Simplicity is the ultimate sophistication.

PaulS

I2C addresses are 7 bit. Yours is not.

el_supremo

Use this address:
Code: [Select]
    Wire.beginTransmission(0x48);

Pete

Go Up