HT6221/HT6222
Multi-Purpose Encoders
Block Diagram
1 March 2, 2000
Features
·Operating voltage: 1.8V~3.5V
·DOUT with 38kHz carrier for IR medium
·Low standby current
·Minimum transmission word: one word
·455kHz ceramic resonator or crystal
·16-bit address codes
·8-bit data codes
·PPM code method
·Three double-active keys
·Maximum active keys
-HT6221: 32 keys
-HT6222: 64 keys
·Low power and high noise immunity
CMOS technology
Applications
·Television and video cassette recorder con-
trollers
·Burglar alarm systems
·Smoke and fire alarm systems
·Garage door controllers
·Car door controllers
·Car alarm systems
·Security systems
·Other remote control systems
General Description
The HT6221/HT6222 are CMOS LSI encoders
designed for use in remote control systems. They
are capable of encoding 16-bit address codes and
8-bit data codes. Each address/data input can be
set to one of the two logic states, 0 and 1.
The HT6221/HT6222 contain 32 keys
(K1~K32) and 64 keys (K1~K64), respectively.
When one of the keys is triggered, the pro-
grammed address/data is transmitted together
with the header bits via an IR (38kHz carrier)
transmission medium.
O scillator D ivider
VDD VSS
Keyboard
Matrix &
Gate
Circuit
¸
24 C ounter &
1 of 24 D ecoder
Binary D etector
DOUT
D ata Select
& Buffer
Sync.
Circuit
X2 X1
R1
R8
Data ROM
& R egisters
C1 C8 AIN D7
LED
Pin Assignment
Pad Assignment
Chip size: 94 ´104 (mil)2
* The IC substrate should be connected to VDD in the PCB layout artwork.
HT6221/HT6222
2 March 2, 2000
24
23
22
21
20
19
18
17
16
15
14
13
1
2
3
4
5
6
7
8
9
10
11
12
20
19
18
17
16
15
14
13
12
11
1
2
3
4
5
6
7
8
9
10
AIN
C1
C2
C3
C4
C5
C6
C7
C8
LED
R1
R2
R3
R4
DOUT
VDD
D7
X2
X1
VSS
H T6221
20 DIP/SO P
H T6222
24 D IP /S O P
R2
R1
AIN
C1
C2
C3
C4
C5
C6
C7
C8
LED
R3
R4
R5
R6
R7
R8
DOUT
VDD
D7
X2
X1
VSS
1
13
2
14
3
15
4
16
5
17
6
18
7
19
8
20
9
21
10
22
11
23
12
24
KI4
KI5
KI6
KI7
REM
VDD
SEL
OSCO
OSCI
VSS
LM B
KIO7
KIO6
KIO5
KIO4
KIO3
KIO2
KIO1
KIO0
CCS
KI0
KI1
KI2
KI3
(0 ,0 )
Pad Coordinates Unit: mil
Pad No. X Y Pad No. X Y
1-41.99 34.43 13 34.17 -46.88
2-41.99 22.02 14 41.95 -30.26
3-41.99 15.39 15 41.95 -13.98
4-41.99 2.98 16 41.95 -4.12
5-41.99 -5.61 17 41.95 12.16
6-41.99 -28.31 18 41.95 22.02
7-41.99 -37.83 19 39.99 46.84
8-41.99 -46.88 20 28.26 46.84
9-20.95 -46.88 21 -11.18 46.84
10 -14.32 -46.88 22 -23.16 46.84
11 -4.25 -46.88 23 -29.79 46.84
12 24.31 -46.88 24 -39.27 46.84
Pin Description
HT6222
Pin No. Pin Name I/O Internal
Connection Description
1~6 R3~R8 I CMOS IN
Pull-low Row control for keyboard matrix, active high
7 DOUT O CMOS OUT Serial data output pin, with a 38kHz carrier
8 VDD ¾¾
Positive power supply, 1.8V~3.5V for normal
operation
9 D7 I CMOS IN Most significant data bit (D7) code setting
10 X2 O OSCILLATOR 455kHz resonator oscillator output
11 X1 I OSCILLATOR 455kHz resonator oscillator input
12 VSS ¾¾
Negative power supply
13 LED O CMOS OUT Transmission enable indicator output
14~21 C8~C1 I/O CMOS IN/OUT
Pull-low Column control for keyboard matrix
22 AIN I
CMOS IN
Pull-high
Pull-low
Low byte address codes (8 bits) scan input
23~24 R1~R2 I CMOS IN
Pull-low Row control for keyboard matrix, active high
HT6221/HT6222
3 March 2, 2000
Approximate internal connection circuits
Absolute Maximum Ratings
Supply Voltage.................................-0.3V to 6V Storage Temperature.................-50°Cto125°C
Input Voltage .................VSS-0.3V to VDD+0.3V Operating Temperature ..............-20°Cto75°C
Note: These are stress ratings only. Stresses exceeding the range specified under "Absolute Maxi-
mum Ratings" may cause substantial damage to the device. Functional operation of this device
at other conditions beyond those listed in the specification is not implied and prolonged expo-
sure to extreme conditions may affect device reliability.
Electrical Characteristic Ta=25°C
Symbol Parameter Test Conditions Min. Typ. Max. Unit
VDD Conditions
VDD Operating Voltage ¾¾1.8 3 3.5 V
ISTB Standby Current 3V Oscillator stops ¾0.1 1.0 mA
IDD Operating Current 3V fOSC=455kHz
No load ¾200 400 mA
IOH1 Output Source Current for DOUT 3V VO=2.7V -2.0 -4.0 ¾mA
IOL1 Output Sink Current for DOUT 3V VO=0.3V 50 100 ¾mA
IOH2 Output Source Current for LED 3V VO=2.7V -10 -60 ¾mA
IOL2 Output Sink Current for LED 3V VO=0.3V 1.2 2.0 ¾mA
IOH3 Output Source Current for C1~C8 3V VO=2.7V -0.6 -2.0 ¾mA
HT6221/HT6222
4 March 2, 2000
V
DD
CMOS IN/OUT CMOS IN
Pull-low
CMOS IN
OSCILLATOR
X1 X2
EN
10M W
CMOS OUT
V
DD
CMOS IN/OUT
Pull-low
Symbol Parameter Test Conditions Min. Typ. Max. Unit
VDD Conditions
IOL3 Output Sink Current for C1~C8 3V VO=0.3V 10 30 ¾mA
VIH1 Input High Voltage for R1~R8 3V ¾1.9 ¾3.0 V
VIL1 Input Low Voltage for R1~R8 3V ¾0¾0.8 V
VIH2 Input High Voltage for C1~C8 3V ¾1.1 ¾3.0 V
VIL2 Input Low Voltage for C1~C8 3V ¾0¾0.6 V
VIH3 Input High Voltage for AIN 3V ¾1.25 ¾3.0 V
VIL3 Input Low Voltage for AIN 3V ¾0¾0.6 V
RPH1 Input Pull-high Resistance for AIN 3V VIN=0V 100 200 400 kW
RPL1 Input Pull-low Resistance for AIN 3V VIN=3V 70 150 250 kW
RPL2 Input Pull-low Resistance for R1~R8 3V VIN=3V 120 200 320 kW
RPL3 Input Pull-low Resistance for C1~C8 3V VIN=3V 300 500 1500 kW
fOSC System Frequency ¾455kHz ceramic
resonator ¾455 ¾kHz
HT6221/HT6222
5 March 2, 2000
Functional Description
Keyboard scan
The HT6221/HT6222 remain in the halt mode
during the standby state (at this time, the oscil-
lator stops, and the standby current<1mA). The
HT6221 consists of 32 active keys, and the
HT6222 has 64 active keys. The keyboard
forms of the HT6221/ HT6222 are shown below.
·The HT6221 keyboard form
·The HT6222 keyboard form
C1
R1
R2
R3
R4
R5
R6
R7
R8
K1
K2
K3
K4
K33
K34
K35
K36
K5
K6
K7
K8
K37
K38
K39
K40
K9
K10
K11
K12
K41
K42
K43
K44
K13
K14
K15
K16
K45
K46
K47
K48
K17
K18
K19
K20
K49
K50
K51
K52
K21
K22
K23
K24
K53
K54
K55
K56
K29
K30
K31
K32
K61
K62
K63
K64
K25
K26
K27
K28
K57
K58
K59
K60
C2 C3 C4 C5 C6 C7 C8
K1
K2
K3
K4
K5
K6
K7
K8
K9
K10
K11
K12
K13
K14
K15
K16
C1 C2 C3 C4
R1
R2
R3
R4
K17
K18
K19
K20
K21
K22
K23
K24
K25
K26
K27
K28
K29
K30
K31
K32
C5 C6 C7 C8
HT6221/HT6222
6 March 2, 2000
When one of the keys (32 or 64 keys) is triggered
for over 36ms, the oscillator is enabled and the
chip is activated. If the key is pressed and held
for 108ms or less, the 108ms transmission codes
are enabled and comprised of a header code
(9ms), an off code (4.5ms), low byte address
codes (9ms~18ms), high byte address codes
(9ms~18ms), 8-bit data codes (9ms~18ms), and
the inverse codes of the 8-bit data codes
(18ms~9ms). After the pressed key is held for
108ms, if the key is still held down, the trans-
mission codes turn out to be a composition of
header (9ms) and off codes (2.5ms) only.
To avoid mistakes made by keyboard scanning
or simultaneous two-key inputs (except for the
three double-key active functions (K21+K22,
K21+K23, and K21+K24), the HT6221/HT6222
are facilitated with 36ms starting time.
The HT6221/HT6222 also provide three dou-
ble-key active functions (K21+K22, K21+K23,
and K21+K24) for tape deck recording opera-
tions. The double-key operation rules are
shown in timing 4 and timing 6.
Transmission codes
The transmission codes of the HT6221/6222 consist of a 9ms header code, a 4.5ms off code, 16-bit ad-
dress codes (18ms~36ms), 9ms~18ms 8-bit data codes, and the inverse code of the 8-bit data codes. The
following is an illustration of the transmission codes:
DOUT
X2
Key-in
(K 1~K64)
36m s m in.
9m s 45m s~63m s
108m s 108m s
(A0~A15+D 0~D 7+D 0~D 7 )
38kH z,
33% duty carrier
9m s 2.5m s 2.5m s
9m s
Key Enables
Fosc=455kH z
4.5m s 0.56m s0.56m s
Output format for the DOUT
Carrier
26.3m s
8.77m s
38kH z
38kHz carrier
"O n e "
"Zero"
data period (1.12m s)
data period (2.24m s)
38kH z carrier
38kH z carrier
0.56m s
Logic states
The output code carrier of the DOUT pin is shown in Timing 2:
The transmission codes employ the PPM (Pulse Position Modulation) method to represent their two
logic states by "0" (1.12ms) and "1" (2.24ms) as shown in Timing 3:
HT6221/HT6222
7 March 2, 2000
·Setting the address codes (A0~A15)
The algorithm rule of the address codes
(A0~A15) can be selected by mask option.
In this case, the 16-bit on-chip MASK ROM
(ROM1 and ROM2) are available, and the
value of ROM1 (8 bits) and ROM2 (8 bits) are
decided by one MASK LAYER. The current
value of ROM1 and ROM2 are both "00H".
The A0~A7 are set by logical OR between the
external switch S0~S7 and the ROM1. The
A8~A15 equal some bits inverted to A0~A7,
the inversion are decided by Logical OR be-
tween the external switch S8~S15 and the
ROM2.
For example:
The following is an illustration of these rules in
selecting the address codes (A0~A15).
1 0 0 0 1 1 0 0 1 0 1 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 1 0 0
A0 A1 A2 A3 A4 A5 A6 A7 Com plement
1 : n o n in v e rs io n
0: inversion
S0~S7 OR ROM1
S8~S15 OR ROM 2
1 0 1 0 0 1 0 0
1 1 0 1 0 1 1 1
External S w itch S0~S15:
O n-chip R O M 1, R O M 2:
A0~A7:
A8'~A15':
A8~A15:
bit0 bit7 bit0 bit7
H T6221/H T6222
AIN
1N 4148
´
8
S8
S7S6S5S4S3S2S1S0
S9 S10 S11 S12 S13 S14 S15
C1 C2 C3 C4 C5 C6 C7 C8
(S w itc h O p e n : 0 , S w itc h C lo s e : 1 )
200k
8
HT6221/HT6222
8 March 2, 2000
·Values of the data codes (D0~D7)
The HT6221/HT6222 contain 32 and 64 ac-
tive keys, respectively. Each key corresponds
to a data code. For tape deck recording, the
HT6221/HT6222 provide three double-key
functions. The double-key, single-key, and
double-key operation rules are shown in Ta-
ble 3, Table 4, Timing 4, Timing 5 and Timing
6.
Table 3: Double-key data code table
KEY Data Codes
D0~D6
Data Code
D7
K21+K22 1010110 0/1
K21+K23 0110110 0/1
K21+K24 1110110 0/1
Note: D7 is defined by an external switch
Table 4: K1~K64 single-key data code table
KEY Data Codes
D0~D6
Data Code
D7 KEY Data Codes
D0~D6
Data Code
D7
K1 0000 000 0/1 K33 0000 001 0/1
K2 1000 000 0/1 K34 1000 001 0/1
K3 0100 000 0/1 K35 0100 001 0/1
K4 1100 000 0/1 K36 1100 001 0/1
K5 0010 000 0/1 K37 0010 001 0/1
K6 1010 000 0/1 K38 1010 001 0/1
K7 0110 000 0/1 K39 0110 001 0/1
K8 1110 000 0/1 K40 1110 001 0/1
K9 0001 000 0/1 K41 0001 001 0/1
K10 1001 000 0/1 K42 1001 001 0/1
K11 0101 000 0/1 K43 0101 001 0/1
K12 1101 000 0/1 K44 1101 001 0/1
K13 0011 000 0/1 K45 0011 001 0/1
K14 1011 000 0/1 K46 1011 001 0/1
K15 0111 000 0/1 K47 0111 001 0/1
K16 1111 000 0/1 K48 1111 001 0/1
K17 0000 100 0/1 K49 0000 101 0/1
K18 1000 100 0/1 K50 1000 101 0/1
K19 0100 100 0/1 K51 0100 101 0/1
K20 1100 100 0/1 K52 1100 101 0/1
K21 0010 100 0/1 K53 0010 101 0/1
K22 1010 100 0/1 K54 1010 101 0/1
K23 0110 100 0/1 K55 0110 101 0/1
K24 1110 100 0/1 K56 1110 101 0/1
K25 0001 100 0/1 K57 0001 101 0/1
HT6221/HT6222
9 March 2, 2000
K21 Input
Km Input
(a )
K21 Input
Km Input
K21
(b )
(c )
(d )
K21 Input
Km Input Km
36m s< t <126m s 36m s
36m s
K21 Input
Km Input Km
DOUT
DOUT
DOUT N o transm ission
DOUT
108m s (m in.)
Km code transm ission
K21
N o transm ission
K21 code transm ission
K21
36m s< t <126m s 36m s
36m s 108m s (m in.)
Km
0< t <36m s
Km
K21
0< t <36m s
Invalid double-key input
KEY Data Codes
D0~D6
Data Code
D7 KEY Data Codes
D0~D6
Data Code
D7
K26 1001 100 0/1 K58 1001 101 0/1
K27 0101 100 0/1 K59 0101 101 0/1
K28 1101 100 0/1 K60 1101 101 0/1
K29 0011 100 0/1 K61 0011 101 0/1
K30 1011 100 0/1 K62 1011 101 0/1
K31 0111 100 0/1 K63 0111 101 0/1
K32 1111 100 0/1 K64 1111 101 0/1
Note: D7 is defined by an external switch
D7=0 : connect to VDD
D7=1 : connect to VSS
Valid single-key input
Valid double-key input
HT6221/HT6222
10 March 2, 2000
Kn
36m s
DOUT
(a )
Kn Input Kn
36m s
DOUT
(
b
)
t <108m s
108m s
t > 1 0 8 m s
Kn code transm ission
Kn code transm ission
Kn Input
Note: Kn can be one of K1~K64
K21 Input
t > 1 2 6 m s
K m In p u t
K21
36m s
36m s
108m s (m in.)
DOUT
Km
K21 code transm ission K 21+Km code
transm ission
Note: Km can be one of K22~K24
DOUT and LED
After the transmission codes are sent, the DOUT pin generates transmission codes with a carrier,
and the LED goes low to drive a transmission indicator.
Application Circuits
Application circuit 1
Note: Typical infrared diode: EL-1L2 (KODENSHI CORP.)
HT6221/HT6222
11 March 2, 2000
H T6221
D7
VSS
10
7
5
C1 C2 C3 C4 C5
51k
8
1N 4148´8
C6 C7 C8 R1 R2 R3 R4
AIN
K1
K2
K3
K4
K5
K6
K7
K8
K9
K10
K11
K12
K13
K14
K15
K16
K17
K18
K19
K20
K21
K22
K23
K24
K25
K26
K27
K28
K29
K30
K31
K32
DOUT
LED
VDD
8050
1.8V~3.5V
330W
47mF/16V
1kW
In fra re d
47W
11 6
X1 X2
455kH z
ceram ic resonator
89
100pF 100pF
V
DD
1918171615141312123420
LED
Application circuit 2
Note: Typical infrared diode: EL-1L2 (KODENSHI CORP.)
HT6221/HT6222
12 March 2, 2000
H T6222
D7
VSS
12
9
7
C1 C2 C3 C4 C5
51k
8
1N 4148´8
C6 C7 C8 R5 R6 R7 R8
AIN
R1 R2 R3 R4
K1
K2
K3
K4
K33
K34
K35
K36
K5
K6
K7
K8
K37
K38
K39
K40
K41
K42
K43
K44
K9
K10
K11
K12
K45
K46
K47
K48
K13
K14
K15
K16
K17
K18
K19
K20
K49
K50
K51
K52
K21
K22
K23
K24
K53
K54
K55
K56
K25
K26
K27
K28
K57
K58
K59
K60
K29
K30
K31
K32
K61
K62
K63
K64
DOUT
LED
VDD
8050
1.8V~3.5V
330W
47mF/16V
1kW
In fra re d
47W
13 8
X1 X2
455kH z
ceram ic resonator
10
11
100pF 100pF
V
DD
2120191817161514232412345622
HT6221/HT6222
13 March 2, 2000
Copyright Ó2000 by HOLTEK SEMICONDUCTOR INC.
The information appearing in this Data Sheet is believed to be accurate at the time of publication. However, Holtek
assumes no responsibility arising from the use of the specifications described. The applications mentioned herein are
used solely for the purpose of illustration and Holtek makes no warranty or representation that such applications
will be suitable without further modification, nor recommends the use of its products for application that may pres-
ent a risk to human life due to malfunction or otherwise. Holtek reserves the right to alter its products without prior
notification. For the most up-to-date information, please visit our web site at http://www.holtek.com.tw.
Holtek Semiconductor Inc. (Headquarters)
No.3 Creation Rd. II, Science-based Industrial Park, Hsinchu, Taiwan, R.O.C.
Tel: 886-3-563-1999
Fax: 886-3-563-1189
Holtek Semiconductor Inc. (Taipei Office)
5F, No.576, Sec.7 Chung Hsiao E. Rd., Taipei, Taiwan, R.O.C.
Tel: 886-2-2782-9635
Fax: 886-2-2782-9636
Fax: 886-2-2782-7128 (International sales hotline)
Holtek Semiconductor (Hong Kong) Ltd.
RM.711, Tower 2, Cheung Sha Wan Plaza, 833 Cheung Sha Wan Rd., Kowloon, Hong Kong
Tel: 852-2-745-8288
Fax: 852-2-742-8657