Content originally posted in LPCWare by RobinHuisman on Thu Jul 21 06:22:17 MST 2011
I am trying to let a LPCXpresso LPC1769 communicate with a Bosch BMA180 accelerometer breakout bord from SparkFun.
But almost everything I send, is echoed back.
When I send 0x80, I get 0x80 back.
Sending 0x81, receiving 0x81.
But when I send 0x83, I get 0x82 back.
I read somewhere that the SDI and SDO pins of the BMA180 could be shorted, so I emailed SparkFun and they sent me a new one. But now I'm having the same problem again.
Do I have bad luck with the hardware of could it be a software problem?
My messy code is in the attachment.