Setup Example - Panasonic MN103S User Manual

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

Chapter 12
Serial interface 0 and 1
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
SBI2/SBO2 pin setting
Transfer bit count
Parity bit
First transfer bit
Clock
Timer for clock
Clock source
SBI0sbt0 pin pull-up resistor
Serial 0 communication complete interrupt
(1) Start the timer for the clock
(2) Select the timer for the clock
SIFCLK(0x0000A10E)
bp1-0: SC0CKS1-0=00
(3) Control the pin style
P2PLU(0x0000A042)
bp7: P27R=1
(4) Control the pin direction
P2DIR(0x0000A022)
bp7-5: P27D-P25D=011
(5) Set the pin function
P2MD(0x0000A032)
bp6-5: P26M-P25M=11
XII - 16
Operation
Description
Independent (3 channels)
8 bits
Even parity
MSB
Clock master
Timer 14
1/2 of timer 14 underflow
Added
Enable
Setup Procedure
(1) Set the baud rate by the TM14MD and TM14BR
registers and the TM14CNE flag to "1" to operate the
timer 14.
(2) Set the SC0CKS1-0 flag of the SIFCLK register to "00"
to select the timer 14 underflow.
(3) Set the P27R flag of the P2PLU register to "1" to enable
the pull-up resistor.
(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 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.
Description

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents