Holtek BS83B24C Manual page 122

Touch flash mcu
Table of Contents

Advertisement

UART External Pins
To communicate with an external serial interface, the internal UART has two external pins known
as TX and RX. The TX and RX pins are the UART transmitter and receiver pins respectively. The
TX and RX pin function should first be selected by the corresponding pin-shared function selection
register before the UART function is used. Along with the UMD bit, the UREN bit, the UTXEN and
URXEN bits, if set, will setup these pins to their respective TX output and RX input conditions and
disable any pull-high resistor option which may exist on the TX and RX pins. When the TX or RX
pin function is disabled by clearing the UMD, UREN, UTXEN or URXEN bit, the TX or RX pin
will be set to a floating state. At this time whether the internal pull-high resistor is connected to the
TX or RX pin or not is determined by the corresponding I/O pull-high function control bit.
UART Data Transfer Scheme
The above block diagram shows the overall data transfer structure arrangement for the UART. The
actual data to be transmitted from the MCU is first transferred to the UTXR_RXR register by the
application program. The data will then be transferred to the Transmit Shift Register from where it
will be shifted out, LSB first, onto the TX pin at a rate controlled by the Baud Rate Generator. Only
the UTXR_RXR register is mapped onto the MCU Data Memory, the Transmit Shift Register is not
mapped and is therefore inaccessible to the application program.
Data to be received by the UART is accepted on the external RX pin, from where it is shifted in,
LSB first, to the Receiver Shift Register at a rate controlled by the Baud Rate Generator. When the
shift register is full, the data will then be transferred from the shift register to the internal UTXR_
RXR register, where it is buffered and can be manipulated by the application program. Only the
UTXR_RXR register is mapped onto the MCU Data Memory, the Receiver Shift Register is not
mapped and is therefore inaccessible to the application program.
It should be noted that the actual register for data transmission and reception only exists as a single
shared register in the Data Memory. This shared register known as the UTXR_RXR register is used
for both data transmission and data reception.
UART Status and Control Registers
There are six control registers associated with the UART function. The UMD bit in the SIMC0
register can be used to select the UART mode. The UUSR, UUCR1 and UUCR2 registers control
the overall function of the UART, while the UBRG register controls the Baud rate. The actual data
to be transmitted and received on the serial interface is managed through the UTXR_RXR data
register. Note that UART related registers and their POR values are only available when the UART
mode is selected by setting the UMD bit in the SIMC0 register to "1".
Register
Name
SIMC0
SIM�
UUSR
UPERR
UUCR1
UREN
UUCR�
UTXEN
UTXR_RXR UTXRX� UTXRX6 UTXRX5 UTXRX4 UTXRX3 UTXRX� UTXRX1 UTXRX0
UBRG
UBRG�
Rev. 1.00
7
6
5
SIM1
SIM0
UMD
UN�
U�ERR
UOERR
UBNO
UPREN
UPRT
URXEN
UBRGH UADDEN UWAKE
UBRG6
UBRG5
UBRG4
UART Register List
1��
BS83B24C/BS83C40C
Touch Flash MCU
Bit
4
3
2
SIMDEB1 SIMDEB0
SIMEN
URIDLE
URXI�
UTIDLE
USTOPS UTXBRK
URX�
URIE
UTIIE
UBRG3
UBRG�
UBRG1
�e���a�� 0�� �01�
1
0
SIMIC�
UTXI�
UTX�
UTEIE
UBRG0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BS83B24C and is the answer not in the manual?

This manual is also suitable for:

Bs83c40c

Table of Contents