MMA845x Linux C API Tutorial?

Showing results for 
Search instead for 
Did you mean: 

MMA845x Linux C API Tutorial?

Contributor I

Hey guys,

I've been having a lot of fun playing around with the MMA84151Q Windows software (which I'm using for a mma845x) and would like to write some software to do the same in linux. I would like to know if there are any tutorials out there that could help? Something like "once communication is confirmed with the board, send this byte to get the x axis, or this byte to get the y axis value", or something like that.

I've been reading the MMA955xL .pdf documentation, and it seems great, but doesn't really tell the programmer where to start. Is there similar for mma845x?

If anyone could provide any starting places for designing an API based on this hardware, I would be most appreciative.

Thanks for reading.

Edit: More specifically, can someone point me to documentation and source code for the mma845x c library?

Labels (2)
Tags (3)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hello Adam,

I am not aware of any suitable tutorials or application notes, but you may want to check this website with Linux drivers.

To access the MMA845xQ accelerometers from your own application, you can use the attached MMA845x driver program (AN4076SW). It provides an easy way to communicate with the MMA845xQ accelerometers using the Sensor Toolbox platform. Once the Sensor Toolbox is programmed with this firmware, you can modify and read registers, view details of the operating mode of the MMA845xQ, stream data in data polling, interrupt, interrupt with FIFO modes and display data in different formats using a generic terminal program such as HyperTerminal. It is also possible to develop your own application e.g. in LabVIEW as you communicate with the board via a virtual serial port over USB using the commands that are listed in the AN4083, table 33. This AN also provides instructions how to program the MC9S08QE8 MCU on the Sensor Toolbox middle board.

I hope this helps.



0 Kudos