Panasonic F77G, MN101C77C user manual Msb

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 365
Image 365

Chapter 11 Serial Interface 0, 1

11-3-4 Setup Example

„Transmission / Reception Setup Example

The setup example for clock synchronous serial communication with serial 0 is shown. Table 11-3-16 shows the conditions at transmission / reception.

Table 11-3-16 Setup Examples for Synchronous Serial Interface Transmission / Reception

Setup item

set to

 

Setup item

set to

 

 

 

 

 

SBI / SBO pin

Independent

 

Clock source

fs/2

 

(with 3 channels)

 

 

 

Transfer bit count

8 bits

 

Used pin

A (port 0)

Start condition

none

 

Clock source 1/8 dividing

divided by 8

First transfer bit

MSB

 

SBT / SBO pin style

Nch open-drain

Input clock edge

falling edge

 

SBT pin pull-up resistor

Added

Output clock edge

rising edge

 

SBO pin pull-up resistor

Added

Clock

Internal clock

 

Serial 1 communication

Enable

 

 

 

complete interrupt

 

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

Setup Procedure

 

Description

 

 

 

(1) Select the prescaler operation.

(1)

Set the PSCEN flag of the PSCMD register to

PSCMD (x'3F6F')

 

"1" to select "prescaler operation".

bp0 : PSCEN = 1

 

 

(2) Select the clock source.

(2)

Select the clcok source by the SC0CKS

SC0CKS (x'3F97')

 

register.

bp2-0 : SC0PSC2-0 = 100

 

Set bp4-0 to "0100" to select "fs/2".

(3) Select the used pin.

(2)

Set the SC0SEL flag of the SC0ODC register to

SC0ODC(x'3F96')

 

"0" to set I/O used pin to A (port 0).

bp7 : SC0SEL = 0

 

 

(4) Control the pin type.

(4)

Set the SC0ODC1-0 flag of the SC0ODC

SC0ODC(x'3F96')

 

register to "11" to select "N-ch open drain" to

bp1-0 : SC0ODC1-0 = 11

 

the SBO/SBT pin. Set the P0PLU5, 3 flag of

P0PLU (x'3F40')

 

the P0PLU register to "1" to add pull-up

bp5, 3 : P0PLU5, 3 = 1, 1

 

resistor.

(5) Control the pin direction.

5)

Set the P0DIR5-3 flag of the port 0 pin

P0DIR(x'3F30')

 

direction control register (P0DIR) to "101" to set

bp5-3 : P0DIR5-3 = 101

 

P03, P05 "output mode", and to set P04 "input

 

 

mode".

 

 

 

Operation XI - 39

Page 365
Image 365
Panasonic F77G, MN101C77C user manual Msb