Philips LPC213 Series User Manual page 140

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
11.9.3 Start Master Receive function
Begin a Master Receive operation by setting up the buffer, pointer, and data count, then
initiating a Start.
11.9.4 I
Determine the I
11.9.5 Non mode specific States
11.9.6 State : 0x00
Bus Error. Enter not addressed Slave mode and release bus.
11.9.7 Master States
State 08 and State 10 are for both Master Transmit and Master Receive modes. The R/W
bit decides whether the next state is within Master Transmit mode or Master Receive
mode.
11.9.8 State : 0x08
A Start condition has been transmitted. The Slave Address + R/W bit will be transmitted,
an ACK bit will be received.
User manual
1. Initialize Master data counter.
2. Set up the Slave Address to which data will be transmitted, and add the Write bit.
3. Write 0x20 to I2CONSET to set the STA bit.
4. Set up data to be transmitted in Master Transmit buffer.
5. Initialize the Master data counter to match the length of the message being sent.
6. Exit
1. Initialize Master data counter.
2. Set up the Slave Address to which data will be transmitted, and add the Read bit.
3. Write 0x20 to I2CONSET to set the STA bit.
4. Set up the Master Receive buffer.
5. Initialize the Master data counter to match the length of the message to be received.
6. Exit
2
C interrupt routine
2
C state and which state routine will be used to handle it.
2
1. Read the I
C status from I2STA.
2. Use the status value to branch to one of 26 possible state routines.
1. Write 0x14 to I2CONSET to set the STO and AA bits.
2. Write 0x08 to I2CONCLR to clear the SI flag.
3. Exit
1. Write Slave Address with R/W bit to I2DAT.
2. Write 0x04 to I2CONSET to set the AA bit.
Rev. 01 — 24 June 2005
UM10120
2
Chapter 11: I
C interfaces
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
140

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2131Lpc2132Lpc2134Lpc2136Lpc2138

Table of Contents