Operations; Initialization - Epson S1C17M20 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

12 UART (UART3)
UAnMOD register
CHLN bit
STPB bit
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1

12.5 Operations

12.5.1 Initialization

The UART3 Ch.n should be initialized with the procedure shown below.
1. Assign the UART3 Ch.n input/output function to the ports. (Refer to the "I/O Ports" chapter.)
2. Set the UAnCLK.CLKSRC[1:0] and UAnCLK.CLKDIV[1:0] bits. (Configure operating clock)
3. Configure the following UAnMOD register bits:
- UAnMOD.BRDIV bit
- UAnMOD.INVRX bit
- UAnMOD.INVTX bit
- UAnMOD.PUEN bit
- UAnMOD.OUTMD bit (Enable/disable USOUTn pin open-drain output)
- UAnMOD.IRMD bit
- UAnMOD.CHLN bit
- UAnMOD.PREN bit
- UAnMOD.PRMD bit
- UAnMOD.STPB bit
- UAnMOD.CAREN bit
- UAnMOD.PECAR bit
4. Set the UAnBR.BRT[7:0] and UAnBR.FMD[3:0] bits.
5. Set the UAnCAWF.CRPER[7:0] bits.
6. Set the following UAnCTL register bits:
- Set the UAnCTL.SFTRST bit to 1.
- Set the UAnCTL.MODEN bit to 1.
7. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the UAnINTF register.
- Set the interrupt enable bits in the UAnINTE register to 1. * (Enable interrupts)
* The initial value of the UAnINTF.TBEIF bit is 1, therefore, an interrupt will occur immediately after the UA-
nINTE.TBEIE bit is set to 1.
12-4
PREN bit
0
st
D0
1
st
D0
0
st
D0
1
st
D0
0
st
D0
1
st
D0
0
st
D0
1
st
D0
Figure 12.4.1 Data Format
(Select baud rate division ratio (1/16 or 1/4))
(Enable/disable USINn input signal inversion)
(Enable/disable USOUTn output signal inversion)
(Enable/disable USINn pin pull-up)
(Enable/disable IrDA interface)
(Set data length (7 or 8 bits))
(Enable/disable parity function)
(Select parity mode (even or odd))
(Set stop bit length (1 or 2 bits))
(Enable/disable carrier modulation function)
(Select carrier modulation period (H data period/L data period))
Seiko Epson Corporation
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
st: start bit, sp: stop bit, p: parity bit
(Set transfer rate)
(Set carrier cycle)
(Execute software reset)
(Enable UART3 Ch.n operations)
(Clear interrupt flags)
D6
sp
D6
p
sp
D6
sp
sp
D6
p
sp
sp
D6
D7
sp
D6
D7
p
sp
D6
D7
sp
sp
D6
D7
p
sp
sp
S1C17M20/M21/M22/M23/M24/M25
TECHNICAL MANUAL (Rev. 1.0)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17m25S1c17m21S1c17m22S1c17m23S1c17m24

Table of Contents