I2C nightmare - no activity on SCL or SDA pins at all

caver451

New Member
Hello!

I've been having a nightmare getting I2C working on a 28X2, and I'm pretty much out of ideas. Perhaps someone here has some experience they could share...

I am trying to communicate with an MCP3421 ADC on its eval board with built-in pull up resistors. I am using:

Code:
Hi2cSetup I2CMaster, SlaveAdr_2, I2CSlow, I2CByte
Hi2cout [SlaveAdr_2], ( $88 ) ' Configure the MCP3421
Hi2cin [SlaveAdr_2], ( Hi, Lo, Config ) ' Retrieve hi byte, lo byte and Config byte
The SlaveAdr_2 symbol is to b3 and contains the appropriate address.

I see nothing on the SCL or SDA pins on my scope. Both are perpetually high. No clock pulses. No data. Nothing. Even if I was sending junk to the MCP3421, I should be able to see clock pulses on the SCL and data on the SDA.

This is being prototyped on the AXE091 dev board. I'm going straight to pin 14 and 15 on the 28X2.

I had the exact same problem trying to communicate with my I2C LCD and finally set it to RS232 serial mode instead, but no such solution exists for the MCP3421 so now I'm stuck with getting I2C working.

Since I'm not seeing any activity on SCL or SDA at all, I suspect the problem is software related.

Has anyone experienced this sort of pain with I2C before? Any help would be appreciated!''

Regards,

-Robert
 

eclectic

Moderator
Welcome to the Forum.

As a very quick check, can you post a high quality photo

of the wiring

of the lower-left corner (the 28 pin part) of the AXE091

e
 

Technical

Technical Support
Staff member
Sounds like you may be using the 40 pin row (left hand row 1) rather than the 28 pin row (row 2) for the pins 1-14 on the AXE091.
Piin 14 to a 28X2 must be connected via the 28 pin row (the bottom of the 4 pin header on row 2).

Edit - looks like e had the same thought at the same time!
 
Last edited:

caver451

New Member
Oh for goodness sake, that was the problem. I moved the SCL line to the correct pin, and I'm getting good data from the MCP3421 now.

If I had just used a simple continuity tester days ago, I would have avoided all that pain! Thank you very much, everyone!
 

westaust55

Moderator
The PICAXE community. We never sleep:)
With currently 56,606 Members of which 1,014 are Active Members spread over at least 6 continents (not sure about any members in Antarctica)
there is a good change any posts (at least in the active forum area) is seen almost as soon as the OP preses return.
It's then just a case of when someone with the right answer comes along.
 
Top