Setting Transfer Data Conditions - Epson S1C17704 Technical Manual

Cmos 16-bit single chip microcomputer
Table of Contents

Advertisement

18 UART

18.4 Setting Transfer Data Conditions

The following conditions are selectable to configure transfer data format:
• Character length: 7 or 8 bits
• Start bit:
1 bit, fixed
• Stop bit:
1 or 2 bits
• Parity bit:
Even, odd, or none
Note: Make sure that the UART is disabled (RXEN/UART_CTL register = 0) when setting the transfer
data conditions.
∗ RXEN: UART Enable Bit in the UART Control (UART_CTL) Register (D0/0x4104)
Character length
Use the CHLN bit (D4/UART_MOD register) to select the character length. When CHLN is set to 0 (default),
the character length is configured to seven bits; when CHLN is set to 1, the character length is configured to
eight bits.
∗ CHLN: Character Length Select Bit in the UART Mode (UART_MOD) Register (D4/0x4103)
Stop bit
Use the STPB bit (D1/UART_MOD register) to select the stop bit length. When STPB is set to 0 (default), the
stop bit length is set to one bit; when STPB is set to 1, the stop bit length is set to two bits.
∗ STPB: Stop Bit Select Bit in the UART Mode (UART_MOD) Register (D1/0x4103)
Parity bit
Use the PREN bit (D3/UART_MOD register) to select whether the parity function is enabled or not. When
PREN is set to 0 (default), parity function is disabled. In this case, a parity bit will not be added to transfer
data and the parity check will not be performed when data is received. When PREN is set to 1, parity function
is enabled. In this case, a parity bit will be added to transfer data and the parity check will be performed when
data is received.
When the parity function is enabled, select a parity mode using the PMD bit (D2/UART_MOD register). When
PMD is set to 0 (default), the parity bit is added/checked as even parity; when PMD is set to1, the parity bit is
added/checked as odd parity.
∗ PREN: Parity Enable Bit in the UART Mode (UART_MOD) Register (D3/0x4103)
∗ PMD: Parity Mode Select Bit in the UART Mode (UART_MOD) Register (D2/0x4103)
Sampling clock (sclk•1/16)
CHLN = 0, PREN = 0, STPB = 0
CHLN = 0, PREN = 1, STPB = 0
CHLN = 0, PREN = 0, STPB = 1
CHLN = 0, PREN = 1, STPB = 1
CHLN = 1, PREN = 0, STPB = 0
CHLN = 1, PREN = 1, STPB = 0
CHLN = 1, PREN = 0, STPB = 1
CHLN = 1, PREN = 1, STPB = 1
18-4
s1
D0
D1
D2
s1
D0
D1
D2
s1
D0
D1
D2
s1
D0
D1
D2
s1
D0
D1
D2
s1
D0
D1
D2
s1
D0
D1
D2
s1
D0
D1
D2
Figure 18.4.1 Transfer Data Format
EPSON
D3
D4
D5
D6
s2
D3
D4
D5
D6
p
D3
D4
D5
D6
s2
D3
D4
D5
D6
p
D3
D4
D5
D6
D7
D3
D4
D5
D6
D7
D3
D4
D5
D6
D7
D3
D4
D5
D6
D7
s1: start bit, s2 & s3: stop bit, p: parity bit
S1C17704 TECHNICAL MANUAL
s2
s3
s2
s3
s2
p
s2
s2
s3
p
s2
s3

Advertisement

Table of Contents
loading

Table of Contents