Forums

LPC2101: I2c init,Transmit & receive data when the processor is in Master mode

Started by ppj_pravyna July 14, 2009
I am new to LPC.I want to delevelop a code in Keil microvision to operate I2c as a Master and an accelerometer(LIS302DL) as Slave. I just want to know how to initialize ,send and receive data in Master mode. Plz anyone help me in writing the code.

An Engineer's Guide to the LPC2100 Series

>
I am new to LPC.I want to delevelop a code in Keil microvision to operate
I2c as a Master and an accelerometer(LIS302DL) as Slave. I just want to know
how to initialize ,send and receive data in Master mode. Plz anyone help me
in writing the code.


C

Check this out:

http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/tn06005.pdf

its for slave tho. But you should see how its done with that really. Just check the manual or datasheet for what registers need to be set. And refer to your device for what type clock and such it needs.