Uart Serial Interface Setup - Panasonic MN103S User Manual

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

Chapter 12
Serial interface 0 and 1
12.3.5

UART Serial Interface Setup

UART Serial Interface Setup
The setup example for UART transmission/reception with serial 0 is shown. Table: 12.3.10 shows the condition
for transmission/reception.
Table:12.3.10 UART Interface Transmission/Reception Condition
Setup item
SBI0/SBO0 pin setting
Frame mode specification
First transfer bit
Clock source
Parity bit add / check
Serial 0 transmission complete interrupt
Serial0 reception complete interrupt
An setup procedure, with a description of each steps is shown below.
(1) Set the baud rate timer
(2) Select the baud rate timer
SIFCLK(0x0000A10E)
bp5-4: SC0CKS2-1=00
(3) Set the pin function
P2MD(0x0000A032)
bp5: P25M=1
(4) Control the pin direction
P2DIR(0x0000A022)
bp27: P27D=0
bp25: P25D=1
XII - 24
Operation
Description
Independent (2 channels)
8 bits + 2 stop bits
MSB
Timer 14
"0" added / check
Enable
Enable
Setup Procedure
(1) Set the baud rate by the TM14MD and TM14BR
registers, and set the TM14CNE flag to 1 to operate the
timer 14.
(2) Set the SC0CKS2-1 flags of the SIFCLK register to "00"
to set the timer 14 underflow to the baud rate timer.
(3) Set the P25M flag of the P2MD register to "1" to set it to
SB0 pin function .
(4) Set the P25D flag of the P2DIR register to "1" to set P25
to output mode , and set the P27D flag to "0" to set P27
to input mode.
Description

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents