Download Print this page

Power Control Register; Auxiliary Register 1; Uart1 Mode 0 - STC micro STC8A8K64D4 Series Reference Manual

Advertisement

STC8A8K64D4 Series Manual

14.3.3 Power control register

Symbol
Address
PCON
87H
SMOD: double Baud rate of UART1 control bit.
0: disable double baud rate of the UART1.
1: enable double baud rate of the UART1.
SMOD0: Frame error detection control bit.
0: No frame error detection function, SCON.7 is SM0 function.
1: enable frame error detection function. The function of SM0/FE is FE.

14.3.4 Auxiliary register 1

Symbol
Address
AUXR
8EH
UART_M0x6: Baud rate select bit of UART1 while it works in mode 0.
0: The baud-rate of UART in mode 0 is SYSclk/12.
1: The baud-rate of UART in mode 0 is SYSclk/2.
S1ST2: UART1 baud rate generator select bit.
0: Select Timer 1 as the baud-rate generator of UART1.
1: Select Timer 2 as the baud-rate generator of UART1.

14.3.5 UART1 Mode 0

When mode 0 is selected for UART1, UART1 operates in synchronous shift register mode. When the serial port mode
0 communication speed setting bit UART_M0x6 is 0, the baud rate is fixed to SYSclk/12. When UART_M0x6 is 1, the baud
rate is fixed to SYSclk/2. RxD is used as serial communication data pin, TxD is used as synchronous shift pulse output pin.
8-bit data are transmitted and received, LSB first.
Transmission process of mode 0: Transmission is initiated by any instruction that write data to SBUF. The 8-bit datum
is output from the RxD pin at the baud rate of SYSclk/12 or SYSclk/2 (determined by the UART_M0x6 divided by 12 or 2),
from LSB to MSB. The TxD pin outputs the synchronous shift pulse signal. The interrupt flag TI will be set when transmittion
is completed. When the write signal is valid, the transmit control signal SEND is active (high) one clock apart, allowing RxD
to send data while allowing the TxD output the synchronous shift pulse. When a frame (8 bits) of datum is sent, all control
signals are reset to the original status, and only TI keeps high level and keeps the interrupt request status. TI must be cleared
by software before sending data again.
Receiving process of mode 0: Receiving is initiated by setting REN and the receive interrupt request flag RI=0. After
starting the receive process, RxD is the serial data input pin and TxD is the synchronous pulse output pin. The serial receiving
baud rate is SYSclk/12 or SYSclk/2 (determined by UART_M0x6 is 12 or 2). After receiving a frame of datum (8 bits), the
control signal is reset and the interrupt flag RI is set to 1, the interrupt requet status appears. RI must be cleared by software
for the next receiving data.
B7
B6
SMOD
SMOD0
B7
B6
T0x12
T1x12
UART_M0x6
B5
B4
B3
LVDF
POF
GF1
B5
B4
B3
T2R
T2_C/T
B2
B1
B0
GF0
PD
IDL
B2
B1
B0
T2x12
EXTRAM
S1ST2
- 374 -

Advertisement

loading
Need help?

Need help?

Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?

This manual is also suitable for:

Micro stc8a8k64d4-64pinMicro stc8a8k64d4-48pin