lpcware

LPC1769 I2C Help

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by odel1830 on Thu Feb 27 13:53:22 MST 2014
I am writing code to interact with a temp sensor, I am having some trouble with it.

I am looking at the LPC17xx User manual, Chpt 19.10.5.3. I am looking at State: 0x08 and I am trying to transmit a start condition. State 0x08 is below. My question is about parts 4, 5, and 6. I don't understand how to set those up. Can anyone help?


State: 0x08

A START condition has been transmitted. The Slave Address + R/W bit will now be
transmitted.

1. Write Slave Address with R/W bit to I2DAT.
2. Write 0x04 to I2CONSET to set the AA bit.
3. Write 0x08 to I2CONCLR to clear the SI flag.
4. Set up Master Transmit mode data buffer.
5. Set up Master Receive mode data buffer.
6. Initialize Master data counter.
7. Exit

Outcomes