EasyManua.ls Logo

Panasonic MN103S

Panasonic MN103S
552 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 12
Serial interface 0 and 1
XII - 16 Operation
12.3.3 Setup Example
Transmission/Reception Setup Example
The setup example for clock synchronous serial communication with serial 0 is shown. Table: 12.3.4 shows the
conditions at transmission/reception.
Table:12.3.4 Setup Example for Synchronous Serial Interface Transmission/Reception
Setup item Description
SBI2/SBO2 pin setting Independent (3 channels)
Transfer bit count 8 bits
Parity bit Even parity
First transfer bit MSB
Clock Clock master
Timer for clock Timer 14
Clock source 1/2 of timer 14 underflow
SBI0sbt0 pin pull-up resistor Added
Serial 0 communication complete interrupt Enable
Setup Procedure Description
(1) Start the timer for the clock (1) Set the baud rate by the TM14MD and TM14BR
registers and the TM14CNE flag to “1” to operate the
timer 14.
(2) Select the timer for the clock
SIFCLK(0x0000A10E)
bp1-0: SC0CKS1-0=00
(2) Set the SC0CKS1-0 flag of the SIFCLK register to “00”
to select the timer 14 underflow.
(3) Control the pin style
P2PLU(0x0000A042)
bp7: P27R=1
(3) Set the P27R flag of the P2PLU register to “1” to enable
the pull-up resistor.
(4) Control the pin direction
P2DIR(0x0000A022)
bp7-5: P27D-P25D=011
(4) Set the P25D flag of the P2DIR register to “1” to set P25
(SBO0 pin) to the output pin, the P26D flag to “1” to set
P26 (SBT0 pin) to the output pin and the P27D flag to
“0” to set P27(SBI0 pin) to the input pin.
(5) Set the pin function
P2MD(0x0000A032)
bp6-5: P26M-P25M=11
(5) Set the P26M flag of the P2MD register to “1” to set it to
SBT0 pin function, and set the P25M flag to “1” to set it
to SBO0 pin function.

Table of Contents

Other manuals for Panasonic MN103S

Related product manuals