HT1635A/B Wearable Sports Bracelet LED Display Application
13 / 19
AN0393E
S/W Flowchart
The HT1635A/HT1635B demo board programs, written using assembly language,
include the main program, display subroutine, key scanning subroutine, power supply
detection subroutine, Li-battery power detection subroutine and timer interrupt subroutine,
etc. Owing to the different communication interfaces, there are two versions of programs
that have different data transfer methods but share the remaining subroutines. The main
program and several major subroutines will be described in the following section.
Main Program Flowchart
Start
Power supply
detection
MCU RAM and registers
and HT1635A/B initialisation
Li-battery power
detection
Key scanning
Update system clock
Update display
TB0F = 1 ?
1s finished ?
50ms finished ?
CLR WDT
TB0F = 0
Li-battery ?
Power On Delay 100ms
Battery
Power < 3.1V ?
Y
N
Y
N
Y
Y
Y
N
N
Figure 13 Main Program Flowchart