[MQX 4.1]I2C demo for MMA8451Q

Document created by Kan_Li Employee on Mar 31, 2014Last modified by ebiz_ws_prod on Dec 13, 2017
Version 4Show Document
  • View in full screen mode

I have just implemented an I2C demo for my customer, he found no demo for MMA8451Q based on MQX 4.1, so I personally wrote one for him based on the I2C EEPROM demo, as well as the driver code for MMA8451Q supporting both polled and interrupt mode. I think maybe it would be interesting for someone else, so I posted it here. The demo is for TWR-K60D100M, but I think it should be easy to port to some platform else, for example , TWR-K21F120M, all you have to do is creating a new MQX project and replace the source code with the attached one, Please also note the I2C device address might be different in tower boards. You may change the deifintion of I2C_MMA8451_BUS_ADDRESS in MMA8451.h according to the schematics.

 

Please kindly refer to the attached result.txt for more details.

 

Hope that helps,

B.R

Kan

Original Attachment has been moved to: i2c_MMA8451Q_twrk60d100m.zip

Original Attachment has been moved to: result.txt.zip

Attachments

    Outcomes