Chapter 12 Serial Interface 3

12-3-4 Setup Example

„Master Transmission Setup Example

Here is the setup example for the transmission of the plural data to the all devices on IIC bus with IIC interface function of serial 3. Figure 12-3-15 shows the conditions.

Figure 12-3-15 Conditions Single Master IIC Communication Setup

Item

Set to

Item

Set to

 

 

 

 

SBI3/SBO3 pins

Connection

Clock source

fs/2

(with 2 lines)

 

 

 

 

Transfer bit count

8 bits

SCL/SDA pin's type

N-ch open-drain

 

 

 

 

Start condition

enable

Pull-up resistance of SCL pin

added

 

 

 

 

First transfer bit

MSB

Pull-up resistance of SDA pin

added

 

 

 

 

ACK bit

enable

 

 

 

 

 

 

An example setup procedure, with a description of each step is shown below.

 

Setup Procedure

Description

 

 

 

(1)

Select prescaler operation.

(1) Set the PSCEN flag of the PSCMD register to "1"

 

PSCMD (x'3F6F')

to select prescaler operation.

 

bp0 : PSCEN = 1

 

(2)

Select the clock source.

(2) Set the SC3PSC2-0 flag of the SC3CKS register

 

SC2CKS (x'3FAF')

to "100" to select fs/2 at clock source.

 

bp2-0 : SC3PSC2-0 = 100

Set bp3 of the SC3CKS register to "0", always.

 

bp3 = 0

 

(3)

Control the pin type.

(3) Set the SC3ODC1, 0 flag of the SC3ODC register

 

SC3ODC (x'3FAE')

to "11" to select N-ch open drain for the SDA/

 

bp1-0 : SC3ODC1-0 = 11

SCL pin type. Set the P5PLU2-1 flag of the

 

P5PLU (x'3F45')

P5PLU register to "1, 1" to add pull-up resistor.

 

bp2-1 : P5PLU2-1 = 1, 1

 

(4)

Control the pin direction.

(4) Set the P5DIR2-1 flag of P5 pin control direction

 

P5DIR(x'3F35')

register (P3DIR) to "1, 1" to set P52, P51, to

 

bp2-1 : P5DIR2-1 = 1, 1

outputmode.

 

 

 

XII - 36 Operation

Page 422
Image 422
Panasonic MN101C77C, F77G user manual Conditions Single Master IIC Communication Setup