HT16D35A Single Colour Matrix LED Display Application ...HT16D35A Single-colour Matrix LED Display...
Transcript of HT16D35A Single Colour Matrix LED Display Application ...HT16D35A Single-colour Matrix LED Display...
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 1 / 16 April 20, 2017
HT16D35A Single Colour Matrix LED Display Application Example
D/N: AN0453E
Introduction The Holtek HT16D35A is an LED driver IC which includes an integrated display data
memory. It communicates with MCUs via a 3-wire serial interface and can drive up to 72
RGB LEDs composed of 8 rows × 9 commons or 224 single-colour LEDs composed of 8
rows × 28 commons. A range of colour display functions are also provided, such as
scrolling, blinking, fade, matrix masking, universal COMs and universal segments.
In this application note, a demo in which the HT66F4390 is used as the master control
MCU together with four HT16D35A ICs, is provided to demonstrate how to drive LEDs to
show various HT16D35A display functions. Each single HT16D35A drives 8COM ×
28ROW red colour LEDs.
Functional Description
ROW Pin Constant Current Outputs
Each tow in the HT16D35A has the capability of providing a constant current output. This
means that the output current will remain unchanged regardless of variations in the LED
forward voltage. When driving a dot matrix LED panel, this constant current will ensure that
the display maintains a uniform brightness. The output current is setup using an external
resistor connected to the R_EXT pin and has a maximum value of 45mA. The following
formula shows the relationship between the R_EXT resistance and the output current.
IROW_MAX[A] = 15 / R_EXT (Ω) (Typ.)
The output current can be further adjusted by using the Constant Current Ratio command.
Command Adjustable Range Write Command Constant current ratio 9/16 IROW_MAX ~ IROW_MAX 36H
Binary and Gray Modes
The HT16D35A supports two display modes, Binary Mode and Gray Mode. In the Binary
Mode, the LED has two states, i.e. either on or off. A logic “1” in the RAM bit-map
indicates an “on” state of the corresponding LED. Similarly a logic “0” indicates an “off”
state. In the Gray Mode, each RGB colour supports a 64 level gray scale setting,
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 2 / 16 April 20, 2017
therefore a RGB LED can display up to 260 thousand colours. As the demo in this
application note is dealing with a single-colour display, the following description will only
show the display effects in the Binary Mode.
Display Mode
Display Memory
A single RGB LED Supported Colours Supported Display Effects
Write Command
Binary Mode 28×8-bit
7 colours (red, green, blue, yellow, magenta, cyan, white)
Window Masking, Scrolling, UCOM, USEG, Global Blinking/Fade, Direct Pin 31H
Gray Mode 28×8×6-bit 260k colours
Window Masking, Matrix Masking, Scrolling, UCOM, USEG, Global Blinking/Fade,
Blinking/Fade, Direct Pin 31H
Blinking and Fade Effects
A blinking effect is where the LED flashes with a fixed rate while the fade effect is where
the LED flashes with a fixed rate accompanied by a gradual change in brightness. The
HT16D35A contains two kinds of blinking and fade display effects. One is the Global
Blinking/Fade mode which implements effects on all of the LEDs while the other is the
Blinking/Fade mode which implements effects on a single RGB LED. The Blinking/Fade
mode is available only in the Gray Mode. The BKEN bit (38H.1) and FDEN bit (38H.0) in
the Mode Control (38H) are the two mode enable control bits. As the demo in this
application note is dealing with a single-colour display only the Global Blinking/Fade
effect will be shown.
Display Effect Display Mode Delay Time Blinking
Time Fade
RAM Size Enable Setting
Write Command
Global Blinking/ Fade
Binary Mode/ Gray Mode No delay
Off, 1s, 2s, 4s None BKEN=1 33H
Blinking/Fade Gray Mode No delay, 1/4 slope time, 2/4 slope time, 3/4 slope time Off,
1s, 2s, 4s 28×8 ×6-bit FDEN=1 82H
UCOM and USEG Effects
By using the UCOM command the column colours can be swapped. By using the USEG
command the row colours can be swapped or the colour of one row can be copied to
other rows.
Display Effect Display Mode RAM Size
Enable Setting
Write Command Note
UCOM Binary Mode/Gray Mode 8x8-bit UCEN=1 84H Invalid in Scrolling mode USEG Binary Mode/Gray Mode 28x8-bit USEN=1 86H Invalid in Scrolling mode
UCOM effect: Swap the column colours.
Initial Display UCOM Settings
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 3 / 16 April 20, 2017
Display Effect with UCOM Settings
USEG effect:
1. Swap the row colours.
2. Copy the colour of one row to other rows. The figure below shows the effect which copies the colour of Row 0 to Row 0~ Row 2.
Row 0
Row12
Row28
Row 0
Row12
Row28
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 4 / 16 April 20, 2017
Scrolling Effects
By using the scrolling function, each dot can be set to scroll left, scroll right, scroll up,
scroll down, scroll upper left, lower left, upper right or lower right. The horizontal and
vertical scrolling speeds can be setup individually. The different horizontal and vertical
speeds make the display more flexible.
No. Scrolling Direction Display Mode
Enable Setting
Scrolling Control Scrolling Speed Note
1
Binary Mode/ Gray Mode
SCEN=1
VEN=0, HEN=1,
UD=X, RL=1
Both the vertical and horizontal scrolling speed can be set within a range of 16 Frames to 256 Frames. The scrolling speeds in these two directions can be different.
The UCOM and USEG functions are invalid in the scrolling mode.
2
VEN=0, HEN=1,
UD=X, RL=0
3
VEN=1, HEN=0,
UD=0, RL=X
4
VEN=1, HEN=0,
UD=1, RL=X
5
VEN=1, HEN=1,
UD=0, RL=1
6
VEN=1, HEN=1,
UD=1, RL=1
7
VEN=1, HEN=1,
UD=0, RL=0
8
VEN=1, HEN=1,
UD=1, RL=0
Window Masking and Matrix Masking Effects
The Window Masking function is available in both the Binary Mode and the Gray Mode.
However when the Window Masking function is enabled, the display settings must be
implemented in a whole row or whole column units. The overlapping parts of the rows
and columns which are both 1 can be displayed while other dots are masked. The Matrix
Masking function is available only in the Gray Mode. The device includes a static 28×8-bit
matrix masking RAM. A logic “1” in the RAM bit-map indicates a “mask on” state of the
corresponding LED. Similarly a logic “0” indicates a “mask off” state. The Window
Left
Right
Up
Down
Left+Down
Left+Up
Right+Up
Right+Down
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 5 / 16 April 20, 2017
Masking function has a higher priority than the Matrix Masking. As the demo in this
application deals with a single-colour display, only the Window Masking effect will be
shown.
Display Effect Display Mode Display Control Lit Unit RAM Size
Enable Setting
Write Command
Window Masking Binary Mode/ Gray Mode
1: Display 0: Masked
A whole row or a whole column None None 41H, 42H
Matrix Masking Gray Mode 1: Masked 0: Display Each dot 28×8-bit MKEN 88H
Hardware Description
Hardware Block Diagram
The Demo PCB board consists of a two-layer structure using a top board and a lower
board which are connected using dual row pin headers. The top board is the red colour
LED dot matrix display board while the lower board is the MCU board for the power
control.
Mono LED Matrix
Four HT16D35A devices are cascaded together to drive a 16×56 red colour LED dot
matrix display.
Power Circuit
A DC 5V/3A power adapter is used for the power supply.
USB Communication Circuit
Using the USB interface, the data on the UI can be transmitted to the MCU HT66F4390,
and then be saved into the FLASHROM MX25L8006E.
Display Circuit
PC User Interface
Power Circuit
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 6 / 16 April 20, 2017
FLASHROM Data Storage Circuit
In the User Mode, the data in the FLASHROM MX25L8006E will be read and then be
displayed on the screen.
Touchkeys
Five touch keys are provided to display figure switching. One toggle switch is used to
switch between the Demo Mode and the User Mode.
MCU
The MCU, which here is a HT66F4390, is used to communicate with the HT16D35A to
implement the displays.
Application Circuits
Demo Operational Schematic
COM1_0
RO
W0
RO
W1
RO
W2
RO
W3
RO
W4
RO
W5
RO
W6
RO
W7
RO
W8
RO
W9
RO
W10
RO
W11
RO
W12
RO
W13
RO
W14
RO
W15
RO
W16
RO
W17
RO
W18
RO
W19
RO
W20
RO
W21
RO
W22
RO
W23
RO
W24
RO
W25
RO
W26
RO
W27
COM1_1
COM1_2
COM1_3
COM1_4
COM1_5
COM1_6
COM1_7
RO
W56
RO
W57
RO
W58
RO
W59
RO
W60
RO
W61
RO
W62
RO
W63
RO
W64
RO
W65
RO
W66
RO
W67
RO
W68
RO
W69
RO
W70
RO
W71
RO
W72
RO
W73
RO
W74
RO
W75
RO
W76
RO
W77
RO
W78
RO
W79
RO
W80
RO
W81
RO
W82
RO
W83
COM4_0
COM4_1
COM4_2
COM4_3
COM4_4
COM4_5
COM4_6
COM4_7
RO
W28
RO
W29
RO
W30
RO
W31
RO
W32
RO
W33
RO
W34
RO
W35
RO
W36
RO
W37
RO
W38
RO
W39
RO
W40
RO
W41
RO
W42
RO
W43
RO
W44
RO
W45
RO
W46
RO
W47
RO
W48
RO
W49
RO
W50
RO
W51
RO
W52
RO
W53
RO
W54
RO
W55
RO
W84
RO
W85
RO
W86
RO
W87
RO
W88
RO
W89
RO
W90
RO
W91
RO
W92
RO
W93
RO
W94
RO
W95
RO
W96
RO
W97
RO
W98
RO
W99
RO
W10
0
RO
W10
1
RO
W10
2
RO
W10
3
RO
W10
4
RO
W10
5
RO
W10
6
RO
W10
7
RO
W10
8
RO
W10
9
RO
W11
0
RO
W11
1
COM2_0
COM2_1
COM2_2
COM2_3
COM2_4
COM2_5
COM2_6
COM2_7
COM3_0
COM3_1
COM3_2
COM3_3
COM3_4
COM3_5
COM3_6
COM3_7
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 7 / 16 April 20, 2017
Fig.1 HT16D35A Single Colour Matrix LED Display Board Circuit
Fig.2 HT16D35A Power Control Board Circuit
R13 0R/0805
Connector
Power
MCU
NC1
NC2
PA0/OCDSDA3
UDN/GPIO04
UDP/GPIO15
V33O6
PE1/UBUS/VDD7
HVDD8
VSS9
PE7/RES10
PE3/OSC211
PE2/OSC112
PC7/STCK/SDA13
PC6/PTCK/SCL14
NC15
NC16
PC5/
CTC
K1
17
PC4/
CTC
K0
18
PC3/
STPB
19
PC2/
PTPB
20
PC1/
CTP
1B21
PC0/
CTP
0B22
PF7
23
PF6
24
PF5
25
PF4
26
CD
ET27
CIO
28
CC
829
CC
LK30
CC
431
CR
ST32
CRDVDD 33VO 34
CVSS 35SELF 36
PF3/STP 37PF2/PTP 38
PF1/CTP1 39PF0/CTP0 40
AVDD 41XT2 42XT1 43
AVSS 44PB0/SDO1/AN0 45PB1/SDI1/AN1 46
PB2/SCK1/AN2 47PB3/SCS1/AN3 48
NC
49N
C50
PB5/
STPI
/TX
1/A
N5
52PB
6/IN
T0/R
X1/
AN
653
PB7/
VR
EF/A
N7
54PE
0/V
DD
IO55
PA7/
SCS0
/C1-
56PA
6/SC
K0/
C1+
57PA
5/SD
I0/C
1X58
PA4/
SDO
0/C
0-59
PA3/
TX0/
C0+
60PA
2/O
CD
SCK
61PA
1/R
X0/
C0X
62N
C63
NC
64
PB4/
PTPI
/INT1
/AN
451
U1
HT66F4390-64LQFP
12Y1 6MHz
100K
R34
0.1uF
C25
RES
ET_K
EY
D3
1N4148
300RR35
VDD1
RST
47pF
C18
33RR16
33RR17
47pF
C170.1uFC19VDD1
0.1uF
C21
10uF
C20
0.1uF
C22
RST
RSTICPCKICPDA
12345
J1
ICPDA
ICPC
K
VDD1
10uF
C23
0.1uF
C24
IO_U
SB_D
-
IO_U
SB_D
+
0RR22
0RR23
0RR
210R
R20
IO_16D35_DIO
IO_16D35_CLK
IO_1
6D35
_CSB
2IO
_16D
35_C
SB1
IO_F
R_C
SIO
_FR
_CLK
IO_F
R_M
OSI
IO_F
R_M
ISO
0RR
28
0RR
300R
R31
0RR
32
0RR
190R
R18
IO_1
6D35
_CSB
4IO
_16D
35_C
SB3
IO_K
EY_F
UN
CTI
ON
IO_K
EY_P
LAY
IO_K
EY_M
ENU
IO_K
EY_U
P
IO_K
EY_D
OW
N
0RR
250R
R26
0RR
27
0RR
33
0RR
24
Mode1
R12 0R/0805R11 0R/0805R10 0R/0805R9 0R/0805
R8 0R/0805
CS#1
SO/SIO12
WP#3
GND4 SI/SIO0 5SCLK 6
HOLD# 7VCC 8
U3
MX25L6406E/8 SOP
10KR15
IO_FR_CLKIO_FR_MOSI
IO_FR_MISOIO_FR_CS 0.1uFC16
3.3V
3.3V
FlashROM
R7 0R/0805
R6 0R/0805
R4 0R/0805
R1 0R/0805
R3 0R/0805
R2 0R/0805LED_VDD
D2SS54
D1TVS/SMAJ6.0CA
12
J3
PowerIn
3.3V
VDD1LED_VDD
VDD1LED_VDD
IO_16D35_CSB3
IO_16D35_CSB1
IO_16D35_CLKIO_16D35_DIO
1 23 45 67 89 1011 1213 1415 16
J4
LED Matrix
IO_KEY_MENUIO_KEY_FUNCTION
IO_16D35_CLKIO_16D35_DIO
VDD1LED_VDD
VDD1LED_VDD IO_16D35_CSB2
IO_16D35_CSB4
1 23 45 67 89 1011 1213 1415 16
J5
LED Matrix
IO_KEY_PLAY
IO_KEY_UPIO_KEY_DOWN
VDD
1
IN2 OUT 3
GND
U2
HT7333
VDD1
0.1uF
C14
10uF
C15
3.3V
R14 0R/0805
R5 0R/0805
0RR
29
VDD1
100uFC1
100uFC3
0.1uFC2
0.1uFC4
0.1uFC6
0.1uFC13VDD1
0.1uFC12VDD1
0.1uFC11VDD1
0.1uFC10VDD1
0.1uFC9VDD1
0.1uFC8
0.1uFC7LED_VDD
LED_VDD0.1uFC5
LED_VDD
0RR37
12345
J2
USB
IO_USB_D-IO_USB_D+
NCR36VDD1
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 8 / 16 April 20, 2017
Power Circuit
Fig.3 Demo Power Supply Circuit
In the Demo, a 5V/3A power adapter is provided for the power supply. The MCU VDD,
the four HT16D35A VDD and the LED_VDD lines are routed and powered individually.
The HT7333 provides a 3.3V voltage for the FLASHROM MX25L8006E operations.
FLASHROM Data Storage Circuit
Fig.4 FLASHROM Data Storage Circuit
The data on the UI can be transmitted to the MCU via the USB interface, and then be
saved into the FLASHROM. During display operations, a frame of display data can be
read from the FLASHROM by the MCU and then transmitted to the HT16D35A to
implement this display.
Mono LED Matrix Drive Circuit
Fig.5 Single HT16D35A Driver Circuit
R13 0R/0805R12 0R/0805R11 0R/0805R10 0R/0805R9 0R/0805
R8 0R/0805
R7 0R/0805
R6 0R/0805
R4 0R/0805
R1 0R/0805
R3 0R/0805
R2 0R/0805LED_VDD
D2SS54
D1TVS/SMAJ6.0CA
12
J3
PowerIn
VDD
1
IN2 OUT 3
GND
U2
HT7333
VDD1
0.1uF
C14
10uF
C15
3.3V
R14 0R/0805
R5 0R/0805100uFC1
100uFC3
0.1uFC2
0.1uFC4
0.1uFC6
0.1uFC13VDD1
0.1uFC12VDD1
0.1uFC11VDD1
0.1uFC10VDD1
0.1uFC9VDD1
0.1uFC8
0.1uFC7LED_VDD
LED_VDD0.1uFC5
LED_VDD
CS#1
SO/SIO12
WP#3
GND4 SI/SIO0 5SCLK 6
HOLD# 7VCC 8
U3
MX25L6406E/8 SOP
10KR15
IO_FR_CLKIO_FR_MOSI
IO_FR_MISOIO_FR_CS 0.1uFC16
3.3V
3.3V
U1_
CO
M0
LED_VDD
U1_
CO
M1
U1_
CO
M2
U1 _
CO
M3
U1 _
CO
M4
U1_
CO
M5
U1_
CO
M6
U1_
CO
M7
LED_VDD
0.1uF
C2
0.1uF
C3
3KR97
0RR101
0RR
102
NCC13
NCC15
NC
C17
VDD1
0.1uF
C1 OSC1 0RR980RR990RR100IO_16D35_CLK
IO_16D35_DIO
IO_16D35_CSB1
NCC14
NCC16
ROW31
ROW22
ROW13
ROW04
R_EXT5
VSS6
VDD7
OSC8
DIO9
CLK10
CSB11
SYNC12
CO
M0
13
LED
_VD
D1 4
CO
M1
1 5
CO
M2
1 6
CO
M3
17
CO
M4
18
CO
M5
1 9
CO
M6
2 0
LED
_VD
D2 1
CO
M7
22
RO
W27
23
RO
W26
24
ROW25 25ROW24 26ROW23 27
LED_VSS 28ROW22 29ROW21 30ROW20 31ROW19 32ROW18 33ROW17 34ROW16 35ROW15 36
RO
W14
37R
OW
1338
RO
W12
3 9R
OW
114 0
RO
W10
4 1R
OW
94 2
RO
W8
43R
OW
744
RO
W6
4 5R
OW
54 6
LED
_VSS
4 7R
OW
448
U1
HT16D35A-48LQFP
ROW0ROW1ROW2ROW3
RO
W9
RO
W8
RO
W7
RO
W6
RO
W5
RO
W14
RO
W13
RO
W12
RO
W11
RO
W10
ROW21ROW20ROW19ROW18ROW17
ROW25ROW24ROW23
ROW22
RO
W4
ROW16ROW15
RO
W27
RO
W26
0RR1210RR1220RR1230RR124
0RR
125
0RR
126
0 RR
1 27
0RR
1 28
0RR
1 29
0 RR
130
0 RR
131
0 RR
1 32
0 RR
133
0RR
134
0RR
135
0RR1360RR1370RR1380RR1390RR1400RR1410RR1420RR143
0RR1440RR1450RR146
0RR
147
0RR
148
SYN
C1
OSC2
0RR
236
0RR234
SYN
C2
0RR233
0RR
235
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 9 / 16 April 20, 2017
Fig.6 Single Red-colour LED Drive Circuit
On the LED display board, four HT16D35A ICs are used. Each of them drives 8×28 dot
red LEDs forming a 16×56 red colour LED matrix. The LED types used in the demo are
the EVERLIGHT 19-217 red colour SMD LEDs. Each ROW in the HT16D35A has a
constant current output capability which means the output current remains constant
regardless of variations in the LED forward voltage. In the single HT16D35A driver circuit
as shown in fig.5, the R121 to R148 resistors connected to the ROW pins are reserved
current limiting resistors in the demo board and can be used in actual applications. The
anodes of the LEDs controlled by the same COM output are all connected to the same
PMOS transistor (AO3401) drain side. The HT16D35A COM outputs are setup as scan
high level types while the COM I/Os are used to control the external PMOS transistor
ON/OFF function. This increases the COM drive capability. When the dot matrix LEDs
are all lit up, the operating current will not exceed 1A. C1~C3 are power filtering
capacitors and C13~C17 are ESD protection components.
Touchkey Detection Circuit
Fig.7 Display Board Touchkey Circuit
Fig.8 Power Control Board Switch Circuit
The five touch keys shown in the fig.7 are used to switch the display functions of the
Mono LED Matrix. The Play key is a reserved key and provides no functions in this demo.
When one key is pressed, the corresponding I/O will be at a low level. TVS1~TVS5 are
ESD protection components. The Mode switch shown in fig.8 is used to switch the
system between the Demo Mode and the User Mode. When a high level is detected on
PF0, the system will operate in the Demo Mode. If a low level is detected, the system will
operate in the User Mode.
ROW0
10RR2 1K
R1
NCR3
U1_COM0
LED_VDD
Q1AO3401
TVS1
SMA
J6.0CA
TVS2
SMA
J6.0CA
TVS3
SMA
J6.0CA
TVS4
SMA
J6.0CA
TVS5
SMA
J6.0CA
FunctionMenuUpDownPlay
PB4PB5
PB6PB7PA3
ModePF0
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 10 / 16 April 20, 2017
MCU Control Circuit
Fig.9 MCU Control Circuit
The HT66F4390 is used as the master control MCU and takes care of two main parts. In
the Demo Mode, the MCU transfers the ROM table data to the HT16D35A via the SPI
interface to implement different LED display patterns. In the User Mode, the MCU
communicates with the UI via the USB interface and transfers the data from the UI to the
FLASHROM. After this the data can be read out to implement the corresponding Mono
LED Matrix display.
The HT66F4390 I/Os implement the following control functions:
Control Type MCU Pin No. Signal Label Control Function
USB Communication 4 IO_USB_D- USB UDN line 5 IO_USB_D+ USB UDP line
HT16D35A Chip Selection
17 IO_16D35_CSB4 No.4 HT16D35A chip selection control pin 18 IO_16D35_CSB3 No.3 HT16D35A chip selection control pin 19 IO_16D35_CSB2 No.2 HT16D35A chip selection control pin 20 IO_16D35_CSB1 No.1 HT16D35A chip selection control pin
Communication with HT16D35A (SPI)
45 IO_16D35_DIO Serial data output pin - communicates with the HT16D35A
47 IO_16D35_CLK Serial clock output pin - communicates with the HT16D35A
Touchkey State Detection
51 IO_KEY_FUNCTION Function key input detection 52 IO_KEY_MENU Menu key input detection 53 IO_KEY_PLAY Play key input detection 54 IO_KEY_DOWN Down key input detection 60 IO_KEY_UP Up key input detection
Communication with FLASHROM (SPI)
56 IO_FR_CS FLASHROM chip select control pin
57 IO_FR_CLK Serial clock output pin - communicates with the FLASHROM
58 IO_FR_MISO Serial data input pin - communicates with the FLASHROM
59 IO_FR_MOSI Serial data output pin - communicates with the FLASHROM
NC1
NC2
PA0/OCDSDA3
UDN/GPIO04
UDP/GPIO15
V33O6
PE1/UBUS/VDD7
HVDD8
VSS9
PE7/RES10
PE3/OSC211
PE2/OSC112
PC7/STCK/SDA13
PC6/PTCK/SCL14
NC15
NC16
PC5/
CTC
K1
17
PC4/
CTC
K0
18
PC3/
STPB
19
PC2/
PTPB
20
PC1/
CTP
1B21
PC0/
CTP
0B22
PF7
23
PF6
24
PF5
25
PF4
26
CD
ET27
CIO
28
CC
829
CC
LK30
CC
431
CR
ST32
CRDVDD 33VO 34
CVSS 35SELF 36
PF3/STP 37PF2/PTP 38
PF1/CTP1 39PF0/CTP0 40
AVDD 41XT2 42XT1 43
AVSS 44PB0/SDO1/AN0 45PB1/SDI1/AN1 46
PB2/SCK1/AN2 47PB3/SCS1/AN3 48
NC
49N
C50
PB5/
STPI
/TX
1/A
N5
52PB
6/IN
T0/R
X1/
AN
653
PB7/
VR
EF/A
N7
54PE
0/V
DD
IO55
PA7/
SCS0
/C1-
56PA
6/SC
K0/
C1+
57PA
5/SD
I0/C
1X58
PA4/
SDO
0/C
0-59
PA3/
TX0/
C0+
60PA
2/O
CD
SCK
61PA
1/R
X0/
C0X
62N
C63
NC
64
PB4/
PTPI
/INT1
/AN
451
U1
HT66F4390-64LQFP
12Y1 6MHz
100K
R34
0.1uF
C25
RES
ET_K
EY
D3
1N4148
300RR35
VDD1
RST
47pF
C18
33RR16
33RR17
47pF
C170.1uFC19VDD1
0.1uF
C21
10uF
C20
0.1uF
C22
RST
RSTICPCKICPDA
12345
J1
ICPDA
ICPC
K
VDD1
10uF
C23
0.1uF
C24
IO_U
SB_D
-
IO_U
SB_D
+
0RR22
0RR23
0RR
210R
R20
IO_16D35_DIO
IO_16D35_CLK
IO_1
6D35
_CSB
2IO
_16D
35_C
SB1
I O_F
R_C
SIO
_FR
_CLK
IO_F
R_M
OSI
IO_F
R_M
ISO
0RR
28
0RR
300R
R31
0RR
32
0RR
190R
R18
IO_1
6D35
_CSB
4IO
_16D
35_C
SB3
IO_K
EY_F
UN
CTI
ON
IO_K
EY_P
LAY
IO_K
EY_M
ENU
IO_K
EY_U
P
IO_K
EY_D
OW
N
0RR
250R
R26
0RR
27
0RR
33
0RR
24
Mode1
3.3V
0RR
29
VDD10RR37
12345
J2
USB
IO_USB_D-IO_USB_D+
NCR36VDD1
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 11 / 16 April 20, 2017
Software Description
Display Description
The Demo display content can be divided into two parts:
Demo Mode: When the Mode switch is turned on to the right “Demo”, the Demo mode is
enabled. The HT66F4390 can read out the data stored in the ROM using the look-up
table and transfer the data to the HT16D35A. The data is written into the HT16D35A
display data RAM and finally shown on the LED Matrix display. Switching between the
main modes is achieved by using the Menu key. After entering a Main mode, press the
Function key to enter the first sub mode of the main mode. Then press the Up or Down
keys to select the previous or next sub mode. The Play key is reserved. The display
content is shown in the following table.
No. Main Mode Sub Mode 1 Welcome Mode None
2 FFT Display Mode Cyclic switching between 7 combination colour FFT displays using the Up/Down key.
3 Breathing light Mode Cyclic switching between 7 colour breathing effect displays using the Up/Down key.
4 Moving Display Mode Cyclic switching between the moving displays using the Up/Down keys.
5 Window Masking Display Mode Cyclic switching between 3 Window Masking pattern displays using the Up/Down key.
6 Scrolling Display Mode Cyclic switching between 8 Scrolling pattern displays using the Up/Down keys.
7 USEG Display Mode Cyclic switching between 3 USEG pattern displays using the Up/Down key.
8 Brightness Display Mode Increase the example pattern brightness using the Up key or reduce the brightness using the Down key.
9 Blinking Display Mode Cyclic switching between 3 Blinking pattern displays using the Up/Down keys.
10 Direct Pin Display Mode Cyclic switching between 4 Direct Pin pattern displays using the Up/Down keys.
User Mode: When the Mode switch is turned on to the left “EV”, the User Mode is enabled
allowing users to edit patterns and functions in the UI. After this the data and functions
can be downloaded via the USB interface to implement the LED demo displays. The
following shows the UI interface with a successful Demo connection.
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 12 / 16 April 20, 2017
Software Flowchart
Main Flowchart
Start
100ms delay after power on; initialisation
TB0F=1?
TB0F=0
Demo Mode?
Key scanning
Demo Mode for first time?
Demo ModeProgram initialisation
Demo Mode display program
User ModeProgram initialisation
Display patterns and functions set on UI
Display User Mode Title
Download all UI data?
User Mode for first time?
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Fig.10 Main Flowchart
During the Demo Board power on, the MCU system will initialise. When the Mode switch
is turned on to the right “Demo”, the Demo mode is enabled. The touch keys are used to
switch the display between different function patterns. When the Mode switch is turned on
to the left “EV”, the User Mode is enabled. The pattern and function data in the UI can be
downloaded to the Demo board to implement the displays.
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 13 / 16 April 20, 2017
Demo Mode Display Subroutine Flowchart
Start
FFT Display Mode?
Window MaskingDisplay Mode?
RETI
Display FFT patterns
Display Breathing effect patternsBreathing light Mode?
Display Window Maskingpatterns
Display Scrolling patternsScrolling Display Mode?
Display USEG patternsUSEG Display Mode?
Display Brightness patternsBrightness Display Mode?
Display Blinking patternsBlinking Display Mode?
Display Direct Pin patternsDirect Pin Display Mode?
Welcome Mode
Display Moving patternsMoving Display Mode?
Yes
No
Yes
Yes
No
No
No
Yes
No
No
No
No
Yes
Yes
Yes
Yes
Yes
No
Fig.11 Demo Mode Display Subroutine Flowchart
The Demo Mode display subprogram is used to update the Mono LED matrix display data
stored in the MCU ROM. There are 11 main modes, including the Welcome mode, FFT
Display Mode, Breathing light Mode, Moving Display Mode, Window Masking Display
Mode, Scrolling Display Mode, USEG Display Mode, Brightness Display Mode, Blinking
Display Mode, Direct Pin Display Mode. Each main mode contains multiple sub modes to
show various display effects.
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 14 / 16 April 20, 2017
User Mode Display Subroutine Flowchart
Start
RETI
Update Global Brightness
COM output display
ROW output display
Update display
Update Scrolling settings
Update Scrolling speed
Update USEG settings
Update Blinking settings
Update Direct Pin settings
Fig.12 User Mode Display Subroutine Flowchart
The User Mode display subprogram is used to update the display content with the Mono
LED matrix data downloaded from the UI. The updated content includes the Global
Brightness, COM outputs, ROW outputs, display pattern, scrolling settings, scrolling
speed, USEG settings, Blinking settings, Direct Pin settings.
Key Scanning Subroutine Flowchart
Start
Is Menu key pressed?
Is Function key pressed?
Is Up key pressed?
Is Down key pressed?
RETI
Switch displays of the main mode titles
Enter the first sub mode under the main
mode
To the next sub mode
To the last sub mode
No
No
No
No
Yes
Yes
Yes
Yes
Fig.13 Key Scanning Subroutine Flowchart
The Key Scanning Subprogram is used to switch the display mode of the red colour LED
matrix display in the Demo Mode. Switching between the main modes is executed using a
short press on the Menu key. When the main mode is selected, a short press on the
Function key will take the system into the first sub mode. Using the Up or Down keys, the
previous or the next sub mode can be selected.
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 15 / 16 April 20, 2017
UI Data Download Subroutine Flowchart
Start
Is FIFO2 readable?
Is CMD_INDEX value in A0H~ADH?
RETI
Read FIFO2 data and save in the buffer
Write data into FLASHROM corresponding locations
No
No
Yes
Yes
Fig.14 UI Data Download Subroutine Flowchart
The UI data download subprogram is used to manage the UI communication with the
MCU and to save the data in the UI into the FLASHROM. The data volume per download
is 64 bytes. When a transfer is required, the USB will send an LED display command and
the data length via Endpoint 0. After this the data can be transmitted via Endpoint 2. After
the data has been received by Endpoint 2, it will be stored into the FLASHROM
corresponding location according to the command index and data length received via
Endpoint 0.
Program Example
ASM Example
HT16D35A_MONO_LED_SPI_ASM_V00.rar
Development Platform
Led Demo Wizard.rar
Conclusion
This application note has provided a display demo in which four HT16D35A ICs are used to
show a method of implementing a variety of display effects using the HT16D35A device.
-
HT16D35A Single-colour Matrix LED Display Application Example
AN0453E V1.00 16 / 16 April 20, 2017
Versions and Revision Date Author Issue and Revision
2017.03.24 張馨華 First Version
Reference Files Reference file: HT16D35A Datasheet.
For more information, refer to the Holtek official website http://www.holtek.com.
Disclaimer All information, trademarks, logos, graphics, videos, audio clips, links and other items
appearing on this website ('Information') are for reference only and is subject to change at
any time without prior notice and at the discretion of Holtek Semiconductor Inc. (herein
after 'Holtek', 'the company', 'us', 'we' or 'our'). Whilst Holtek endeavors to ensure the
accuracy of the Information on this website, no express or implied warranty is given by
Holtek to the accuracy of the Information. Holtek shall bear no responsibility for any
incorrectness or leakage.
Holtek shall not be liable for any damages (including but not limited to computer virus,
system problems or data loss) whatsoever arising in using or in connection with the use of
this website by any party. There may be links in this area, which allow you to visit the
websites of other companies. These websites are not controlled by Holtek. Holtek will
bear no responsibility and no guarantee to whatsoever Information displayed at such sites.
Hyperlinks to other websites are at your own risk.
Limitation of Liability
In no event shall Holtek Limited be liable to any other party for any loss or damage
whatsoever or howsoever caused directly or indirectly in connection with your access to
or use of this website, the content thereon or any goods, materials or services.
Governing Law
The Disclaimer contained in the website shall be governed by and interpreted in
accordance with the laws of the Republic of China. Users will submit to the non-exclusive
jurisdiction of the Republic of China courts.
Update of Disclaimer
Holtek reserves the right to update the Disclaimer at any time with or without prior notice,
all changes are effective immediately upon posting to the website.
http://www.holtek.com.tw/home
IntroductionFunctional DescriptionROW Pin Constant Current OutputsBinary and Gray ModesBlinking and Fade EffectsUCOM and USEG EffectsScrolling EffectsWindow Masking and Matrix Masking Effects
Hardware DescriptionHardware Block DiagramApplication Circuits
Software DescriptionDisplay DescriptionSoftware Flowchart
Program ExampleASM ExampleDevelopment Platform
ConclusionVersions and RevisionReference FilesDisclaimer
/ColorImageDict > /JPEG2000ColorACSImageDict > /JPEG2000ColorImageDict > /AntiAliasGrayImages false /CropGrayImages true /GrayImageMinResolution 300 /GrayImageMinResolutionPolicy /OK /DownsampleGrayImages true /GrayImageDownsampleType /Bicubic /GrayImageResolution 300 /GrayImageDepth -1 /GrayImageMinDownsampleDepth 2 /GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true /GrayImageFilter /DCTEncode /AutoFilterGrayImages true /GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict > /GrayImageDict > /JPEG2000GrayACSImageDict > /JPEG2000GrayImageDict > /AntiAliasMonoImages false /CropMonoImages true /MonoImageMinResolution 1200 /MonoImageMinResolutionPolicy /OK /DownsampleMonoImages true /MonoImageDownsampleType /Bicubic /MonoImageResolution 1200 /MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000 /EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode /MonoImageDict > /AllowPSXObjects false /CheckCompliance [ /None ] /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false /PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true /PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXOutputIntentProfile () /PDFXOutputConditionIdentifier () /PDFXOutputCondition () /PDFXRegistryName () /PDFXTrapped /False
/CreateJDFFile false /Description > /Namespace [ (Adobe) (Common) (1.0) ] /OtherNamespaces [ > /FormElements false /GenerateStructure false /IncludeBookmarks false /IncludeHyperlinks false /IncludeInteractive false /IncludeLayers false /IncludeProfiles false /MultimediaHandling /UseObjectSettings /Namespace [ (Adobe) (CreativeSuite) (2.0) ] /PDFXOutputIntentProfileSelector /DocumentCMYK /PreserveEditing true /UntaggedCMYKHandling /LeaveUntagged /UntaggedRGBHandling /UseDocumentProfile /UseDocumentBleed false >> ]>> setdistillerparams> setpagedevice