background image

        

HT1635A/B Wearable Sports Bracelet LED Display Application

 

 

 

16 / 19 

 

AN0393E 

Display Subroutine Flowchart 

Start

System On Mode?

Full screen white light on and blinks three times at a frequency of 0.5Hz

Welcome Mode?

Normal Display Mode?

Fuel Consumption 

Display Mode? 

Time Adjustment Mode?

After once scroll of HOLTEK logo and welcome characters,  enter the 

automatic demonstration screen. If the key is long-pressed, enter the normal 

display mode.

1. Time Display Mode: display the setup time.

2. Heart Beat Mode: display the heart rate.

3. Meter Step Mode: increase one step each 0.5s and clear to zero when 

reaching ten thousand steps. 

4. Connection Mode: enter the bluetooth connection screen automatically.

5. Charging Mode: enter the battery charging screen, after a full charge enter 

the time display mode.

6. Gaming Mode: enter Tetris game screen automatically. 

 Short-press the key to switch between sub-modes. If the previous mode is 

welcome mode, long-press the key to enter fuel consumption display mode. If 

the previous mode is time adjustment mode, long-press the key to enter 

welcome mode.

1. Fuel Consumption: switch between "FUEL" character and value screens 

every 2s.

2. Time: switch between "HOURS" character and time screens every 2s.

3. Calories Consumption: switch between "CALS" character and value screens 

every 2s.

4. Steps: switch between "STEPS" character and value screens every 2s.

5. Goal Completion Rate: switch between "GOAL" character and rate screens 

every 2s.

Short-press the key to switch between sub-modes. Long-press the key to 

enter time adjustment mode.

1. Adjust hour high digit, this digit blinks at a frequency of 1Hz.

2. Adjust hour low digit, this digit blinks at a frequency of 1Hz.

3. Adjust minute high digit, this digit blinks at a frequency of 1Hz.

4. Adjust minute low digit, this digit blinks at a frequency of 1Hz.

Short-press the key to adjust each digit value. Long-press the key to switch 

between digits. After all digits have been adjusted, long-press the key to enter 

normal display mode's sub-mode, time display mode.

N

N

N

N

Y

Y

Y

Return

N

Y

Y

 

Figure 16  Display Subroutine Flowchart 

The display subroutine is used to update the RGB LED Matrix display contents. There are 
five major modes, system on mode, welcome mode, normal display mode, fuel 
consumption display mode and time adjustment mode. Each of the last three modes has 
several sub-modes. Switching between these five major modes is achieved by a key long 
press. Switching between sub-modes under a major mode or adjusting a time digit value 
is achieved by a key short press. 

Содержание HT1635A

Страница 1: ...le in this application note to introduce how to use the HT1635A and HT1635B Each HT1635A or HT1635B device on the demo drives 8 commons and 42 rows of RGB LEDs 8 14 RGB LEDs showing the wearable sports bracelet LED panel display functions Operating Principles HT1635A and HT1635B Main Features Operating voltage 2 4V 5 5V Integrated 256kHz RC oscillator Frame Rate 100Hz Maximum display capacity 352 ...

Страница 2: ... strong current driving capacity for COM and ROW I Os more associated parameters are described below VDD 2 4V 5 5V Ta 25 C Symbol Parameter Test Conditions Min Typ Max Unit VDD Conditions VDD Operating Voltage 2 4 5 0 5 5 V IOL2 ROW Sink Current 5V VOL 0 5V 10 13 mA IOH2 ROW Source Current 5V VOH 4 5V 50 70 mA IOL3 COM Sink Current 5V VOL 0 5V 250 400 mA IOH3 COM Source Current 5V VOH 4 5V 45 60 m...

Страница 3: ... oscillator or from the external clock on the OSC pin as shown in the following table Name Master Slave Select Input Clock Source OSC Pin Status SYNC Pin Status Note RC Master Mode0 Master Mode On Chip RC Oscillator Output Hi Z Always Output High Only Single Chip Application RC Master Mode1 Output Output EXT CLK Master Mode0 Master Mode External OSC Input Always Output High Only Single Chip Applic...

Страница 4: ... PWM duty The blinking function will be in an off state It should be noted that data transfers on the 4 wire I 2 C bus should be avoided for more than 1ms following a power on reset to the devices to allow the reset initialisation operation to complete Dimming Circuit The HT1635A HT1635B devices have an integrated 16 level PWM dimming circuit The dimming circuit uses the command received by the in...

Страница 5: ...o HT1635B devices jointly drive an RGB LED Matrix composed of 8 commons and 28 rows Power Supply Circuit The power supply circuit provides three power supply methods AC power 100 240VAC power adapter DC5V Micro USB interface and a Li battery one 18650 DC DC Boost Circuit When only using the Li battery to supply power enable the DC DC boost IC SY7066 which will increase the battery voltage to 5V to...

Страница 6: ...E Application Circuits Figure 2 RGB LED Matrix Circuit The RGB LED Matrix PCB is available for the HT1635A and HT1635B Switching between these two devices can be achieved by using several 0Ω resistors therefore a general device name HT1635 is used in the schematic diagram ...

Страница 7: ... R7 VDD2 0 1uF C15 MCU_VDD 0 1uF C18 100K R15 100K R16 1nF C11 AD_BAT1V VBAT 10K R19 10R R20 KEY CSB1 RDB WRB DATA CSB2 ICPDA ICPCK RST AD_BAT1V IO_ACIN IO_BAT1_CHGEN L 3 N 2 V 4 V 5 FG 1 U1 FAS10 5 W MCU_VDD NC C16 220R R25 300R R22 D8 1N4148 FB 471 R26 330R R27 330R R28 330R R29 MCU_VDD RST ICPCK ICPDA 1 2 J3 Li BAT 3 7V Battery Box 1 2 3 4 5 J4 0R R33 IO_BOOSTEN NC R31 NC R32 MCU_VDD WRB DATA N...

