Chapter 10 Inter-Integrated Circuit (S08IICV2)
MC9S08LG32 MCU Series, Rev. 5
Freescale Semiconductor
257
12.7
Initialization/Application Information
Figure 12-11. IIC Module Quick Start
Module Initialization (Slave)
1. Write: IICC2
— to enable or disable general call
— to select 10-bit or 7-bit addressing mode
2. Write: IICA
— to set the slave address
3. Write: IICC1
— to enable IIC and interrupts
4. Initialize RAM variables (IICEN = 1 and IICIE = 1) for transmit data
5. Initialize RAM variables used to achieve the routine shown in
Module Initialization (Master)
1. Write: IICF
— to set the IIC baud rate (example provided in this chapter)
2. Write: IICC1
— to enable IIC and interrupts
3. Initialize RAM variables (IICEN = 1 and IICIE = 1) for transmit data
4. Initialize RAM variables used to achieve the routine shown in
5. Write: IICC1
— to enable TX
0
IICF
IICA
Baud rate = BUSCLK / (2 x MULT x (SCL DIVIDER))
TX
TXAK
RSTA
0
0
IICC1
IICEN
IICIE
MST
Module configuration
ARBL
0
SRW
IICIF
RXAK
IICS
TCF
IAAS
BUSY
Module status flags
Register Model
AD[7:1]
When addressed as a slave (in slave mode), the module responds to this address
MULT
ICR
IICD
DATA
Data register; Write to transmit IIC data read to read IIC data
0
AD10
AD9
AD8
IICC2 GCAEN
ADEXT
Address configuration
0
0
Summary of Contents for MC9S08LG16
Page 2: ......
Page 4: ......
Page 8: ......
Page 20: ......
Page 26: ...Chapter 1 Device Overview MC9S08LG32 MCU Series Rev 5 26 Freescale Semiconductor...
Page 40: ...Chapter 2 Pins and Connections MC9S08LG32 MCU Series Rev 5 40 Freescale Semiconductor...
Page 372: ......