Rev. 1.10
116
November 04, 2019
Rev. 1.10
117
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
When an I
2
C time-out counter overflow occurs, the counter will stop and the SIMTOEN bit will
be cleared to zero and the SIMTOF bit will be set high to indicate that a time-out condition has
occurred. The time-out condition will also generate an interrupt which uses the USIM interrupt
vector. When an I
2
C time-out occurs, the I
2
C internal circuitry will be reset and the registers will be
reset into the following condition:
Registers
After I
2
C Time-out
SIMD, SIMA, SIMC0
No change
SIMC1
Reset to POR condition
I
2
C Registers after Time-out
The SIMTOF flag can be cleared by the application program. There are 64 time-out periods which
can be selected using SIMTOS bit field in the SIMTOC register. The time-out time is given by the
formula: ((1~64)×32)/f
SUB
. This gives a time-out period which ranges from about 1ms to 64ms.
• SIMTOC Register
Bit
7
6
5
4
3
2
1
0
Name
SIMTOEN SIMTOF SIMTOS5 SIMTOS4 SIMTOS3 SIMTOS2 SIMTOS1 SIMTOS0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7
SIMTOEN
: USIM I
2
C Time-out control
0: Disable
1: Enable
Bit 6
SIMTOF
: USIM I
2
C Time-out flag
0: No time-out occurred
1: Time-out occurred
This bit is set high when time-out occurs and can only be cleared by application
program.
Bit 5~0
SIMTOS5~SIMTOS0
: USIM I
2
C Time-out period selection
I
2
C time-out clock source is f
SUB
/32.
I
2
C time-out time is equal to (SIMTOS[5:0]+1)×(32/f
SUB
).
UART Interface
The device contains an integrated full-duplex asynchronous serial communications UART interface
that enables communication with external devices that contain a serial interface. The UART function
has many features and can transmit and receive data serially by transferring a frame of data with
eight or nine data bits per transmission as well as being able to detect errors when the data is
overwritten or incorrectly framed. The UART function shares the same internal interrupt vector
with the SPI and I
2
C interfaces which can be used to indicate when a reception occurs or when a
transmission terminates.
The integrated UART function contains the following features:
•
Full-duplex, asynchronous
communication
•
8 or 9 bits character length
•
Even, odd or no parity options
•
One or two stop bits
•
Baud rate generator with 8-bit prescaler
•
Parity, framing, noise and overrun error detection
•
Support for interrupt on address detect (last character bit=1)