Hi,
I have a Pro Micro (5V/16MHz) connected up to a MMA8452 on the Sparkfun breakout. I’m using the example code provided for the accelerometer found on its page (https://www.sparkfun.com/products/10955). Long story short, the code initializes, and then reads accelerometer values for around a half a second, then hangs. I have a Saleae logic analyzer connected to the I2C bus, and this is what a normal read looks like:
http://i.imgur.com/q2HPr8d.jpgThis looks correct, write the 0x01 address to the chip, then read back six bytes to get the acceleration.
On the last read that the Pro Micro attempts, it looks like this:
http://i.imgur.com/uZ1YRIL.jpgIt looks like it’s getting cut short by the Pro Micro in the first frame, and nothing happens after this (Hence the NAK at the end of the last frame).
I know the accelerometer works fine, it works great plugged into my Netduino, and my Arduino Dumilanove, using the same code.
Any idea what’s going on?
Thanks in advance,
Matthew