K60 MMA7760 Accelerometer with I2C Protocol

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K60 MMA7760 Accelerometer with I2C Protocol

853 Views
broccolee
Contributor III

Does anybody know how to output the K60 tower board's accelerometer measurements via I2C Protocol and ProcessorExpert? I tried the example in codewarrior, debugged it, but it only returns descriptions, not measurements:

K60_MMA7660.jpg

Any help, suggestions, guides on how to program this would be very much appreciated This is work related and time-sensitive.

Thanks,

Dao.

3 Replies

532 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Dao,

I am not sure if you are using TWR-K60D100M tower board do related test? If yes, you need to select to use TWR-K60N512 board, which is using K60 100MHz silicon 1.x product.

If you want to use related code with TWR-K60D100M board,  you need to do some porting work, select the CPU component (MK60DN512VMD10 without 'Z' character).

I could run related code with TWR-K60N512 board without any problem.

Please check below attached serial terminal print info:

serial print.jpg

Thank you for the attention.

Best regards,

Ma Hui

532 Views
broccolee
Contributor III

Hi Ma Hui,

Thanks a lot for pointing that out, I must have changed some configurations to get an error message. I reload a fresh example and the description showed no error.

I guess I didn't phrase my question clearly. I was wondering how I can program the board to print out the accelerometer's measurements in real time for example X = 2.0, Y = 0.0, Z = -1.0, instead of the above descriptions.

Any help, suggestions, guides on how to program this would be very much appreciated as this is work related and time-sensitive.

Thanks,

Dao.

0 Kudos
Reply

532 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Dao,

Freescale KL25 sample code package provides a similar demo, which is also based on Processor Expert tool.

You could download KL25 sample code from below link:

http://cache.freescale.com/files/32bit/software/KL25_SC.exe

You could find [accelerometer_demo] at sample code install path: ..\KL25 Sample Code\kl25_sc_rev10\klxx-sc-pex\projects\accelerometer_demo\cw

Please refer this project to porting same application on TWR-K60D100M board.

Wish it helps.

Best regards,

Ma Hui

0 Kudos
Reply