background image

        

HT1635A/B Wearable Sports Bracelet LED Display Application

 

 

 

12 / 19 

 

AN0393E 

MCU Control Circuit 

 

Figure 12  MCU Control Circuit 

As the host MCU, the HT66F50 is mainly used to transfer data with the HT1635A/B via a 
4-wire interface or an I

2

C interface and control the driver device to drive the RGB LED 

Matrix for various display functions. In addition, the HT66F50 detects whether AC power 
or an external power adapter is connected. It uses its A/D converter to sample the battery 
voltage, controls the APL3202 to charge the battery or not and determines whether the 
SY7066 is turned on for a battery voltage boost function. The HT66F50 has an integrated 
12-bit SAR A/D converter, whose reference voltage is provided by the MCU operating 
voltage being regulated to 2.5V using the HT7125. In the figure above, the pin header J5 
is used for the HT1635A/HT1635B power and interface pins connection. J4 is used for the 
HT66F50 In-Circuit programming pin connection. 

 

HT66F50 I/O Control Functions: 

MCU Pin 

Circuit Label 

Control Function 

IO_CHG_DET 

APL3202 charging status detection 

15 

KEY 

Detects the key used for switching display functions 

16 

RDB 

4-wire interface read serial clock 

17 

CSB1 

4-wire interface HT1635A chip selection 

18 

CSB2 

4-wire interface HT1635A chip selection 

19 

WRB 

I

2

C/4-wire interface serial clock 

20 

DATA 

I

2

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

G

N

D

1

U2

HT7125-SOT89

ADC_VREF

0.1uF

C13

10uF

C14

MCU_VDD

100K

R21

0.1uF

C17

ADC_VREF

R

ES

ET

_K

EY

PA0/C0X/TP0_0/AN0

1

VSS/AVSS

2

PB4/XT2

3

PB3/XT1

4

PB2/OSC2

5

PB1/OSC1

6

VDD

7

PB0/RES

8

PC1/TP1B_1/SCOM1

9

PC0/TP1B_0/SCOM0

10

PC7/[TP1A]/SCOM3

11

PC6/[TP0_0]/SCOM2

12

PD3/[TCK1]/TP3_0/[SDO]

13

PD2/[TCK0]/[SDI/SDA]

14

PD1/[TP2_0]/[SDO]/[SCK/SCL]

15

PD0/[TCK2]/TP3_1/[SCS]

16

PC5/[INT1]/TP0_1/TP1B_2/[PCK]

17

PC4/[INT0]/[PINT]/TCK3/TP2_1

18

PC3/PINT/TP2_0/C1-

19

PC2/TCK2/PCK/C1+

20

PB5/SCS/VREF

21

PA7/SCK/SCL/AN7

22

PA6/SDI/SDA/AN6

23

PA5/C1X/SDO/AN5

24

PA4/INT1/TCK1/AN4

25

PA3/INT0/C0-/AN3

26

PA2/TCK0/C0+/AN2

27

PA1/TP1A/AN1

28

U5

HT66F50-28SOP-A

0.1uF

C15

MCU_VDD

0.1uF

C18

KEY

CSB1

RDB

WRB

DATA

CSB2

ICPDA

ICPCK

RST

AD_BAT1V

IO_ACIN

IO_BAT1_CHGEN

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

3

4

5

J4

IO_BOOSTEN

NC

R31

NC

R32

MCU_VDD

W

R

B

D

A

TA

NC

R24

330R

R30

IO_CHG_DET

0R

R23

IO_USBIN

CSB1

RDB

WRB

DATA

CSB2

KEY

1

12

2

11

3

10

4

9

5

8

6

7

J5

GND1

VDD2

VDD1

Содержание 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...

Отзывы:

Похожие инструкции для HT1635A