Pages: [1]   Go Down
Author Topic: I2C Data Shifted Left 1-bit  (Read 408 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Simplicity is the ultimate sophistication.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46266
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I2C addresses are 7 bit. Yours is not.
Logged

Offline Offline
Edison Member
*
Karma: 35
Posts: 1429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pete
Logged

Where are the Nick Gammons of yesteryear?

Pages: [1]   Go Up
Jump to: