Experience with MCP7940?

Nov 17, 2015 7 Replies

I'm getting the software going for a MCP7940, and the I2C interface is giving me fits. This is with software that worked fine for a couple of ST inertial sensors.



Has anyone had success or failure with this part? I'm getting ever- deeper into this, but at the moment it appears that the data is getting written and read correctly, but I'm getting NACKs at the ends of transfers.


Tim Wescott Wescott Design Services http://www.wescottdesign.com

What sort of part is it? I don't think I have heard of the MCP7940.

But having just sorted out problems with an I2C interface on a Cortex M4 device that worked most of the time for most of the devices, are you sure you have the I2C pins set up in open collector mode? Mine were in push-pull mode, and most transfers were fine as long as I didn't check for ACKs.

Never mind -- the previous software was a bit too specific to the previous chip, and was messing me up.

Clocks are clocking, life is, if not wonderful, at least back on track.

Tim Wescott Wescott Design Services http://www.wescottdesign.com

As long as the blinking LED is blinking - that's the most important part of any embedded system!

Except that I'm on to the next step, which seems to kill just about everything. I should blink the LED from the assert function!

Tim Wescott Wescott Design Services http://www.wescottdesign.com

Tim, does your master honor the clock clamp? Your symptoms could be coming from an attempt to slow down the master by the slave.

-TV

Nah, it was far stupider than that -- I was or-ing a '1' into a bit position that wasn't appropriate for the clock chip. It's what you get when you do blind copying and call it "code reuse".

Tim Wescott Wescott Design Services http://www.wescottdesign.com

Good - it's a feather for you, you did find it yourself.

-TV

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required