Страница 8: ...rt is used to detect whether an external power adapter is connected When the MCU detects an AC power or an external power adapter the DC DC boost circuit will be turned off DC DC Boost Circuit Figure 6 DC DC Boost Circuit When there is no AC power or external power adapter connected the demo will use a Li battery to supply power When the battery voltage is higher than 3 1V the MCU IO_BOOSTEN port ...

Страница 9: ... 3K R18 VDD IO_BAT1_CHGEN D7 LED 10K R19 10R R20 1 2 J3 Li BAT 3 7V Battery Box IO_CHG_DET Q3 AO3400 ROW12 1 ROW11 2 ROW10 3 ROW9 4 ROW8 5 LED_VDD 6 ROW7 7 ROW6 8 ROW5 9 ROW4 10 ROW3 11 ROW2 12 ROW1 13 ROW0 14 VSS 15 OSC 16 DATA 17 WRB 18 RDB 19 CSB 20 SYNC 21 VDD 22 COM0 23 LED_VSS 24 COM1 25 COM2 26 COM3 27 COM4 28 COM5 29 COM6 30 COM7 31 LED_VSS 32 ROW43 33 ROW42 34 ROW41 35 ROW40 36 ROW39 37 R...

Страница 10: ...C6 VDD1 OSC SYNC CSB2 R45 R46 R47 R48 R49 R50 R51 R52 R53 R54 R55 R56 R57 R58 R59 R60 R61 R62 R63 R64 R65 R66 R67 R68 R69 R70 R71 R72 R73 R74 R75 R76 R77 R78 R79 R80 R81 R82 R83 R84 R43 R44 VDD2 0 1uF C7 VDD2 0 1uF C8 RDB2 NC R142 NC R143 NC R144 NC R145 VDD1 CSB2 R25 B24 G25 R20 G19 B19 R15 G15 B15 100R R151 2K R152 NC R153 1nF C17 RDB2 WRB DATA FB 471 R140 220R R141 NC C18 10R R85 1K R86 NC R87 ...

Страница 11: ...flow into the HT1635A HT1635B which will generate a device over temperature condition which could cause damaged To avoid unexpected damage this driving method is not suggested This demo uses a COM PMOS open drain driving method together with an external NMOS to drive the common cathode LED matrix Since the COM pins are set as PMOS open drain outputs when writing a logic 1 to these pins their integ...

Страница 12: ...re interface HT1635A chip selection 18 CSB2 4 wire interface HT1635A chip selection 19 WRB I2 C 4 wire interface serial clock 20 DATA I2 C 4 wire interface serial data 22 IO_BOOSTEN DC DC boost enable control 24 IO_USBIN External power adapter detection 25 IO_ACIN AC power detection 26 AD_BAT1V Li battery voltage detection 28 IO_BAT1_CHGEN Li battery charging enable control VIN 2 VOUT 3 GND 1 U2 H...

Страница 13: ...t 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 ...

Страница 14: ... and then communicate with the HT1635A HT1635B for initial setup In the main program loop the host MCU firstly detects the power supply method and then executes a key scanning system clock update and display update HT1635A HT1635B Initialisation Flowchart Start COM Driving Type Setup PMOS Blinking Frequency Setup Blinking Off PWM Duty Setup 16 16 PWM Duty Operating Mode Setup RC Master Mode0 SYS S...

Страница 15: ...riving Type Setup PMOS Figure 15 HT1635B Initialisation Flowchart I 2 C Interface Before the HT1635A HT1635B can drive the LED Matrix some initialisation setup should first be executed such as address setup only for the HT1635B COM driving type setup blinking frequency setup PWM duty setup operating mode setup system setup and LED setup etc After all these initialisation setups are completed the H...

Страница 16: ...witch between HOURS character and time screens every 2s 3 Calories Consumption switch between CALS character and value screens every 2s 4 Steps switch between STEPS character and value screens every 2s 5 Goal Completion Rate switch between GOAL character and rate screens every 2s Short press the key to switch between sub modes Long press the key to enter time adjustment mode 1 Adjust hour high dig...

Страница 17: ... digit value Sixth long press Switch to minute low digit adjustment mode short press key to adjust this digit value Seventh long press Eighth long press Switch to welcome mode Short pressing key is not valid Long press key to clear the counter to zero Return Switch to normal display mode Under this mode short press key to switch between sub modes N Y N N N Y Y Y N N N N Y Y Y Y Figure 17 Touch Key...

Страница 18: ...ed off Then when a 1860 Li battery is placed in the battery holder the battery charging function will be turned on Li battery Power Detection Subroutine Flowchart Start Turn off DC DC boost circuit Turn off Li battery charging Clear HT1635A B RAM data Li battery power 3 1V Turn on DC DC boost circuit Turn off Li battery charging Return Li battery power supply System On Mode Turn off Li battery cha...

Страница 19: ...lock source fs fSYS 4 I O or Reset function RESB SIM Function Disable LVR Function Enable LVR Voltage Selection 2 10V Conclusions This application note has introduced the HT1635A HT1635B main features and used some example code and application circuits to show how to use the HT1635A HT1635B LED driving functions Attachments Source Code Files 4 wire Interface Communication CODE I 2 C Interface Comm...

Отзывы: