Chapter 12 Serial Interface 3

 

Setup Procedure

 

Description

 

 

 

 

(13)

Select the transfer clock.

(13)

 

 

SC3MD1 (x'3FA9')

 

Set the SC3MST flag of the SC3MD1 register to

 

bp2 : SC3MST = 1

 

"1" to select clock master (internal clock).

 

 

 

At IIC communication, external clock should not

 

 

 

be selected.

(14) Control the pin function.

(14) Set the SC3SBOS, SC3SBIS, SC3SBTS flags of

 

SC3MD1 (x'3FA9')

 

the SC3MD1 register to "1" to set the SDA pin

 

bp4 : SC3SBOS = 1

 

(the SBO3 pin) to serial data output, the SBI3 pin

 

bp5 : SC3SBIS = 1

 

to serial data input, and the SCL pin (the SBT3

 

bp6 : SC3SBTS = 1

 

pin)to serial clock I/O. Set the SC3IOM flag to "1"

 

bp7 : SC3IOM = 1

 

to set "serial data input from the SDA pin (the

 

 

 

SBO3 pin)".

(15)

Set the interrupt level.

(15)

Set the interrupt level by the SCLV1-0 flag of the

 

SC3ICR (x'3FF9')

 

serial 3 interrupt control register (SC3ICR).

 

bp7-6 : SC3LV1-0 = 10

 

 

(16) Enable the interrupt.

(16)

Enable the interrupt to the SC3IE flag of the

 

SC3ICR (x'3FF9')

 

SC3ICR register. If the interrupt request flag

 

bp1 : SC3IE = 1

 

(SC3IR of the SC3ICR register) is already set,

 

 

 

clear SC3IR before the interrupt is enabled.

<Transmission is started.>

[

Chapter 3 3-1-4. Interrupt Flag Setup ]

(17)

Start serial transmission.

(17)

Set the transmission data to the transmit/

 

Confirm that SCL (P52) is "H".

 

receive shift register SC3TRB. Then the

 

Transmission data

 

transfer clock is generated to start transmission.

 

SC3TRB (x'3FAB')

 

If the ACK bit is received after data transmission,

 

 

 

the communication complete interrupt SC3IRQ is

 

 

 

generated.

<Transmission is completed.>

 

 

<Setup for the next data transmission>

 

 

(18) Judge the monitor flag.

(18)

Confirm the SC3STC flag of the serial 3 control

 

SC3CTR (x'3FAA')

 

register (SC3CTR). When the former

 

bp6 : SC3STC

 

transmission is completed in normal, SC3STC =

 

 

 

"0". If SC3STC = "1", the communication should

 

 

 

be operated again.

 

 

 

 

XII - 38 Operation

Page 424
Image 424
Panasonic MN101C77C, F77G user manual XII 38 Operation