Panasonic MN103S User Manual page 363

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

Setup Procedure
(6) Set the SC0CTR register
Set the protocol
SC0CTR(0x0000A100)
bp11: SCA0PTL=1
Set the first bit to be transferred
SC0CTR(0x0000A100)
bp9: SCA0OD=1
Set the transfer bit count
SC0CTR(0x0000A100)
bp7: SCA0LN=1
Set the parity
SC0CTR(0x0000A100)
bp6-4: SCA0PTY2-0=110
Set the clock source
SC0CTR(0x0000A100)
bp1-0: SCA0S1-0=0
(7) Enable the transmission / reception
SC0CTR(0x0000A100)
bp14: SCA0REN=1
bp15: SCA0TEN=1
(8) Set the interrupt level
G13ICR(0x00008934)
bp14-12: G13LV2-0=100
(9) Enable the interrupt
G13ICR(0x00008934)
bp9: G13IE1=1
(10) Start the serial transmission
Transmission data→SC0TB(0x0000A10C)
Reception data→Input to the SBI0sbi0 pin
Note: Each in (6) can be set at the same time.
(6) Set the SCA0PTL flag of the SC0CTR register to "1" to
select synchronous communication.
Set the SCA0OD flag of the SC0CTR register to "1" to
set the first transfer bit to MSB.
Set the SCA0LN flag of the SC0CTR register to "1" to
set the transfer bit count to 8 bits.
Set the SCA0PTY2-0 flags of the SC0CTR register to
"110" to set the parity bit to even parity.
Set the SCA0S1-0 flags of the SC0CTR register to "01"
to set the clock source to 1/2 cycle of the timer 14
underflow.
(7) Set the SCA0REN flag of the SC0CTR register to "1" to
enable reception, and set the SCA0TEN flag to "1" to
enable transmission.
(8) Set the interrupt by the G13LV2-0 flags of the GI131CR
register.
(9) Set the G13IE1 flag of the G13ICR register to "1" to
enable the interrupt.
If any interrupt request flag (the G13IR1 of the G13ICR
register) has been already set, clear the G13IR1 flag to
enable the interrupt.
(10) Set transmission data to the serial 0 transmission
register (SC0TB). The transfer clock is generated and
transmission or reception is started. When the
transmission is finished, the serial 0 interrupt SC0TIRQ
is generated.
Serial interface 0 and 1
Description
Operation
Chapter 12
XII - 17

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents