K60 MMA7760 Accelerometer with  I2C Protocol

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

K60 MMA7760 Accelerometer with  I2C Protocol

954 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:

9678_9678.jpgK60_MMA7660.jpg

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

 

Thanks,

Dao.

Labels (1)
3 Replies

450 Views
trytohelp
NXP Employee
NXP Employee

Hi Dao,

do you refer to the example

      \CW MCU v10.5\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K60N512\I2C

I will check with colleague but I don't think we've other example.

Keep you informed.

Regards

Pascal

450 Views
broccolee
Contributor III

Hi Pascal,

Thanks for responding! I most certainly did try all the examples available. Since I have no prior experience with microcontrollers and very very little programming knowledge, I am clueless on how to change the example program above to print out the accelerometer measurements for example measurements X, Y and Z. The reason this is important is that I have to eventually try to talk to an external IMU sensor that has an I2C protocol.

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

Thanks,

Dao.

0 Kudos

450 Views
trytohelp
NXP Employee
NXP Employee

Hi Dao,

There are some information associated to the example.

Extract of the readme.txt file:

++++++++++++++

====================

This project demonstrates the use of the I2C component. An external

accelerometer is switched into a test mode in which the user can write

into the X, Y, Z data registers and then read the written values. For setting

up the mode register a one byte write/read operation is used, for write/read

the data registers a multibyte write/read operation is used. Comments and test

results are sent to ConsoleUART (Serial component) via a Tower Serial module

(TWR-SER). RS232 settings: 38400baud rate, 8-bit, 1-stop bit, no parity.

++++++++++++++

you can get help of each bean.

By this way you will have all information associated to a bean: how to configure it

Click on Typical Usage to have more example of bean usage.

Hope this will help you.

Pascal

0 Kudos