Rev. 1.10
118
November 04, 2019
Rev. 1.10
119
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
•
Separately enabled transmitter and receiver
•
2-byte Deep FIFO Receive Data Buffer
•
RX pin wake-up function
•
Transmit and receive interrupts
•
Interrupts can be triggered by the following conditions:
♦
Transmitter Empty
♦
Transmitter Idle
♦
Receiver Full
♦
Receiver Overrun
♦
Address Mode Detect
MSB
LSB
…………………………
Transmitter Shift Register (TSR)
MSB
LSB
…………………………
Receiver Shift Register (RSR)
TX Pin
RX Pin
Baud Rate
Generator
UTXR_RXR Register
UTXR_RXR Register
Data to be transmitted
Data received
Buffer
f
H
MCU Data Bus
UART Data Transfer Block Diagram
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.