SAMHOP SM5221

三合微科股份有限公司
SM5221-001/002
32 KEYS ENCODER
SAMHOP Microelectronics Corp.
GENERAL DESCRIPTION
FEATURES
The SM5221-001/002 is an infrared remote
control encoder LSI utilizing CMOS
technology. The transmission code
consists of "leader pulse", "16 bit customer
code", and "16 bit data code". Using
Micro-processors for decoder, various
applications can be realized.
* Low voltage operation ...... VDD=2.0 to 3.3V
* Low power consumption ...... IDD < 1μA at
standby mode
* 32 function keys and 3 double action keys
* 64 + 6 function codes are available.
(Using SEL terminal)
* 65536 customer codes can be selected.
(Using external R, Diode-SM5024A or internal
MASK ROM-SM5024B)
* 20pin SOP or DIP
APPLICATIONS
* Audio Remote Control
* Video Remote Control
* Consumer Product Remote Control
PIN ASSIGNMENTS (TOP VIEW)
KI0
KI1
KI2
KI3
Dout
VDD
SEL
OSCO
OSCI
VSS
1
2
3
4
5
6
7
8
9
10
20
19
18
17
16
15
14
13
12
11
CODE
KI/O0
KI/O1
KI/O2
KI/O3
KI/O4
KI/O5
KI/O6
KI/O7
LED
KI0
KI1
KI2
KI3
Dout
VDD
SEL
OSCO
OSCI
VSS
20 PIN DIP IN 300MIL
1
2
3
4
5
6
7
8
9
10
20
19
18
17
16
15
14
13
12
11
CODE
KI/O0
KI/O1
KI/O2
KI/O3
KI/O4
KI/O5
KI/O6
KI/O7
LED
20 PIN SOP IN 300MIL
Page 1
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
PIN DESCRIPTION
No. Pin Name I / O
1
KI0
I
2
KI1
I
3
KI2
I
4
KI3
I
5
DOUT
O
6
VDD
7
Function
Pin Name No.
Scan Key Input 0
With Pull Low
Scan Key Input 1
With Pull Low
Scan Key Input 2
With Pull Low
Scan Key Input 3
With Pull Low
I/O
Function
Scan Key Input 0
With Pull Low
Scan Key Input 1
With Pull Low
Scan Key Input 2
With Pull Low
Scan Key Input 3
With Pull Low
KI0
1
I
KI1
2
I
KI2
3
I
KI3
4
I
Remote Output
KI/O0
19
I/O
Key Scan 0
POWER
Postive Power
Supply
KI/O1
18
I/O
Key Scan 1
SEL
I
Data Select
KI/O2
17
I/O
Key Scan 2
8
OSCO
O
Oscillator Output
KI/O3
16
I/O
Key Scan 3
9
OSCI
I
Oscillator Input
KI/O4
15
I/O
Key Scan 4
10
VSS
POWER
KI/O5
14
I/O
Key Scan 5
11
LED
O
KI/O6
13
I/O
Key Scan 6
12
KI/O7
I/O
Key Scan 7
KI/O7
12
I/O
Key Scan 7
13
KI/O6
I/O
Key Scan 6
DOUT
5
O
Remote Output
14
KI/O5
I/O
Key Scan 5
SEL
7
I
Data Select
15
KI/O4
I/O
Key Scan 4
LED
11
O
16
KI/O3
I/O
Key Scan 3
CODE
20
I/O
17
KI/O2
I/O
Key Scan 2
OSCO
8
O
Oscillator Output
18
KI/O1
I/O
Key Scan 1
OSCI
9
I
Oscillator Input
19
KI/O0
I/O
Key Scan 0
VDD
6
POWER
20
CODE
I/O
Customer Code
Select Input
VSS
10
Negative Power
Supply (substrate)
Indicator For
Tramsmission
Page 2
Indicator For
Tramsmission
Customer Code
Select Input
Postive Power
Supply
Negative Power
POWER
Supply (substrate)
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
BLOCK DIAGRAM
OSCI
OSCO
VDD
Vss
OSC CIRCUIT
KI0
OUTPUT
TIMING GENERATION & CONTROL
KI1
CONTROL
CIRCUIT
DOUT
CIRCUIT
KEY INPUT SCAN
CIRCUIT
LED
KI2
CODE GENERATION CIRCUIT
CODE
KI3
KEY INPUT/OUTPUT SCAN CIRCUIT
SEL
KI/O0 KI/O1 KI/O2 KI/O3 KI/O4 KI/O5 KI/O6 KI/O7
FUNCTION DESCRIPTION
(1) Oscillation
The SM5221-001/002 oscillation circuit is designed for use of a 400 kHz or 500 kHz ceramic
resonator, but there may be mutual influence between variations in the IC and ceramic
resonator resulting in abnormal oscillation. The oscillation circuit starts to operate when a key
is depressed.
C1
C2
OSCI
OSCO
Page 3
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
(2) Key Scan
A pull-down resistor is inserted
keys are depressed simultaneously, transmission is disabled by the multi-depression
prevention circuit.
When a key is depressed, reading of the custom code and key data code is started, and DOUT
output begins 36 ms later, so that if the key is being depressed during this 36 ms interval one
transmission is performed. If a key is held down for 108 ms or longer, consecutive
transmissions of the leader code only are performed while the key is depressed.
Ex. f OSC = 455 kHz
Key Input
MIN. 36 ms
58.5 to 76.5 ms
108 ms
108 ms
(3) Data Code D7 Control
Data code D7 can be controlled by this pin, allowing 64 kinds of data to be transmitted.
D7 is set to "0" by connecting the SEL pin to VDD, and to "1" by connecting the SEL pin to
VSS. As the input of this pin is high-impedance, it must be connected to either VDD or VSS.
Page 4
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
TRANSMISSION CODE
(1) DOUT Output
The transmission code consists of a leader code, 16-bit custom code, and 8-bit data code.
The inverse code of the data code is also sent simultaneously, giving a total configuration
of 32 bits per transmission.
C0 C1 C2 C3 C4 C5 C6 C7 C0' C1' C2' C3' C4' C5' C6' C7' D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7
Leader
Code
Custom Code
Custom Code'
Data Code
Data Code
DOUT Output Code
The leader code consists of a 9 ms carrier waveform plus a 4.5 ms OFF waveform, and is
used as the leader for the following code. The code uses the PPM (Pulse Position
Modulation) method, with "1" and "0" differentiated by the time between pulses reference
following diagram. Each code consists of 8 bits, and simultaneous transmission of the
inverse code.
9 ms
4.5 ms
13.5 ms
Leader
Code
Custom Code'
Custom Code
8 bits
8 bits
18 ms to 36 ms
Data Code
8 bits
Data Code
8 bits
58.5 to 76.5 ms
0.56 ms
0.56 ms
1.125 ms
Bit 0
2.25 ms
Bit 1
Page 5
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
Continous Code
9 ms
11.25 ms
0.56 ms
Carrier
8.77 μs
26.3 μ s
9 ms or 0.56 ms
Carrier Frequency ...... fc = f OSC/12 = 38 KHz
(2) Custom Code Extension
The custom code can be set by the diodes connected to the CODE pin and the KI/O pins.
Connecting the CODE pin and KI/O pins via diodes gives a corresponding custom code of "1",
while no connection gives "0".
The above output codes can be obta
further extend the number of custom codes, 200 kΩ pull up resistors are added to pins KI/O0
through KI/O7,and the bit corresponding to a pin from among the custom code' outputs is
output without being inverted.
C0 C1 C2 C3 C4 C5 C6 C7 C0' C1' C2' C3' C4' C5' C6' C7' D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7
C0 C1 C2 C3 C4 C5 C6 C7
Leader Code
Custom Code A
Custom Code' B
Data Code
Data Code
DOUT Output Code
*: Pull-up resistor added to pins KI/O0 and KI/O2.
C0 and C2 output without inversion (non-inverted bits).
Page 6
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
(3) Custom Code
The DOUT output custom code can be set in any of 65536 ways by means of the diodes
attached to the CODE (Custom Code Select) pin and the KI/O pins and the pull-up resistors
attached to the KI/O pins. When a code other than code 00000000 (no diode connection)
is used.
(4) Custom Code Mask ROM Specification
The custom code can also be set by mask ROM. When the mask ROM specification is used
the custom code can be set without the connection of external diodes and resistors, and by
combining external diodes and resistors with mask ROM it is possible to output a code with
different contents from those set by the mask ROM. When mask ROM specification is used,
(Ver. I) or (Ver. II) can be selected.
Custom Code High-Order
8 Bits
Custom Code' Low-Order
8 Bits
Ver. I
Determined by logical OR of internal
ROM1 and external diode positions.
Determined by logical OR of interanl ROM2
and external pull-up resistor positions
Determined by logical OR of internal ROM2
and external pull-up resistor (KI/O0 thru
KI/O5) positions.
Ver. II
C0, C1, C2:
Determined by wiring one of pins
KI/O0 thru KI/O7 to CCS pin.
C3 thru C7:
Determined by internal ROM3 and
absence/presence of KI/O6 & KI/O7
external pull-up resistors.
* Standard product SM5221-001/002 uses the Ver. I
specification
Internal ROM is set as follows:
ROM 1
Custom code high-order 8 bits
0
0
0
0
0
0
0
ROM 2
Custom code' low-order 8 bits
0
0
C0 C1 C2 C3 C4 C5 C6 C7
0
0
0
0
0
0
0
C0 C1 C2 C3 C4 C5 C6 C7
* Standard product SM5221-002 uses the Ver. II specification.
Page 7
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
Internal ROM is set as follows:
ROM 3
C7, C6, C5,C4,C3 of Custom Code High-Order 8 Bits
Pull-Up resistor
ROM3
C7
C6
C5
C4
C3
KI / O6
KI / O7
ROM 3 - 0
0
0
0
0
0
No
No
ROM 3 - 1
1
0
0
1
1
No
Yes
ROM 3 - 2
1
0
0
0
0
Yes
No
ROM 3 - 3
1
1
1
0
1
Yes
Yes
0
0
C6'
C7'
ROM2
Custom code' low-order 8 bits
0
0
0
0
0
C0'
C1'
C2'
C3'
C4'
0
C5'
Page 8
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
(Ver. I)
Internal custom code ROM1 and ROM2 (total
(ROM1) corresponding to the external diodes, and 8 bits the part (ROM2) corresponding to the
external pull-up resistors.
(Ver. II)
With Ver. II, the CODE pin does not have the function of reading the external diodes.
Internal custom code ROM2 and ROM3 (total 28 bits) are effective, with 20 bits being the part
(ROM3) for setting the 4 channels of custom code C7, C6, C5, C4 and C3 as 5 bits each, and 8
bits being the part (ROM2) corresponding to the external pull-up resistors (excluding KI/O6 and
KI/O7).
With Ver. II 0/1 allocation to C2, C1 and C0 of the custom code high-order bits is set as shown in
the following table according to the pin connection status of KI/O0 through KI/O7.
CCS-
C2
C1
C0
KI/O0
KI/O1
KI/O2
KI/O3
KI/O4
KI/O5
KI/O6
KI/O7
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
When CODE pin is open
(C2 C1 C0) = ( 0, 0, 0)
Page 9
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
KEY DATA CODE
Connection
Key
KI0
K1
KI1
KI2
*
K3
*
*
K6
*
K7
*
*
K10
*
K11
KI/O2
*
K12
*
*
K14
*
K15
KI/O3
*
K16
K17
KI/O1
*
K8
K13
KI/O0
*
K4
K9
*
*
K18
*
K19
KI/O4
*
K20
K21
*
*
K22
*
K23
*
*
K26
*
K27
K30
K31
K32
KI/O6
*
K28
K29
KI/O5
*
K24
K25
KI/O
*
K2
K5
KI3
Data Code
*
*
*
KI/O7
*
*
D0
D1
D2
D3
D4
D5
D6
D7
0
0
0
0
0
0
0
0/1
1
0
0
0
0
0
0
0/1
0
1
0
0
0
0
0
0/1
1
1
0
0
0
0
0
0/1
0
0
1
0
0
0
0
0/1
1
0
1
0
0
0
0
0/1
0
1
1
0
0
0
0
0/1
1
1
1
0
0
0
0
0/1
0
0
0
1
0
0
0
0/1
1
0
0
1
0
0
0
0/1
0
1
0
1
0
0
0
0/1
1
1
0
1
0
0
0
0/1
0
0
1
1
0
0
0
0/1
1
0
1
1
0
0
0
0/1
0
1
1
1
0
0
0
0/1
1
1
1
1
0
0
0
0/1
0
0
0
0
1
0
0
0/1
1
0
0
0
1
0
0
0/1
0
1
0
0
1
0
0
0/1
1
1
0
0
1
0
0
0/1
0
0
1
0
1
0
0
0/1
1
0
1
0
1
0
0
0/1
0
0
1
0
1
0
0
0/1
1
0
1
0
1
0
0
0/1
0
0
0
1
1
0
0
0/1
1
0
0
1
1
0
0
0/1
0
1
0
1
1
0
0
0/1
1
1
0
1
1
0
0
0/1
0
0
1
1
1
0
0
0/1
1
0
1
1
1
0
0
0/1
0
1
1
1
1
0
0
0/1
1
1
1
1
1
0
0
0/1
Page 10
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
DOUBLE KEY OPERATION
When more than two keys except K21 + K22, K21 +K23 and K21 +K24 are depressed at the
same time, the transmission output stops.
Double key operation is useful for tape deck recording operation.
Double key operation form are following.
KEY
K21 + K22
K21 + K23
K21 + K24
D0
1
0
1
D1
0
1
1
D2
1
1
1
D3
0
0
0
D4
1
1
1
D5
1
1
1
D6
0
0
0
D7
0/1
0/1
0/1
(a) Operation
K21 Transmission
K21
D5+K22 to 24 Transmission
t > 126 ms
push
K22 to K24
push
(b) No operation
K21 Transmission
K21
No Transmission
36 ms < t < 126 ms
K22 to K24
(c) No operation
No transmission
K21
-36 ms < t < 36 ms
K22 to K24
(d) No operation
t > 126 ms
K21
K22 to K24
K22 to 24 Transmission
No Transmission
Page 11
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
CUSTOMER CODE ROM FORMAT
This LSI has customer code table ROM on the chip. So user can generate customer
codes without external parts.
The customer code ROM format is following.
Ver.1 or 2 SEL
C7
0
C6
0
C5
0
C4
0
C3
0
C2
0
C1
0
C0
0
ROM 1
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
ROM
PULL
SEL
UP
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
0
0
0
0
1/0
0
0
0
0
1/0
0
0
0
0
K/IO6
NO
NO
YES
YES
K/IO7
NO
YES
NO
YES
ROM 2
ROM 3
1)
2)
3)
4)
0
1
2
3
Ver. 1 or Ver. 2 selection ..... Ver. 1 = 01H, Ver. 2 = 02H
When a user selects Ver. 1, ROM1 is available for the customer code (C7 to C0) election.
ROM2 is available for the customer code' (C7' to C0') selection.
When a user selects Ver. 2, ROM3 is available for the customer code (C7 to C3)
selection. And a user can select ROM3-0, ROM3-1, ROM3-2 or ROM3-3 by the KI/O6
and KI/O7 pull up resistances.
Page 12
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
ABSOLUTE MAXIMUM RATINGS (Ta = 25 ℃)
Characteristic
Symbol
Value
Unit
Supply Voltage
VDD
6.0
V
Input Voltage
VIN
-0.3 to VDD
V
Power Dissipation
Pd
250
mW
Operating Temperature
Topt
-20 to +75
℃
Storage Temperature
Tstg
-40 to +125
℃
RECOMMENDED OPERATING CONDITIONS
Characteristic
Symbol
Min.
Typ.
Max.
Unit
Supply Voltage
VDD
2.0
3.0
3.3
V
Oscillation Frequency
fosc
400
455
500
KHz
Input Voltage
VIN
0
VDD
V
Custom code select
Pull up Resistance
Rup
160
240
KΩ
Page 13
200
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
ELECTRICAL CHARACTERISTICS (Ta = 25℃, VDD = 3.0 V)
Characteristic
Symbol
Min.
Typ.
Max.
Unit
Conditions
Supply Voltage
VDD
2.0
3.0
3.3
V
Current Consumption 1
IDD1
0.1
1.0
mA
f osc = 455 kHz
Current Consumption 2
IDD2
1.0
µA
f osc = STOP
DOUT High Level Output Current
IOH1
-8.0
mA
Vo = 1.5 V
DOUT Low Level Output Currenl
IOL1
30
µA
Vo = 0.3 V
LED High Level Output Current
IOH2
-15
-30
µA
Vo = 2.7 V
LED Low Level Output Current
IOL2
1
1.5
mA
Vo = 0.3 V
KI High Level Input Current
IIH1
5
30
µA
VIN = 3.0 V
KI Low Level Input Current
IIL1
-0.2
µA
VIN = 0 V
KI High Level Input Voltage
VIH1
0.7 VDD
VDD
V
KI Low Level Input Voltage
VIL1
0
0.3VDD
V
KI/O High Level Input Voltage
VIH2
1.3
VDD
V
KI/O Low Level Input Voltage
VIL2
0
0.4
V
KI/O High Level Input Current
IIH2
2
7
µA
VIN = 3.0 V
KI/O Low Level Input Current
IIL2
-0.2
µA
VIN = 0 V
KI/O High Level Output Current
IOH3
1.0
2.5
mA
Vo = 2.5 V
KI/O Low Level Output Current
IOL3
35
100
µA
Vo = 1.7 V
CODE High Level Input Voltage
VIH3
1.1
CODE High Level Input Current
IIH3
CODE Low Level Input Current
IIL3
CODE High Level Input Current
IIH4
CODE Low Level Input Current
IIL4
V
0.2
µA
Pull up
VIN = 3.0 V
-3
-10
µA
Pull up
VIN = 0 V
5
30
µA
Pull down VIN = 3.0 V
-0.2
µA
Pull down VIN = 0 V
Page 14
V.2.0 Mar 8,2002
三合微科股份有限公司
SM5221-001/002
SAMHOP Microelectronics Corp.
32 KEYS ENCODER
APPLICATION CIRCUIT
200pf
455KHZ
200pf
3V
47 µF
10
9
8
7
6
5
VSS OSCI OSCO SEL VDD DOUT
4
3
2
KI3
KI2
KI1
1
KI0
LED KI/O7 KI/O6 KI/O5 KI/O4 KI/O3 KI/O2 KI/O1 KI/O0
CODE
11
12
13
14
15
16
17
18
19
20
VDD
200KΩ
Page 15
V.2.0 Mar 8,2002