Setup Example - Panasonic MN103S User Manual

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

13.3.3

Setup Example

Transmission/Reception Setup Example
Here is the setup example for transmission/reception of clock synchronous communication with serial interface 2.
Table: 13.3.7 shows the conditions for transmission/reception.
Table:13.3.7 Conditions of Synchronous Serial Interface Transmission/Reception
Setting item
SBI2/SBO2 pin setting
Transfer bit count
Start condition
First transfer bit
Input edge
Output edge
Clock
Clock source
1/16 dividing of clock source
SBT2 pin pull-up resistor
Serial interface 2 communication complete interrupt
SBO2 output after last data output
Setup Procedure
(1) Select the prescaler operation
SC2CTR3(0x0000A125)
bp3: SC2PSCE=1
(2) Select the clock source
SC2CTR3(0x0000A125)
bp2-0: SC2PSC2-0=100
(3) SBO2 output control after last data output
SC2CTR3(0x0000A125)
bp7-6: SC2FDC1-0=00
(4) Control the pin style
P2PLU(0x0000A042)
bp0: P20R=1
(5) Control the pin direction
P1DIR(0x0000A021)
bp7: P17D=1
P2DIR(0x0000A022)
bp1-0: P21D-P20D=01
Description
Independent (3 channels)
8 bits
Without start condition
MSB
Rising
Falling
Clock master
IOCLK/2
No 16 dividing
Added
Enabled
Fixed to "1"(H)
(1) Set the SC2PSCE flag of the SC2CTR3 register to "1" to
select the prescaler operation.
(2) Set the SC2PSC2-0 flags of the SC2CTR3 register to
"100" to select IOCLK/2 to the clock source.
(3) Set the SC2FDC1-0 flags of the SC2CTR3 register to
"00" to select the "Fixed to "1" (High)" after the SBO
last data output.
(4) Set the P20R flag of the P2PLU register and the P20R
flag of the P2PLU register to "1" to select the pull-up
resistor enabled.
(5) Set the P17D flag of the P1DIR register to "1" to set P17
(SBO2 pin) to the output pin. Set the P21D flag of the
P2DIR register to "1" to set P21 (SBI2 pin) to the input
pin, and set the P21D flag to "0" to set P20 (SBT2 pin)
to the output pin,
Description
Operation
Chapter 13
Serial Interface 2
XIII - 23

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents