we need the i2c communication driver in C-language

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

we need the i2c communication driver in C-language

1,410 Views
jagannathang
Contributor II

we need I2C driver in C-language for developing the program for Medical applications.  The download program is in ASN format and we are not able to program.  kindly give the correct program link.  we are presently using the code warrior.

Labels (1)
0 Kudos
Reply
3 Replies

985 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

what chip do you work with?

what's your CodeWarrior version?


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

985 Views
jagannathang
Contributor II

We are using the codewarrior version 10.6.4 and we are using MAX30100 FOR HEART BEAT MONITOR, AND MMA9555L FOR BP MONITOR. ALSO WE ARE USING PEDOMETER OF FREESCALE.JAGAN9845497950

G.Jagannathan

MANAGING DIRECTOR

AARMS Value Chain Pvt. Ltd.,

#211 D, I Floor, Temple Street,

9th Main Road, BEML III Stage,

Rajarajeshwari Nagar,

Bangalore- 560098

mob : 9845497950

www.aarmsvaluechain.com

0 Kudos
Reply

985 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

MMA9555L use Coldfire V1 core.
The I2C block is a common I2C block and used by many NXP devices.

Please see AN3464 which has some good example code on how to use the I2C block as a master device.

http://www.freescale.com/files/32bit/doc/app_note/AN3464.pdf

Specifically:

Figure 8A. Code Snippet for Initializing the IIC Module in the V1 MC51QExx Processor
Figure 9A. Code Snippet Showing How to Send a Byte Over the IIC Bus Using the MC51QEx Processor
Figure 10A. Code Snippet Showing How to Receive a Byte Over the IIC Bus Using the MC51QEx Processor

Please note that the register names are not exactly the same, but with the MMA955x register header files and the
MMA955x hardware reference manual, it is easy enough to adjust.  The App Note uses register name conventions which include a  number to indicate which peripheral is being accessed, some processors can have multiple I2C peripheral blocks. The MMA955x only has the one I2C master block, so this number has been removed in the MMA955x register header files. Due to the “I”s and “1”s in various combinations, this is actually a significant source or problems when porting drivers to the MMA955x.

For example:

APP Note convention  = MMA955x Convention
IIC1F = IICF
IIC1S = IICS
IIC1C1 = IICC1
IIC1C1_IICEN = IICC1_IICEN

I hope that this helps.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply