You are on page 1of 36

Page 1

CH452 manual

Digital tube driver and keyboard control chip CH452


Manual Version: 2D
http://wch.cn

1 Overview
CH452 is a digital tube display driver and keyboard scan control chip. CH452 has a built-in clock oscillating circuit,
which can dynamically drive 8 digits Code tube or 64 LEDs, with BCD decoding, flashing, shifting, segment
addressing, light beam decoding, etc.; at the same time, 64 Keyboard scanning of keys; CH452 can exchange data
with single chip microcomputer through 4-wire serial interface or 2-wire serial interface that can be cascaded;
To provide a power-on reset signal to the microcontroller.
2. Features
2.1. Display driver
● Built-in current drive stage, segment current is not less than 20mA, word current is not less than 100mA.
● Dynamic display scan control, directly drive 8-bit digital tube, 64 light-emitting tube LED or 64-level light beam.
● Optional non-decoding mode or BCD decoding mode corresponding to the segment of the digital tube and the
data bit.
● BCD decoding supports a custom BCD code to display a special character.
● The word data of the digital tube is shifted left, right, left and right.
● The digital blinking control of each nixie tube can choose fast and slow blinking speed.
● Arbitrary segment addressing, independently control the on and off of each LED or each segment of each digital
tube.
● 64-level light beam decoding, the light beam value is displayed through a light beam composed of 64 LEDs.
● Scan limit control, support 1 to 8 digital tubes, and only allocate scan time for effective digital tubes.
● 16-level brightness control is provided through duty cycle setting.
● The word drive output polarity can be selected to facilitate external expansion of drive voltage and current.
2.2. Keyboard control
● Built-in 64-key keyboard controller, based on 8×8 matrix keyboard scanning.
● Built-in pull-down resistor for button status input and built-in debounce circuit.
● Keyboard interrupt, you can choose low-level effective output or low-level pulse output.
● Provide button release flag bit for querying button press and release.
● Support key-press wake-up, CH452 in low power consumption and power-saving state can be woken up by some
keys.
2.3. External interface
● With the same chip, high-speed 4-wire serial interface or economical 2-wire serial interface can be selected.
● 4-wire serial interface: support multiple chip cascade, clock speed from 0 to 2MHz, compatible with CH451 chip.
● 4-wire serial interface: DIN and DCLK signal lines can be shared with other interface circuits, saving pins.
● 2-wire serial interface: support two CH452 chips in parallel (the respective addresses are set by the ADDR pin
level).
● 2-wire serial interface: 400KHz clock speed, compatible with two-wire I 2 C bus, saving pins.
● Built-in power-on reset, which can provide high-level active and low-level active reset outputs for the
microcontroller.
2.4. Miscellaneous
● Built-in clock oscillating circuit, no need to provide external clock or external oscillating components, more anti-
interference.
● Support low-power sleep, save power, and can be awakened by a button or command operation.
● Support 3V~5V power supply voltage.
● Provide SOP28 and DIP24S two lead-free packages, compatible with RoHS, pin compatible with CH451 chip.
3. Package
4-wire serial interface

2-wire serial interface

Package form width Pin pitch Package description Order model

SOP28 7.62mm 300mil 1.27mm 50mil Standard 28-pin patch CH452A


DIP24S 7.62mm 300mil 2.54mm 100mil Narrow 24-pin dual in-lineCH452L

Page 3
Note: CH452 chip has two versions: V1 (batch number is 2042XXXXX, only available to existing users) and V2
(not batch number 2042XXXXX).
The main difference is that the addressing of beam decoding and segment addressing is different. The addressing
order of V1 version is first segment and then word, and the addressing order of V2 version is
The word is followed by the paragraph, and the function and temperature range of the V2 version is better than that
of the V1 version. This manual only applies to V2 version.
4. Pin
4.1. Standard common pins
SOP28 DIP24S
Pin number Pin number Pin name Types of Pin description

23 2 VCC power supply Positive power supply, continuous current is not less
than 150mA
9, 10 15 GND power supply Common ground, continuous current is not less than
150mA
22~15 1,24~18 SEG7 Three-state Segment drive of nixie tube, high level effective,
~SEG0 output and input Keyboard scan input, high level active, built-in pull-
down
1~8 7~14 DIG7 Output The word drive of the nixie tube, active low,
~DIG0 Keyboard scan output, valid at high level,
DIG6 and DIG7 can be used for GPO general output
14 17 H3L2 enter Serial interface mode selection, built-in pull-up
resistor, High level select 4-wire interface, low level
select 2-wire interface
12 16 RST Output Power-on reset output, active high
13 not support RST# Output Power-on reset output, active low
28 not support RSTI enter Manual reset input, active high, built-in pull-down
11 not support NC. / GPI enter Can be used for GPI general input
4.2. 4-wire interface pins
28-pin package 24-pin package Pin Name Types of Pin description

25 4 LOAD enter Data loading of 4-wire serial interface, built-in pull-


up resistor
26 5 DIN enter Data input of 4-wire serial interface, built-in pull-up
resistor
27 6 DCLK enter Data clock of 4-wire serial interface, built-in pull-up
resistor
24 3 DOUT Built-in pull-up Data output of 4-wire serial interface,
Open drain output Keyboard interrupt output, active low
4.3. 2-wire interface pins
28-pin package 24-pin package Pin name Types of Pin description

25 4 ADDR enter Address selection for 2-wire serial interface,


built-in pull-up resistor
26 5 SDA Open drain output Data input and output of 2-wire serial interface,
And input Built-in pull-up resistor
27 6 SCL enter Data clock of 2-wire serial interface with built-in
pull-up resistor
24 3 INT# Built-in pull-up Interrupt output of 2-wire serial interface,
Open drain output Keyboard interrupt output, active low
5. Function description
5.1. General description
For the data in this manual, those ending with B are binary numbers, those ending with H are hexadecimal numbers,
otherwise they are decimal numbers, marked.
The bit x indicates that the bit can have any value.
The single-chip microcomputer (or DSP, microprocessor, etc.) controls the CH452 chip through the serial interface,
and the digital tube display of CH452
The display driver and keyboard scan control are independent of each other, and the microcontroller can enable and
disable these two functions respectively through operation commands.
5.2. Display Driver
CH452 uses dynamic scan drive for the digital tube and light-emitting tube, the sequence is DIG0 to DIG7, when
one of the pins draws current,
The other pins do not sink current. CH452 has a current drive stage inside, which can directly drive a common
cathode digital tube from 0.5 inch to 1 inch.
Segment drive pins SEG6~SEG0 correspond to the segment G~A segment of the digital tube, and segment drive
pins SEG7 correspond to the decimal point of the digital tube.
The movable pins DIG7~DIG0 are respectively connected to the cathodes of 8 digital tubes; CH452 can also be
connected to an 8×8 matrix of light-emitting diode LED arrays
Or 64 independent light-emitting tubes or 64-level light beams; CH452 can change the word drive output polarity to
directly drive the common anode digital tube (not
Decoding method), or support common anode digital tube through external inverter driver, or external high-power
tube to support large-size digital tube.
CH452 supports scan limit control, and only allocates scan time for effective digital tubes. When the scan limit is set
to 1, the only
The digital tube DIG0 will get all the dynamic driving time, which is equivalent to static driving; when the scan
limit is set to 8, 8 digital
The tubes DIG7~DIG0 each get 1/8 of the dynamic driving time; when the scan limit is set to 4, the 4 digital tubes
DIG3~DIG0 each get
1/4 of the dynamic driving time. At this time, the average driving current of each digital tube will be doubled when
the scan limit is 8, so reduce the scan pole
Limit can increase the display brightness of the digital tube.
There are 8 8-bit data registers in CH452, which are used to store 8 word data, corresponding to the 8 data registers
driven by CH452.
Nixie tubes or 8 groups of 8 LEDs in each group. CH452 supports left shift, right shift, left cycle, right shift of word
data in data register
Circulation, and supports independent flicker control of each digital tube, flicker control when the word data moves
left and right or left and right cyclically
The attributes of will not move with the data.
CH452 supports any segment addressing and can be used to independently control any of the 64 luminous tube
LEDs or special features in the digital tube.
For fixed segments (such as decimal point), all segments are uniformly addressed from 00H to 3FH. When using the
"Segment Addressing Set 1" command to set the segment position of an address
After it is set to 1, the LED or digital tube segment corresponding to the address will light up, and this operation will
not affect any other LEDs or digital tubes.
The status of its segment.
CH452 supports 64-level light beam decoding. 64 light-emitting tubes or 64-level light beams are used to indicate
65 states. After loading a new light beam value,
The light-emitting tube whose address is less than the specified light column value will light up, and the light-
emitting tube whose address is greater than or equal to the specified light column value will be off.
The following table shows the addressing of the 8×8 matrix between DIG7~DIG0 and SEG7~SEG0 of CH452 of
V2 version, used for digital tube segment
Bit addressing, luminous tube LED array and addressing of light beams. Please refer to the key code table for the
addressing of the V1 version of the CH452 chip.
Matrix addressing

CH452 works in non-decoding mode by default, at this time, bit 7~bit 0 of word data in 8 data registers correspond
to 8 data respectively
The decimal point and segment G to segment A of the nixie tube. For the LED array, the data bit of each word data
uniquely corresponds to a LED
Grade tube. When the data bit is 1, the corresponding digital tube segment or LED will light up; when the data bit is
0, the corresponding digital tube
The segment or LED will go out. For example, the bit 0 of the third data register is 1, so the corresponding segment
A point of the third digital tube
bright. By setting, CH452 can also work in BCD decoding mode. This mode is mainly used for digital tube drive.
The binary number BCD code is decoded by CH452 and directly drives the digital tube to display the corresponding
character. The BCD decoding method refers to the
Bit 4~bit 0 of the word data in the memory are decoded by BCD, and the output of the segment drive pins
SEG6~SEG0 is controlled, corresponding to the segment G~ of the digital tube
Segment A, while using bit 7 of word data to control the output of segment drive pin SEG7, corresponding to the
decimal point of the digital tube, bit 6 of word data and
Bit 5 does not affect BCD decoding. The following table shows the corresponding segment G to segment after BCD
decoding of bit 4 to bit 0 of the word data in the data register
A and the characters displayed by the digital tube. Refer to the following table, if you need to display the character 0
on the digital tube, just insert the data 0xx00000B or
Or 00H; need to display the character 0. (0 with a decimal point), just put the data 1xx00000B or 80H; similarly, the
data 1xx01000B
Or 88H corresponds to character 8. (8 with decimal point); data 0xx10011B or 13H corresponds to character =; data
0xx11010B or
1AH corresponds to the character. (decimal point); data 0xx10000B or 10H corresponds to the character (space, the
digital tube does not display); data
0xx11110B or 1EH corresponds to custom special characters, which are defined by the "custom BCD code"
command.
The figure below is the segment name of the digital tube
The following table is the BCD decoding table

Bit 4 to bit 0 Seg G~Seg A Characters Bit 4 to bit 0 Seg G~Seg A Characters
displayed displayed

Space
-| -1 or plus sign
-Minus sign minus sign
= Equal sign
[ Left bracket
] Right square bracket
_ Underscore
H letter H
L letter L
P letter P
. Decimal point
Custom character
Space

SELF_BCD is controlled by the "custom BCD code" command


The new character defined, the default value is space after reset

The following figure is the internal circuit diagram of the segment drive pins SEG7~SEG0 of CH452.
The following figure is the internal circuit diagram of the word drive pins DIG7~DIG0 of CH452.

5.3. Keyboard scan


The keyboard scan function of CH452 supports a 64-key keyboard with 8×8 matrix. During keyboard scan, DIG7~
DIG0 pins are used for column
Scan output, SEG7~SEG0 pins all have internal pull-down resistors for line scan input. When the keyboard scan
function is enabled, the 4-wire string
The function of the DOUT pin in the line interface is changed from the data output of the serial interface to
keyboard interrupt output and key data output.
CH452 periodically inserts keyboard scanning during display drive scanning. During the keyboard scan, DIG7~
DIG0 pins follow DIG0
The sequence to DIG7 outputs high level in turn, and the remaining 7 pins output low level; the output of SEG7~
SEG0 pins is prohibited.
When the key is pressed, SEG7~SEG0 are all pulled down to low level; when a key is pressed, for example, the
key connecting DIG3 and SEG4 is pressed,
When DIG3 outputs a high level, SEG4 detects a high level; in order to prevent bit errors due to key jitter or external
interference, CH452
Perform two scans, and only when the results of the two keyboard scans are the same, the keys will be validated. If
CH452 detects valid
Press the key, record the key code and produce it through the DOUT pin in the 4-wire serial interface or the INT#
pin in the 2-wire serial interface
Generate low-level keyboard interrupt (when INTM is 1, output low-level pulse interrupt, refer to the description in
section 5.5 and section 5.6).
When the single-chip microcomputer can read the key code through the serial interface; before a new valid key is
detected, CH452 no longer generates any key
Disk is interrupted. CH452 does not support combination keys, that is, at the same time, two or more keys cannot be
pressed; if multiple keys
Press at the same time, then the key with the smaller key code will take precedence. If the time is sequential, the first
key is valid.
The key code provided by CH452 is 8 bits (only low 7 bits are provided in 4-wire interface mode), bit 2~bit 0 are
column scan code, bit 5~
Bit 3 is the line scan code, bit 6 is the status code (key press is 1 and key release is 0), and bit 7 is the GPI input
status flag. For example, even
When the key connected to DIG3 and SEG4 is pressed, the key code is 1100001B or 63H, after the key is released,
the key code is usually 0100011B
Or 23H (may be other values, but must be less than 40H), where the column scan code corresponding to DIG3 is
011B, corresponding to SEG4
The line scan code is 100B. The MCU can read the key code at any time, but it is usually generated when a valid
key is detected in CH452
Read the key code when the keyboard is interrupted. At this time, bit 6 of the key code is always 1. In addition, if
you need to know when the key is released, the microcontroller
The key code can be read periodically by querying until bit 6 of the key code is 0.
The following table shows the key codes of the 8×8 matrix between DIG7~DIG0 and SEG7~SEG0. Since the key
code is 7 digits, the key is pressed
Time bit 6 is always 1, so when the key is pressed, the actual key code provided by CH452 is the key code in the
table plus 40H, which is
Say, the key code at this time should be between 40H and 7FH.
Key code

5.4. Additional functions


CH452 can provide power-on reset to the MCU. The reset input pins of the microcontroller, DSP, and
microprocessor can be directly
Connect to the RST pin or RST# pin of CH452. When CH452 is powered on, the RST pin outputs a high-level
effective reset pulse signal.
The RST# pin outputs a low-level effective reset pulse signal. The power-on reset pulse signal of CH452 acts on the
inside of CH452 chip at the same time
Circuit.
The power-on reset of CH452 refers to the reset pulse generated during the power-on process (the process from the
power-off state to the normal power supply state). for
In order to reduce the power interference caused by CH452 driving high current, when designing the printed circuit
board PCB, it should be close to the CH452 chip,
A set of power decoupling capacitors are connected in parallel between the negative power supplies, including at
least one monolithic or ceramic capacitor with a capacity of not less than 0.1uF and a capacity
Electrolytic capacitor not less than 100uF.
5.5. 4-wire serial interface
Below is the block diagram.
CH452 has a high-speed 4-wire serial interface implemented by hardware, including 4 signal wires: serial data input
wire DIN, serial data
Clock line DCLK, serial data load line LOAD, serial data output line DOUT. Among them, DIN, DCLK, LOAD are
inputs with pull-ups
The signal line is high by default; DOUT is used as a serial data output line when the keyboard scan function is not
enabled, and when the keyboard scan function is enabled
Then it is used as keyboard interrupt and data output line, the default is high level.
DIN is used to provide serial data, high level represents bit data 1, low level represents bit data 0, serial data input
sequence is low
The position is in the front and the high is in the back.
DCLK is used to provide serial clock. CH452 inputs data from DIN on its rising edge and outputs data from DOUT
on its falling edge. CH452
There is a 12-bit shift register inside. On the rising edge of DCLK, the bit data on DIN is shifted into the highest
register of the shift register.
By analogy, the original low-order data is moved into the lowest-order register. At the first falling edge after the
rising edge, the original low-order data is transferred from DOUT
Output. CH452 allows the serial clock frequency of DCLK pin to be as high as 10MHz, which can realize high-
speed serial input and output.
LOAD is used to load serial data. CH452 loads the 12-bit data in the shift register at its rising edge, which is used as
an operation command to analyze
And deal with it. In other words, the rising edge of LOAD is the frame completion flag of the serial data frame,
regardless of the 12-bit data in the shift register
Whether it is valid, CH452 will treat it as an operation command.
Page 8
CH452 manual
8
Since CH452 only loads and processes command data on the rising edge of LOAD, the MCU cannot use the LOAD
signal line for other
Use, but DIN and DCLK can be used for other purposes. When MCU I/O pin resources are tight, CH452 only needs
to be used exclusively
The LOAD signal line, DIN and DCLK signal lines can be shared with other interface circuits.
The process of MCU outputting serial data to CH452 is (not the only process, there can be many changes):
① Output one bit of data, that is, output the lowest bit data B0 to DIN, and output low level pulse to DCLK (change
from high level to low level)
The level returns to high again), including a rising edge to enable CH452 to input bit data;
② In the same way, output bit data B1~B11;
③ Output low-level pulse to LOAD, including a rising edge to make CH452 load serial data.
In this specification, B0^B1^B2^B3^B4^B5^B6^B7^B8^B9^B10^B11^↑ will be used as a simplified description of
the above process,
Among them, ^ represents the rising edge of DCLK, ↑ represents the rising edge of LOAD, B0~B11 represent 1 bit
data respectively, if it is the character 0 or 1
It corresponds to the bit data input by DIN. If it is a character L or H, it corresponds to the bit data 0 or 1 output by
DOUT. E.g,
1^0^0^0^0^0^0^0^0^1^0^0^↑ means sending a set of 12-bit serial data 001000000001B to CH452; 1^1^1^0^
↑H^H^L^L^L^H^H^ means that a group of 4-bit serial data 0111B is first sent to CH452, and then a group of 7-bit
serial data is received
According to 1110011B.
When the keyboard scan function is not enabled, DOUT is used to output serial data, and the lowest bit of data in the
shift register is always in the DCLK
The falling edge appears on the DOUT pin. CH452 supports unlimited cascading, as long as 3 signal wires can
connect multiple CH452 chips.
Among them, the DCLK of all CH452 is connected in parallel to the DCLK output of the microcontroller, and the
LOAD of all CH452 is connected in parallel to the
LOAD output, the DIN of the subsequent stage CH452 is connected to the DOUT output of the previous stage
CH452, and the DIN of the first stage CH452 is connected to the DIN of the microcontroller
Output. In the cascade circuit, the serial data output by the single-chip microcomputer each time must be the number
of digits of the serial data of a single CH452 multiplied by the cascade number.
For example, the serial data of CH452 is 12 bits. If three CH452s are cascaded, the number of data bits output by the
single-chip microcomputer must be
36 bits, which are the command data of the subsequent CH452, the command data of the intermediate CH452, and
the command data of the previous CH452 in order.

The above figure shows the waveform of the MCU sending 12-bit data to CH452 through the 4-wire serial interface
when the keyboard scan function is not enabled
In the figure, the data is 001000000001B, and the low-level pulse of LOAD can be wider, which is represented by a
dotted line in the figure.
When the keyboard scan function is enabled, DOUT is used for keyboard interrupt and data output, and the default
is high. When CH452 is detected as valid
When a key is pressed, DOUT outputs a low-level valid keyboard interrupt; after the MCU is interrupted, a
command to read the key code is issued, and CH452 is in LOAD
After the rising edge of DOUT, the lowest 7 bits of the key code are output from DOUT, the highest bit 7; the
microcontroller continues to output the serial clock, at each lower DCLK
On falling edge, CH452 outputs the remaining 6 digits of the lower 7-bit key code from DOUT in sequence, the
order is high digit first, low digit last; low 7 digits
After the key code is output, no matter how DCLK changes, CH452 will restore DOUT to the default high level.
Refer to the figure below, MCU
The process of obtaining the key code from CH452 is:

① Output one bit of data, that is, output the lowest bit data B0 of the key code command to DIN, and output low-
level pulse to DCLK
Punch
② In the same way, output the bit data B1~B11 of the command to read the key code;
③ Output a low-level pulse to LOAD, including a rising edge to make CH452 load serial data. CH452 analyzes that
it is reading
Take the key code command, and immediately output the most significant data K6 of the key code in DOUT;
④ Read one bit of data, that is, input the highest bit data K6 of the key code from DOUT, and output a low-level
pulse to DCLK;
⑤ In the same way, input the bit data K5~K0 of the key code.
In fact, only the bit data B8~B11 are valid for the read key code command of CH452, so the MCU does not need to
issue the read key
B0~B7 of key code command. For example, if the key code is 63H, the simplified description of the above process
is 1^1^1^0^↑H^H^L^L^L^H^H^,
That is, first send the key code reading command 0111xxxxxxxxB to CH452, and then receive the key code
110011B from DOUT. The picture above is
The waveform diagram of the MCU sending commands to CH452 and receiving key codes. MCU refers to the
working status of the MCU.
If INTM is set to 1 in the "set system parameter" command, select the key interrupt output mode as low-level pulse
(in the edge
When CH452 detects a valid key, the keyboard interrupt output by DOUT is a low-level pulse with a width of
several microseconds.
5.6. 2-wire serial interface
CH452 has an economical 2-wire serial interface, including 2 main signal lines: serial data clock input line SCL,
serial data output
Input and output line SDA; and 2 auxiliary signal lines: address selection line ADDR of serial interface, interrupt
output line INT# of serial interface.
Among them, SCL and ADDR are input signal lines with pull-ups, and the default is high; SDA is a quasi-
bidirectional signal line with pull-ups, and the default is high
Level; INT# is an open-drain output with a pull-up. After the keyboard scan function is enabled, it is used as a
keyboard interrupt output line. The default is high level.
SDA is used for serial data input and output. The high level represents bit data 1, and the low level represents bit
data 0. The sequence of serial data input
The order is high order first and low order last.
SCL is used to provide serial clock. CH452 inputs data from SDA during the high level period after its rising edge,
and the low level after its falling edge.
Data is output from SDA during the level period.
ADDR is used to statically select the device address of CH452. In order to save the I/O pins of the MCU, two
CH452 chips can be connected
Connected to the same set of SCL and SDA signal lines is called parallel mode. In order to distinguish two CH452s,
one of the CH452's ADDR
The pin is connected to low level, and the ADDR of the other CH452 is connected to high level (or left floating), so
that the two have different device addresses.
The falling edge of SDA that occurs during the high level of SCL is defined as the start signal of the serial interface.
CH452 only detects the start signal
Only then receive and analyze the command. Therefore, when the I/O pin resources of the microcontroller are tight,
not only can the INT# pin be omitted and the SDA pin can be used instead
The SCL pin can also be shared with other interface circuits while keeping the state of the SDA pin unchanged.
The process of MCU outputting serial data to CH452 is (not the only process, there can be many changes):
① SDA outputs high level, SCL outputs high level, ready to start signal;
② SDA outputs low level to generate a start signal;
③ SCL outputs low level and start-up is complete;
④ Output one bit of data, that is, output the highest bit data DA0 (always 0) to SDA, and output a high level pulse
to SCL (from low
The level changes to high and then returns to low), including a rising edge and high level to enable CH452 to input
bit data;
⑤ In the same way, output bit data DA1 (always 1), ADDR (address selection), B11~B8;
⑥ In the same way, output bit data R/-W, low level 0 represents a write operation, that is, bit data will continue to
be output;
⑦ In the same way, output bit data 1, that is, not output, so that the I 2 C device sends back the response bit. Note
that by default
CH452 does not send back the response bit, but it will send back the response bit after executing the effective "2-
wire interface ACK" command;
⑧ In the same way, output bit data B7~B0;
⑨ End directly, but it is recommended to restore SCL to high level, and it is recommended to restore SDA to high
level.

The figure above is the waveform diagram of the MCU sending 12-bit data to CH452 through the 2-wire serial
interface, the data is 001000000001B,
ADDR is used to select the device address, which is represented by a dotted line in the figure.
INT# is used for keyboard interrupt output, the default is high level. When CH452 detects a valid key, INT# outputs
low-level valid
The keyboard is interrupted; after the MCU is interrupted, the command to read the key code is issued, and CH452
restores the INT# to the high level, and outputs the key from the SDA
Key code. Refer to the figure below, the process of MCU obtaining key codes from CH452 is:

① SDA outputs high level, SCL outputs high level, ready to start signal;
② SDA outputs low level to generate a start signal;
③ SCL outputs low level and start-up is complete;
④ Output one bit of data, that is, output the highest bit data DA0 (always 0) to SDA, and output a high level pulse
to SCL (from low
The level changes to high and then returns to low), including a rising edge and high level to enable CH452 to input
bit data;
⑤ In the same way, output bit data DA1 (always 1), ADDR (address selection), B11~B8;
⑥ In the same way, output bit data R/-W, high level 1 represents read operation, that is, CH452 is required to
output bit data;
⑦ In the same way, output bit data 1, that is, not output, so that the I 2 C device sends back the response bit. Note
that by default
CH452 does not send back the response bit, but it will send back the response bit after executing the effective "2-
wire interface ACK" command;
⑧ During the low-level period of SCL, CH452 outputs bit data K7 to SDA, and the microcontroller outputs high-
level pulses to SCL, and
Read bit data from SDA during SCL high level;
⑨ In the same way, CH452 outputs bit data K6~K0, and MCU inputs bit data as key codes;
⑩ End directly, but it is recommended to restore SCL to high level, and it is recommended to restore SDA to high
level.
The figure above is the waveform diagram of the MCU sending commands to CH452 and receiving key codes, the
command data is 0111xxxxxxxxB, then
The received key code is 01100011B.
If INTM is set to 1 in the "set system parameter" command, select the key interrupt output mode as low-level pulse
(in the edge
When CH452 detects a valid button, it will wait until SCL and SDA are idle (SCL and SDA remain high for 40
microseconds)
Above), and then output a few microseconds low-level pulse from SDA as a keyboard interrupt, and then still output
low-level from INT# valid
The keyboard is interrupted. This interrupt mode is used to save the I/O pins of the microcontroller. It only needs to
connect SCL and SDA instead of INT#.
When idle, the MCU keeps SCL and SDA at a high level, and CH452 notifies the MCU of the keyboard interrupt
through the low-level pulse of SDA.

6. Operation command (only applicable to CH452 chip of V2 version)


The operation commands of CH452 are all 12 bits. The following table lists the 12-bit serial data corresponding to
each operation command of CH452. among them,
The bit marked x indicates that the bit can be any value; the bit marked with a name indicates that the bit has a
corresponding register inside the CH452 chip.
The data varies according to the operation command.
The 4-wire interface mode only supports the commands with "write" in the [Direction] attribute in the following
table and the [Read Key Code] command. For 4-wire interface
The MCU cannot read back the data previously written to CH452. The read key code command is the only
command with data return.
The 2-wire interface mode supports all the commands in the following table. The direction bit R/-W is used to
indicate the read or write operation, that is, the data transmission direction.
For the 2-wire interface mode, the microcontroller can read back the previously written data for verification. The
commands marked in gray in the table below are the current data
When R/-W is 0, the write operation is executed, and when the bit data R/-W is 1, the read-back operation is
executed.

Operation Direction bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
Command bit

No operation write
Load beam value write LEVEL
Segment addressing write BIT_ADDR
is cleared to 0
Segment addressing write BIT_ADDR
is set to 1
Chip internal reset write
Go to sleep write
Set auxiliary parameter write
Word data shift left write
Word data shift right write
Word data write left circularly
Word data right cycle write
Custom BCD code write/read SELF_BCD
Set system parameters write/read 0 GPOE INTM SSPD DPLR WDOG KEYB DISP
Set display parameter write/read MODE LIMIT INTENSITY
Set flashing control write/read D7S D6S D5S D4S D3S D2S D1S D0S
Load word data 0 Write/read DIG_DATA, word data corresponding to DIG0
Load word data 1 Write/read DIG_DATA, word data corresponding to DIG1
Load word data 2 Write/read DIG_DATA, word data corresponding to DIG2
Load word data 3 Write/read DIG_DATA, word data corresponding to DIG3
Load word data 4 Write/read DIG_DATA, word data corresponding to DIG4
Load word data 5 Write/read DIG_DATA, word data corresponding to DIG5
Load word data 6 Write/read DIG_DATA, word data corresponding to DIG6
Load word data 7 Write/read DIG_DATA, word data corresponding to DIG7
Read chip version 2 line read
Read SEG pin 2 line read SEG7 SEG6 SEG5 SEG4 SEG3 SEG2 SEG1 SEG0
Read key code read KEY7 KEY6 KEY5 KEY4 KEY3 KEY2 KEY1 KEY0
2-wire interface ACK 2-wire write
6.1. No operation: 0000xxxxxxxxB
The no-op command has no effect on CH452. This command can be used in applications where multiple CH452s
are cascaded through the front-end CH452
Send operation commands to the next stage CH452 without affecting the state of the previous stage. For example, to
send the operation command 001000000001B to two levels
Connect the subsequent stage CH452 in the circuit (the DIN of the subsequent stage CH452 is connected to the
DOUT of the previous stage CH452), as long as the no-operation command is added after the command
Let 000000000000B send again, the simplified description is 1^0^0^0^0^0^0^0^0^1^0^0^0^0^0^0^0^0^0^0^0^
0^0^0^↑,
Then, the operation command will pass through the previous stage CH452 to the subsequent stage CH452, while the
no-operation command is left to the previous stage CH452. In addition, in Africa
In cascading applications, no-operation commands can only send valid data B8~B11, and the simplified description
is 0^0^0^0^↑. No operation can also be used
To wake up the CH452 in the low-power sleep state, avoid other commands from affecting the working state of the
CH452.
6.2. Load beam value: 00010[LEVEL]B
The load beam value command is used to specify the new beam value LEVEL, and the valid beam value is 00H to
40H. This command makes addressing less than light
The luminous tube with the column value lights up, and the luminous tube with the column value is greater than or
equal to the light column value is off. For example, the command data 000100000000B means loading
The light beam value is 00H, then all LEDs are off; the command data 000100010110B means that the light beam
value 16H is loaded, then the address is 00H to 15H
LED is on (a total of 16H LEDs are on), while the LEDs addressing 16H to 3FH are off; command data
000101000000B means loading light beam
Value is 40H, then all LEDs are on.

6.3. Segment addressing is cleared to 0: 000110[BIT_ADDR]B


The segment addressing clear command is used to turn off the LED at the specified address (or the specified
segment of the digital tube), and this command can only turn off at a time
Turn off a light-emitting tube at the specified address without affecting the status of other light-emitting tubes.
Please refer to matrix addressing for the addressing sequence of segment addressing
table. For example, the command data 000110111010B means to turn off the light-emitting tube addressed to 3AH.
6.4. Segment addressing is set to 1: 000111[BIT_ADDR]B
The segment addressing set 1 command is used to light up the LED of the specified address (or the specified
segment of the digital tube). This command can only be clicked once
Lights up a light-emitting tube at the specified address, and does not affect the state of other light-emitting tubes at
all. Please refer to matrix addressing for the addressing sequence of segment addressing
table. For example, the command data 000111000110B means to light up the light-emitting tube addressed to 06H.
6.5. Chip internal reset: 001000000001B
The internal reset command resets each register and various parameters of CH452 to the default state. When the chip
is powered on, CH452 is always
Reset, all registers are reset to 0 at this time, and various parameters are restored to default values.
6.6. Go to sleep: 001000000010B
The enter sleep state command causes CH452 to suspend display drive and keyboard scanning, and enter a low-
power sleep state, which can save
Electrical energy. Before executing this command, you should turn off the display driver enable and key scan enable
of CH452 with the set system parameter command, and
And the execution of the command itself must be completed within 20uS, and the DCLK or SCL pin must remain
unchanged after the command is issued.
The CH452 in the low-power sleep state can be awakened by any of the following two events. The first event is
detection
For the buttons on SEG3~SEG0, the effective button codes are 40H to 5FH; the second event is the receipt of an
operation command (communication
It is usually a no-operation command), or a state change of the DCLK or SCL pin is detected. Sleep and wake-up
operation itself will not affect CH452
Working status.
6.7. Set auxiliary parameters: 001010100[GPIE]0[LMTC]B
The set auxiliary parameter command is used to set the auxiliary parameters of CH452: segment current limit
LMTC, general input pin enable GPIE. silent
Under the condition that the segment output current has no upper limit, the actual short-circuit current can reach
more than 80mA. When the LMTC segment current limit is set to 1, CH452
The SEG segment output current is limited internally within 30mA, which can remove the 8 serial current limiting
between the segment drive pin and the digital tube
resistance. General-purpose input pin enable GPIE is used to enable GPI pin status input, 8-bit key code obtained
under 2-wire interface mode
Bit 7 of is the GPI input status.
6.8. Word data left shift: 001100000000B
The word data shift left command will shift the word data of CH452 to the left once, that is, move one bit from
DIG0 to DIG7, and then the rightmost DIG0
Add data 00H. For example, when the digital tubes DIG7~DIG0 display "87654321", execute the word data left
shift command, the display becomes
"7654321" (no decoding method) or "76543210" (BCD decoding method).
6.9. Word data right shift: 001100000010B
The word data shift right command shifts the word data of CH452 to the right once, that is, move one bit from DIG7
to DIG0, and then the leftmost DIG7
Add data 00H. For example, when the digital tubes DIG7~DIG0 display "87654321", execute the word data right
shift command, the display becomes
"8765432" (no decoding method) or "08765432" (BCD decoding method).
6.10. Word data left cycle: 001100000001B
The word data left cycle command will cycle the word data of CH452 left once, that is, move one bit from DIG0 to
DIG7, and then the rightmost
DIG0 supplements the original DIG7 data. For example, when the digital tubes DIG7~DIG0 display "87654321",
execute the word data left cycle command
Order, the display becomes "76543218".
6.11. Right cycle of word data: 001100000011B
The word data right cycle command will cycle the word data of CH452 right once, that is, move one bit from DIG7
to DIG0, and then the leftmost
DIG7 supplements the original DIG0 data. For example, when the digital tubes DIG7~DIG0 display "87654321",
execute the word data right cycle command
Order, the display becomes "18765432".
6.12. Custom BCD code: 00111[SELF_BCD]B
The custom BCD code command is used to define special characters that are not implemented in conventional BCD
decoding. CH452 supports a custom BCD
Code, its BCD value is 1EH, the display code is specified by this command, the code is 7 bits in total, corresponding
to 7 segments of the digital tube, and the decimal point
It is individually controlled by the highest bit of the BCD value. For example, the command data 001110111110B
represents the custom BCD character U (corresponding segment display
The data is 3EH). In the BCD decoding mode, when the MCU requires to display the BCD value 1EH, CH452 will
be displayed in the corresponding digital tube
The character U, when the microcontroller requires to display the BCD value 9EH, CH452 will display the character
U. (including the decimal point) in the corresponding digital tube.
6.13. Set system parameters: 01000[GPOE][INTM][SSPD][DPLR]0[KEYB][DISP]B
The set system parameter command is used to set the system-level parameters of CH452: display driver enable
DISP, keyboard scan enable KEYB, watch
The door dog enables WDOG, word drive output polarity DPLR, blinking speed SSPD, interrupt output mode
INTM, general output pin enable GPOE.
Each parameter is controlled by 1-bit data. For detailed description, refer to the table below. For example, the
command data 010000000001B means to close the keyboard scan
Scan function, enable display scan driver function.

Bit Parameter Description Shorthand Bit is 0 (default) Bit is 1

0 Display drive function enable DISP Turn off the display driver Allow display driver
1 Enable keyboard scan function KEYB Turn off keyboard scan Enable keyboard scan
2 Enable watchdog function WDOG Close watchdog Enable watchdog
3 Word drive DIG output polarity DPLR Active low Active high
4 Flashing speed/frequency SSPD Low speed (about 1.5Hz) Fast (about 3Hz)
5 Button interrupt output mode INTM Active low (Level or edge interrupt)
Low-level pulse
(Edge interrupt)
6 General-purpose output pin enable GPOE Used to display drive word output When the scan limit is 1~6,
(Only DIG6 and DIG7 pins) Disable general output Extra DIG6 and DIG7 pins
Used for general output, respectively by
Blinking bit D6S and D7S control

6.14. Set display parameters: 0101[MODE][LIMIT][INTENSITY]B


Set display parameters command is used to set the display parameters of CH452: decoding mode MODE, scan limit
LIMIT, display brightness
INTENSITY. The decoding mode MODE is controlled by 1-bit data. When set to 1, the BCD decoding mode is
selected, and when it is set to 0, the non-decoding mode is selected (default
Recognized value). The scan limit LIMIT is controlled by 3-bit data. Data 001B~111B and 000B set the scan limit
as 1~7 and 8 respectively
(Defaults). Display brightness INTENSITY is controlled by 4-bit data, data 0001B~1111B and 0000B are
respectively set for display drive
The duty cycle is 1/16~15/16 and 16/16 (default value). For example, the command data 010101110000B indicates
that the non-decoding mode is selected,
The scan limit is 7, the display drive duty cycle is 16/16; the command data 010110001010B indicates that the BCD
decoding method and scan pole are selected
The limit is 8, and the display driving duty cycle is 10/16.
6.15. Set blink control: 0110[D7S][D6S][D5S][D4S][D3S][D2S][D1S][D0S]B
The setting blinking control command is used to set the blinking display attributes of CH452: D7S~D0S
correspond to 8 word drives DIG7~
DIG0. The blinking attributes D7S~D0S are respectively controlled by 1-bit data. Set the corresponding data
position to 1 to enable blinking display, otherwise it is
Normal display without flashing (default value). For example, the command data 011000100001B means to set the
digital tube DIG5 and DIG0 to flash
The other digital tubes display normally without flickering.
6.16. Load word data: 1[DIG_ADDR][DIG_DATA]B
Load word data command is used to write word data DIG_DATA into the data register at the address specified by
DIG_ADDR. DIG_ADDR pass
The address of the data register is designated by the 3-bit data, and the data 000B~111B respectively designate the
address 0~7, corresponding to the DIG0~DIG7 pins
Driven 8 digital tubes. DIG_DATA is 8-bit word data. For example, the command data 100001111001B means that
the word data 79H
Write to the first data register, if it is not decoded, the digital tube driven by DIG0 pin will display E; command data
110010001000B means that the word data 88H is written into the fifth data register. If it is BCD decoding mode, the
DIG4 pin will drive
The digital tube will display 8.
6.17. Read the chip version: 000001000000B (read)
The read chip version command only supports 2-wire interface mode, which is used to get the version number of the
CH452 chip. For the V1 version, it will return 10H.
For V2 version it will return 20H.
6.18. Read SEG pin: 0001[SEG7][SEG6][SEG5][SEG4][SEG3][SEG2][SEG1][SEG0]B
(read)
The read SEG pin command only supports 2-wire interface mode, which is used to obtain the current state of the
SEG7~SEG0 pins of CH452.
The pin inputs 8-bit data.
6.19. Read the key code: 0111[KEY7][KEY6][KEY5][KEY4][KEY3][KEY2][KEY1]
[KEY0]B (Read)
The read key code command is used to obtain the key code of the last valid key detected by CH452. CH452 DOUT
from 4-wire interface
Pin or the SDA pin of the 2-wire interface outputs the key code. The effective data of the key code is bit 7 to bit 0
(4-wire interface only provides low 7
Bit), where bit 7 is the GPI input status flag bit, bit 6 is the status code, and bit 5 to bit 0 are the scan code and key
code. 4-wire interface side
Under the formula, the bit data B0~B7 of the command to read the key code can be any value, so the
microcontroller can shorten the command to 4-bit data B8~
B11; But B7~B0 of the 2-wire interface mode should be 1 so that the SDA pin can be input. For example, CH452
detects a valid key
If interrupted, the MCU first sends the read key code command 0111xxxxxxxxB to CH452, and then obtains the key
code from CH452.
If this is the first command after reset, the ID data 2AH is returned.
6.20. 2-wire interface ACK: 0111xxxxxxxxB (write)
The 2-wire interface ACK command is used to enable the I 2 C-compatible response bit in the 2-wire interface
mode . This command must be used when the display driver is not enabled.
It is executed in the state of moving and keyboard scanning, usually after each power-on reset. After the response bit
is enabled, CH452 will
A read or write operation that matches its own address sends a response.
7. Parameters
7.1. Absolute maximum value (critical or exceeding the absolute maximum value may
cause the chip to work abnormally or even be damaged)
Name Parameter Description Min Max Unit

TA Ambient temperature at work V2 version


V1 version
TS Ambient temperature during storage
VCC Power supply voltage (VCC is connected to power, GND is grounded)
VIO Voltage on input or output pin
IMdig Continuous drive current of a single DIG pin
IMseg Continuous drive current of a single SEG pin
IMall The sum of the continuous drive current of all SEG pins
7.2. Electrical parameters (test conditions: TA=25℃, VCC=5V)
Name Parameter Description Minimum Typical value Max Unit

VCC Power supply voltage of V2 version chip


VCC1 Power supply voltage of V1 version chip
ICC Power supply current
Islp5 5V low power sleep current (all I/Os floating)
Islp3 3.3V low power sleep current (all I/Os floating)
VILseg SEG pin low-level input voltage
VIHseg SEG pin high level input voltage
VIL Low-level input voltage of other pins
VIH High level input voltage of other pins
VOLdig DIG pin low-level output voltage (-100mA)
VOHdig DIG pin high level output voltage (10mA)
VOLseg SEG pin low-level output voltage (-20mA)
VOHseg SEG pin high level output voltage (25mA)
VOL Low-level output voltage of other pins (-4mA)
VOH High level output voltage of other pins (4mA)
IDN1 SEG pin input pull-down current
IDN0 Input pull-down current of RSTI pin
IUP1 DCLK, LOAD pin input pull-up current
IUP2 Input pull-up current of DIN or SDA pin
IUP3 Output pull-up current of DOUT or INT# pin
IUP0 Input pull-up current of H3L2 pin
VR Default voltage threshold for power-on reset
7.3. Internal timing parameters (test conditions: TA=25℃, VCC=5V)
Name Parameter Description Minimum Typical value Max Unit

TPR Reset pulse width generated by power-on detection


TWR Width of reset pulse generated by watchdog overflow
TWP Watchdog overflow period
TWK Was awakened in sleep until the time to resume work
TDP Display scan period (TDW*scan limit)
FSPS Frequency of flashing display (slow/default)
FSPF Frequency of flashing display (fast)
TKS Keyboard scan interval, key response time
TINT When the key interrupt output mode is low-level pulse
The width of the low-level pulse output from DOUT or SDA
7.4. 4-wire interface timing parameters (test conditions: TA=25℃, VCC=5V, refer to the
attached picture)
(Note: The measurement unit of this watch is mainly nanoseconds, namely 10-9 seconds. If the maximum value is not
specified, the theoretical value can be infinite)

Name Parameter Description Minimum Typical value Max Unit

TIS Establishment time of DIN data input


TIH Hold time of DIN data input
TCL DCLK low-level width of the clock signal
TCH DCLK clock signal high level width
TCF DCLK stabilization time before the rising edge of LOAD
TCB DCLK stabilization time after the rising edge of LOAD
TLL LOAD Low level width of loading signal
TLH LOAD Load signal high level width
TLC LOAD Load signal cycle (command cycle)
TOL DOUT output delay after rising edge of LOAD
TOC DOUT output delay after DCLK falling edge
TE DCLK, LOAD rise or fall time
Rate Average data transfer rate
7.5. Timing parameters of 2-wire interface (test conditions: TA=25℃, VCC=5V, refer to the
attached picture)
(Note: The measurement unit of this watch is mainly microseconds, namely 10 -6 seconds. If the maximum value is
not specified, the theoretical value can be infinite)

Name Parameter Description Minimum Typical value Max Unit

TSSTA SDA falling edge start signal setup time


THSTA SDA falling edge start signal hold time
TSSTO SDA rising edge stop signal establishment time
THSTO SDA rising edge stop signal hold time
TCLOW Low level width of SCL clock signal
TCHIG SCL clock signal high level width
TSDA Settling time of SDA input data to the rising edge of SCL
THDA Hold time of SDA input data to the rising edge of SCL
TAA Delay of SDA output data valid to the falling edge of SCL
TDH Delay of SDA output data invalid to the falling edge of SCL
TBUF Buffer time between two consecutive operations
Rate Average data transfer rate

8. Application
8.1. Connect the 4-wire interface to the MCU (the following figure)
The H3L2 pin of U2 (CH452A) is high (or left floating), CH452 communicates with MCU U1 (MCS51
Series 89C2051) are connected. Capacitors C2 and C3 are arranged near the power supply pin of U2 for power
supply decoupling and reduce the driving current
The interference produced. When the keyboard function is not needed, the KEY signal line can be omitted, and only
the three signal lines DCLK, DIN, LOAD are used;
When using the keyboard function, the KEY signal line of the DOUT pin of CH452 can be connected to the
interrupt input pin of the MCU.
To the common I/O pin, then the query method should be used to determine whether CH452 detects a valid key.
CH452 can also provide
For power-on reset signal RESET.
Because part of the I/O pins of the standard MCS51 single-chip microcomputer are quasi-bidirectional ports with
weak pull-ups, they are connected to CH452 at a long distance
In the circuit, it is recommended to add pull-up resistors to DIN, DCLK, LOAD, and DOUT to reduce interference.

8.2. The 2-wire interface is connected to the MCU (the figure below)
The H3L2 pin of U2 (CH452A) is low level, and CH452 is connected to MCU U1 through a 2-wire serial interface.
When keys are not needed
When the keyboard function is used, the KEY signal line can be omitted, and only the two signal lines SCL and
SDA are used; when the keyboard function is used, the INT# of CH452
The KEY signal line of the pin can be connected to the interrupt input pin or ordinary I/O pin of the MCU for query.
When the mode selects "low level pulse", you can also use SDA instead of INT# to provide keyboard interrupts to
the microcontroller.
8.3. Drive the common cathode digital tube (below)

CH452 can dynamically drive 8 common cathode nixie tubes, and the same segment pins of all nixie tubes (segment
A to segment G and decimal point) are connected in parallel
Then connect the segment drive pins SEG0~SEG7 of CH452 through the current-limiting resistor R1 (or R12)
connected in series.
DIG0~DIG7 pins of CH452 are driven.
If the segment current limiting LMTC function of CH452 is enabled, the segment current limiting resistor R1 (or
R12, the same below) can be omitted; No
Then, a resistor R1 needs to be connected in series to the segment drive pins to limit and balance the drive current of
each segment. The resistance value of the series current limiting resistor R1
The larger the segment drive current, the lower the display brightness of the digital tube. The resistance of R1 is
generally between 60Ω and 1KΩ, and other conditions are the same.
In the case of high resistance, a larger resistance value should be selected first. Under the 5V power supply voltage,
the series connection of a 270Ω resistor usually corresponds to a segment current of 10mA.
In the panel layout of the digital tube, it is recommended that the order of the digital tube from left to right is N1 to
the left and N8 to the right to match the words left and right.
Move command and word left and right circular movement command. If there are less than 8 digital tubes, you can
first remove the numbers such as N1, N2, N3 on the left
Code tube, and set the corresponding scan limit to obtain a larger dynamic drive current to improve display
brightness. When the number of digital tubes is less than 7 and scanning
When the limit is less than 7, setting GPOE to 1 can use the extra DIG6 and DIG7 pins as general-purpose output
pins.
8.4. Drive the common anode digital tube (below)
If the segment drive signals SEG0~SEG7 and the word drive signals DIG0~DIG7 are respectively inverted, the
common anode digital tube can be driven.
In the figure below, the segment signals SEG0~SEG7 are driven by the U22 Darlington tube array in inverted
phase. It can also use 8 bases in series with current limiting resistors.
Instead of the triode, the word signals DIG0~DIG7 are driven by 8 PNP triodes T1 and other inverted phases. If
U22 does not support constant current drive,
Then use resistor R13 to limit and equalize the segment current. The driving current of this circuit is several times
larger than that of CH452 directly driving the common cathode digital tube.
The resistances R13 and R14 should be selected according to the actual drive current.
In order to save cost, U22 in the figure below can also be removed, and the segment pins can be driven directly by
CH452, but only the non-decoding method can be used
The loaded word data must be inverted by bit (0 is on and 1 is off). It is recommended to load all the word data
0FFH before turning on the display.

For large-size digital tubes composed of multiple LEDs connected in series, due to the large voltage drop, the 5V
power supply voltage cannot be directly driven.
An external high-voltage drive circuit is often required. In the figure below, set the output polarity of the word drive
DIG of CH452 to "active high", and then pass the NPN
The triode T2 and the PNP triode T3 output 24V drive voltage after being inverted twice. With the segment
inverting drive circuit U22 in the figure above, you can
Drive high-voltage large-size common anode digital tube. The resistance R16 in the figure should be selected
according to the actual drive current.

8.5. 8×8 keyboard scan (below)


CH452 has a 64-key keyboard scan function. If only a few keys are needed in the application, it can be arbitrarily in
an 8×8 matrix.
Remove unused buttons. In order to prevent the formation of a short circuit between the SEG signal line and the
DIG signal line after the key is pressed and affect the display, generally should
The current-limiting resistor R2 is connected in series between the DIG0~DIG7 pins of CH452 and the keyboard
matrix, and its resistance can be from 1KΩ to 5KΩ. in case
The single-chip microcomputer makes CH452 enter the low-power sleep state, then the CH452 in the sleep state can
be awakened by the keys K0~K31.
The front MCU also enables the keyboard scan function of CH452, then CH452 will provide key interrupt to MCU
after waking up.
8.6. Complete application example (below)

In the figure, the single-chip microcomputer U2 drives 8 common cathode digital tubes to display through CH452,
and scans 64 keys at the same time. Because some digital tubes
There is a reverse leakage phenomenon at a higher working voltage, which is easy to be mistaken by CH452 as a
button that has been pressed all the time, so it is recommended to use the secondary
Tubes D1-D8 prevent reverse leakage of the digital tube, and increase the level of the input signal of SEG0~SEG7
during keyboard scanning to ensure that the keyboard scanning is more reliable
by. When the power supply voltage is low (for example, VCC=3.3V), these diodes should be removed to avoid
affecting the display brightness.
8.7. Multi-chip cascading expansion
When there are more than 8 digital tubes or more than 64 buttons, multiple CH452s can be used to drive.
There are two ways to connect multiple CH452s to the single-chip microcomputer via 4-wire interface: one is
parallel, the single-chip microcomputer provides one for each CH452
An independent LOAD signal line, but DIN and DCLK signal lines are provided to all CH452 at the same time, that
is, each LOAD signal
The line is equivalent to the chip select line of each CH452; the second is in series, the microcontroller provides the
DCLK and LOAD signal lines to all CH452 at the same time,
The single-chip microcomputer only provides DIN to the front-end CH452, and the DIN of the later-stage CH452 is
connected to the DOUT pin of the front-end CH452.
There are two schemes for connecting multiple CH452s to the single-chip microcomputer through a 2-wire
interface: one is independent parallel connection, and the single-chip microcomputer provides a separate connection
for each CH452.
Provide an independent SCL or SDA signal line, and independent or share another signal line; the other is direct
parallel connection, two CH452
Use ADDR to select different device addresses, and two CH452s fully share SCL and SDA signal lines to connect
with the microcontroller.
When multi-chip cascade expansion, the working current is larger, so pay more attention to prevent mutual
interference. Please refer to section 8.8 Anti-interference.
8.7.1. Parallel application of 4-wire interface (below)

In the figure, 24 digital tubes are driven in parallel cascade mode with 4-wire interface, U8 (MCS51 series single-
chip microcomputer) provides all CH452
A group of common DIN and DCLK signals, and a LOAD signal line is provided to each CH452. When you need to
operate U9,
The microcontroller can output serial data through DIN and DCLK, and then output a load signal to U9 through
LD1 to make it perform operations, while U10
And U11 does not receive the LOAD signal, so it does not operate. In the parallel mode, each CH452 can enable the
keyboard function and operate
The operation process is simpler than the series method.
8.7.2. Application of 4-wire interface in series (Figure below)

In the figure, the light-emitting diode LED dot matrix is driven by a 4-wire interface serial cascade mode. The
single-chip microcomputer U3 passes DIN1, DCLK and LOAD three
One signal line controls all CH452. Refer to the 16×16 layout, 4 8×8 LED arrays L1~L4 form a 16×16 dot matrix
Module, if you want to display a Chinese character, you only need to send the 32-byte dot matrix data to CH452
through 8 48-bit load word data commands.
That's it. Because 4 CH452s are cascaded, each operation command must be 48-bit data, followed by U7, U6, U5
and
The command data of U4 is finally output by the rising edge of the LOAD signal line to notify all CH452 to load
their own command data. In series mode,
There is no limit to the number of CH452 cascaded, and it only occupies 3 I/O pins. DIN and DCLK can also be
shared with other interface circuits.
The disadvantage is that only the last stage of CH452 can enable the keyboard function, and it needs to be turned on
one by one. The operation process is more complicated than the parallel mode.
8.7.3. Direct parallel application of 2-wire interface (Figure below)
In the figure, 16 digital tubes are driven directly in parallel with a 2-wire interface, and two CH452s can respectively
enable the keyboard function. MCU U12
Provide a set of common SCL and SDA signals to two CH452s and other devices compatible with I 2 C bus timing,
and two ADDRs of CH452
The pin connections are different, so that different device addresses are selected to facilitate the single-chip
differentiation.

8.8. Anti-interference and manual reset (important)


CH452 has a built-in power-on reset function, which can provide power-on reset signals to the microcontroller
through the RST and RST# pins. In CH452
During normal operation, the RSTI pin can be used for manual reset input. When RSTI inputs a high level, the
CH452 chip is reset and at the same time
RST and RST# also output reset signals to external circuits.
The RSTI pin is more sensitive to noise. If RSTI is connected to the instrument panel as a manual reset input, in
order to reduce external interference
It is recommended to connect a capacitor between the RSTI pin and the ground GND with a capacity between
1000pF and 5000pF. If RSTI is not used
Pin, you can connect it to GND to maintain a fixed low level.
Since CH452 drives the digital tube or LED with a large current, it will produce a large glitch voltage on the power
supply, so if the power cord
Or the PCB wiring of the ground wire is unreasonable, which may affect the stability of the MCU or CH452.
Solutions for power interference:
① It is recommended to use shorter and thicker power and ground wires, especially when the CH452 and the
single-chip microcomputer belong to two PCBs;
②. Near CH452, connect a power decoupling capacitor in parallel between the positive and negative power
supplies, at least one 0.1uF monolithic or ceramic capacitor and one
Electrolytic capacitor with a capacity not less than 100uF.

For external interference when the signal line is long, refer to the following figure to solve:
①. Add capacitors C21, C22, C23, C25 and C26 at the end of the signal line close to the CH452 pin, the
capacitance value can be 47pF
To 470pF, the larger the capacitance, the slower the transmission speed of the communication interface with the
microcontroller;
②. Optionally add resistors R24, R25, R26, R33 and R34, the resistance value can be 100Ω to 470Ω;
③. Reduce the transmission speed between the MCU and CH452 (because of the increase of resistance and
capacitance);
④. If it is driven by quasi-bidirectional I/O pins (such as standard MCS51 microcontroller), it is recommended to
add resistors R21, R22, R23,
R31 and R32, the resistance value can be 500Ω to 10KΩ to strengthen the pull-up of the quasi-bidirectional I/O pin
of MCS-51 MCU
Ability to maintain a better digital signal waveform during long-distance transmission; when the signal line is short,
the pull-up resistors R21, R22,
R23, R31 and R32, for totem-pole drive bidirectional I/O pins, no pull-up resistors R21, R22, R23, R31 are required
And R32.
⑤ It is recommended to connect input pins such as H3L2 and ADDR to a fixed level instead of floating.
In addition, for strong interference application environment, it is recommended to refresh CH452 regularly: ①,
reset system parameters; ②, reset
Set the display parameters; ③, reset the flicker control; ④, reload each display data. This method does not have
any side effects.
8.9. MCU interface program
The C language and ASM assembly interface programs of commonly used single-chip microcomputers are provided
on the website.

You might also like