ETC HT6221(20SOIC)

HT6221/HT6222
Multi-Purpose Encoders
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 controllers
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 contain 32 keys
(K1~K32) and 64 keys (K1~K64), respectively.
When one of the keys is triggered, the programmed address/data is transmitted together
with the header bits via an IR (38kHz carrier)
transmission medium.
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.
Block Diagram
X 2
X 1
O s c illa to r
R 1
R 8
D iv id e r
K e y b o a rd
M a tr ix &
G a te
C ir c u it
D a ta R O M
& R e g is te r s
C 1
A IN
C 8
¸ 2 4 C o u n te r &
1 o f 2 4 D e c o d e r
D O U T
L E D
S y n c .
C ir c u it
B in a r y D e te c to r
V D D
D 7
1
Powered by ICminer.com Electronic-Library Service CopyRight 2003
D a ta S e le c t
& B u ffe r
V S S
March 2, 2000
HT6221/HT6222
Pin Assignment
R 3
1
2 4
R 2
R 4
2
2 3
R 1
R 1
1
2 0
A IN
R 5
3
2 2
A IN
R 2
2
1 9
C 1
R 6
4
2 1
C 1
R 3
3
1 8
C 2
R 7
5
2 0
C 2
R 4
4
1 7
C 3
R 8
6
1 9
C 3
D O U T
5
1 6
C 4
D O U T
7
1 8
C 4
V D D
6
1 5
C 5
V D D
8
1 7
C 5
D 7
7
1 4
C 6
D 7
9
1 6
C 6
X 2
8
1 3
C 7
X 2
1 0
1 5
C 7
X 1
9
1 2
C 8
X 1
1 1
1 4
C 8
1 0
1 1
L E D
V S S
1 2
1 3
L E D
V S S
H T 6 2 2 1
2 0 D IP /S O P
H T 6 2 2 2
2 4 D IP /S O P
Pad Assignment
K I3
K I2
K I1
K I0
C C S
K I4
2 4
2 3
2 2
2 1
2 0
1 9
K IO 0
1
K I5
2
K I6
3
4
R E M
5
9
1 0
1 1
1 2
1 3
K IO 6
8
K IO 7
O S C O
L M B
7
V S S
S E L
O S C I
6
K IO 1
1 7
K IO 2
1 6
K IO 3
1 5
K IO 4
1 4
K IO 5
(0 ,0 )
K I7
V D D
1 8
Chip size: 94 ´ 104 (mil)2
* The IC substrate should be connected to VDD in the PCB layout artwork.
2
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
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
-13.98
-41.99
15.39
15
41.95
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
I/O
Internal
Connection
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
¾
¾
9
D7
I
CMOS IN
10
X2
O
OSCILLATOR
455kHz resonator oscillator output
11
X1
I
OSCILLATOR
455kHz resonator oscillator input
12
VSS
¾
¾
13
LED
O
CMOS OUT
14~21
C8~C1
I/O
CMOS IN/OUT
Pull-low
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
Pin No.
Pin Name
1~6
Description
Positive power supply, 1.8V~3.5V for normal
operation
Most significant data bit (D7) code setting
Negative power supply
Transmission enable indicator output
Column control for keyboard matrix
3
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
Approximate internal connection circuits
C M O S IN /O U T
V
C M O S IN /O U T
P u ll- lo w
D D
C M O S IN
C M O S IN
P u ll- lo w
C M O S O U T
V
D D
O S C IL L A T O R
X 2
X 1
1 0 M W
E N
Absolute Maximum Ratings
Supply Voltage.................................-0.3V to 6V
Storage Temperature.................-50°C to 125°C
Input Voltage .................VSS-0.3V to VDD+0.3V
Operating Temperature ..............-20°C to 75°C
Note: These are stress ratings only. Stresses exceeding the range specified under "Absolute Maximum 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 exposure to extreme conditions may affect device reliability.
Electrical Characteristic
Symbol
Parameter
Ta=25°C
Test Conditions
VDD
Conditions
Min. Typ. Max. Unit
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
4
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
Symbol
Test Conditions
Parameter
VDD
Conditions
Min. Typ. Max. Unit
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
Functional Description
Keyboard scan
· The HT6222 keyboard form
The HT6221/HT6222 remain in the halt mode
during the standby state (at this time, the oscillator 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
C 1
C 2
C 3
C 4
C 5
C 6
C 7
C 8
R 1
K 1
K 5
K 9
K 1 3
K 1 7
K 2 1
K 2 5
K 2 9
R 2
K 2
K 6
K 1 0
K 1 4
K 1 8
K 2 2
K 2 6
K 3 0
R 3
K 3
K 7
K 1 1
K 1 5
K 1 9
K 2 3
K 2 7
K 3 1
R 4
K 4
K 8
K 1 2
K 1 6
K 2 0
K 2 4
K 2 8
K 3 2
R 5
K 3 3
K 3 7
K 4 1
K 4 5
K 4 9
K 5 3
K 5 7
K 6 1
K 3 4
K 3 8
K 4 2
K 4 6
K 5 0
K 5 4
K 5 8
K 6 2
K 3 5
K 3 9
K 4 3
K 4 7
K 5 1
K 5 5
K 5 9
K 6 3
K 3 6
K 4 0
K 4 4
K 4 8
K 5 2
K 5 6
K 6 0
K 6 4
C 1
C 2
C 3
C 4
C 5
C 6
C 7
C 8
R 6
R 1
K 1
K 5
K 9
K 1 3
K 1 7
K 2 1
K 2 5
K 2 9
R 7
R 2
K 2
K 6
K 1 0
K 1 4
K 1 8
K 2 2
K 2 6
K 3 0
R 8
R 3
K 3
K 7
K 1 1
K 1 5
K 1 9
K 2 3
K 2 7
K 3 1
R 4
K 4
K 8
K 1 2
K 1 6
K 2 0
K 2 4
K 2 8
K 3 2
5
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
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.
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 transmission codes turn out to be a composition of
header (9ms) and off codes (2.5ms) only.
The HT6221/HT6222 also provide three double-key active functions (K21+K22, K21+K23,
and K21+K24) for tape deck recording operations. 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 address 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:
K e y - in
(K 1 ~ K 6 4 )
K e y E n a b le s
3 6 m s m in .
X 2
F o s c = 4 5 5 k H z
4 .5 m s
0 .5 6 m s
3 8 k H z ,
3 3 % d u ty c a r r ie r
D O U T
9 m s
4 5 m s ~ 6 3 m s
(A 0 ~ A 1 5 + D 0 ~ D 7 + D 0 ~ D 7 )
9 m s
2 .5 m s
0 .5 6 m s
9 m s
2 .5 m s
1 0 8 m s
1 0 8 m s
Output format for the DOUT
The output code carrier of the DOUT pin is shown in Timing 2:
3 8 k H z
C a r r ie r
8 .7 7 m s
2 6 .3 m s
38kHz carrier
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:
3 8 k H z c a r r ie r
"Z e ro "
0 .5 6 m s
d a ta p e r io d ( 1 .1 2 m s )
3 8 k H z c a r r ie r
"O n e "
d a ta p e r io d ( 2 .2 4 m s )
Logic states
6
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
· Setting the address codes (A0~A15)
external switch S0~S7 and the ROM1. The
A8~A15 equal some bits inverted to A0~A7,
the inversion are decided by Logical OR between the external switch S8~S15 and the
ROM2.
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
For example:
The following is an illustration of these rules in
selecting the address codes (A0~A15).
H T 6 2 2 1 /H T 6 2 2 2
A IN
C 1
C 2
C 3
C 4
C 5
C 6
C 7
C 8
2 0 0 k W ´ 8
S 8
S 9
S 1 0
S 1 1
S 1 2
S 1 3
S 1 4
S 1 5
1 N 4 1 4 8 ´ 8
S 0
S 1
S 2
S 3
S 4
S 5
S 6
S 7
( S w itc h O p e n : 0 , S w itc h C lo s e : 1 )
E x te r n a l S w itc h S 0 ~ S 1 5 :
O n - c h ip R O M 1 , R O M 2 :
A 0 ~ A 7 :
1
0
0
0
b it0
0
1
0
0
0
1
0
0
1
0
0
0
0
S 0 ~ S 7 O R R O M 1
0
0
1
1
0
1
0
b it7
0
0
b it0
1
A 0 A 1 A 2
1
1
0
A 3
1
A 4 A 5 A 6
0
1
1
7
Powered by ICminer.com Electronic-Library Service CopyRight 2003
1
A 7
1
0
0
0
A 8 '~ A 1 5 ':
A 8 ~ A 1 5 :
0
0
0
0
0
1
0
0
0
0
S 8 ~ S 1 5 O R R O M 2
1
0
0
1
0
0
b it7
0
C o m p le m e n t
1 : n o n in v e r s io n
0 : in v e r s io n
March 2, 2000
HT6221/HT6222
· Values of the data codes (D0~D7)
Table 3: Double-key data code table
The HT6221/HT6222 contain 32 and 64 active 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 Table 3, Table 4, Timing 4, Timing 5 and Timing
6.
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
8
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
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
K 2 1 In p u t
K m
K 2 1
In p u t
K m
3 6 m s < t < 1 2 6 m s
3 6 m s
1 0 8 m s ( m in .)
D O U T
3 6 m s
K 2 1 c o d e tr a n s m is s io n
(a )
K 2 1 In p u t
K m
K 2 1
In p u t
K m
0 < t < 3 6 m s
N o tr a n s m is s io n
D O U T
(b )
K 2 1 In p u t
K 2 1
0 < t < 3 6 m s
K m
In p u t
K m
N o tr a n s m is s io n
D O U T
(c )
K 2 1 In p u t
K m
K 2 1
In p u t
K m
3 6 m s
3 6 m s < t < 1 2 6 m s
3 6 m s
D O U T
1 0 8 m s ( m in .)
K m
c o d e tr a n s m is s io n
(d )
Invalid double-key input
9
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
K n In p u t
K n
3 6 m s
t > 1 0 8 m s
D O U T
K n c o d e tr a n s m is s io n
(a )
K n In p u t
K n
t < 1 0 8 m s
1 0 8 m s
3 6 m s
D O U T
K n c o d e tr a n s m is s io n
(b )
Note: Kn can be one of K1~K64
Valid single-key input
K 2 1 In p u t
K m
K 2 1
In p u t
K m
3 6 m s
3 6 m s
D O U T
t > 1 2 6 m s
1 0 8 m s ( m in .)
K 2 1 c o d e tr a n s m is s io n
K 2 1 + K m c o d e
tr a n s m is s io n
Note: Km can be one of K22~K24
Valid double-key input
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.
10
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
Application Circuits
Application circuit 1
V
D D
1 .8 V ~ 3 .5 V
In fra re d
4 7 m F /1 6 V
3 3 0 W
4 7 W
1 0 0 p F
1 0 0 p F
1 k W
L E D
4 5 5 k H z
c e r a m ic r e s o n a to r
9
8
X 1
7
1 1
X 2
5
6
L E D
D O U T
V D D
H T 6 2 2 1
D 7
C 1
C 2
1 9
5 1 k W ´ 8
C 3
1 8
C 4
1 7
C 5
1 6
C 6
1 5
C 7
1 4
V S S
C 8
1 3
R 1
1 2
K 1
K 5
K 9
K 1 3
K 1 7
K 2 1
K 2 5
K 2 9
K 2
K 6
K 1 0
K 1 4
K 1 8
K 2 2
K 2 6
K 3 0
K 3
K 7
K 1 1
K 1 5
K 1 9
K 2 3
K 2 7
K 3 1
K 4
K 8
K 1 2
K 1 6
K 2 0
K 2 4
K 2 8
K 3 2
R 2
1
R 3
2
8 0 5 0
R 4
3
1 0
A IN
4
2 0
1 N 4 1 4 8 ´ 8
Note: Typical infrared diode: EL-1L2 (KODENSHI CORP.)
11
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
Application circuit 2
V
D D
1 .8 V ~ 3 .5 V
In fra re d
4 7 m F /1 6 V
3 3 0 W
4 7 W
1 0 0 p F
1 0 0 p F
1 k W
4 5 5 k H z
c e r a m ic r e s o n a to r
1 0
1 1
X 1
9
X 2
1 3
8
L E D
V D D
8 0 5 0
7
D O U T
H T 6 2 2 2
D 7
C 1
C 2
2 1
5 1 k W ´ 8
C 3
2 0
C 4
1 9
C 5
1 8
C 6
1 7
C 7
1 6
C 8
1 5
R 1
1 4
K 1
K 5
K 9
K 1 3
K 1 7
K 2 1
K 2 5
K 2 9
K 2
K 6
K 1 0
K 1 4
K 1 8
K 2 2
K 2 6
K 3 0
K 3
K 7
K 1 1
K 1 5
K 1 9
K 2 3
K 2 7
K 3 1
K 4
K 8
K 1 2
K 1 6
K 2 0
K 2 4
K 2 8
K 3 2
K 3 3
K 3 7
K 4 1
K 4 5
K 4 9
K 5 3
K 5 7
K 6 1
K 3 4
K 3 8
K 4 2
K 4 6
K 5 0
K 5 4
K 5 8
K 6 2
K 3 5
K 3 9
K 4 3
K 4 7
K 5 1
K 5 5
K 5 9
K 6 3
K 3 6
K 4 0
K 4 4
K 4 8
K 5 2
K 5 6
K 6 0
K 6 4
V S S
R 2
2 3
R 3
2 4
R 4
1
R 5
2
R 6
3
R 7
4
R 8
5
1 2
A IN
6
2 2
1 N 4 1 4 8 ´ 8
Note: Typical infrared diode: EL-1L2 (KODENSHI CORP.)
12
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000
HT6221/HT6222
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
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 present 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.
13
Powered by ICminer.com Electronic-Library Service CopyRight 2003
March 2, 2000