IR Remote Control Info

Download Report

Transcript IR Remote Control Info

Part 1: Textbook Stuff
NEC http://www.sbprojects.com/knowledge/ir/nec.htm
NEC read mode
38KHz
Key down—skip over
header pulse
Space
<6T?
Repeat
During first pulse:
set up to read 8 bits
Pulse Position
Get 8 bits
Save Address
Repeat
Read 8 more bits &
ignore the inverted
address
Verify single pulse
Valid Repeat
Read data
Valid key
Save data
Set repeat flag
JVC
http://www.sbprojects.com/knowledge/ir/jvc.htm
JVC read mode
38KHz
Measure first
pulse (16bit)
> 8*
Threshold
?
yes
read space
no
Repeat?
Read addr
Read data
Read addr &
data
Same as
previous?
Verify /Addr &
/Data
Valid key
Valid Repeat
RCA (and Xbox) http://www.sbprojects.com/knowledge/ir/rca.htm
Philips RC-6 http://www.sbprojects.com/knowledge/ir/rc6.htm
Leader pulse
Normal bits
Leader and trailer bits
Panasonic http://users.pandora.be/davshomepage/panacode.htm
Daewoo http://users.pandora.be/davshomepage/daewoo.htm
Sony http://www.sbprojects.com/knowledge/ir/sirc.htm
Sharp http://www.sbprojects.com/knowledge/ir/sharp.htm
Philips RC-5 http://www.sbprojects.com/knowledge/ir/rc5.htm
Protocol Summary
Remote Carrier Header Modulation Addr (bits) & Data (bits) format MSB/LSB first
Repeat
NEC
38K
16T/8T
PPM
Addr(8), /Addr(8), Data(8), /Data(8)
LSB
header + single pulse
JVC
38K
16T/8T
PPM
Addr(8), Data(8)
LSB
no header
RCA
56K
8T/8T
PPM
Addr(5), Data(8), /Addr(5), /Data(8)
MSB
RC-6
36K
6T/2T Manchester
Addr(8), Data(8)
MSB
Pana
38K
8T/8T
PPM
Addr(5), Data(6), /Addr(5), /Data(6)
?
Daewo
38K
16T/8T
PPM
Addr(8), stopbit, Data(8), stop
LSB
Sony
40K
4T/1T
PWM
Data(7), Addr(5)
LSB
Sharp
38K
none
PPM
Addr(5), Data(8), Exp, Chk
LSB
RC-5
36K
S1,S2,T Manchester
Addr(5), Data(6)
MSB
Remote Control Recognition (“textbook”)
Evaluate
• Group 1: includes a large header
– NEC – 16:8 mark/space (38KHz)
– JVC – 16:8 (38KHz)
– RCA – 8:8 (56KHz)
– RC-6 – 6:2 (36KHz)
– Panasonic – 8:8 (38KHz)
– Daewoo – 16:8 (38KHz)
Set pulse
threshold = 5
Max pulse
> 5T?
• Group 2: short header
Yes:
Group 1
No
– Sony – 4 (40KHz)
Max pulse
> 12T
Yes
Sony
Yes
No
RC-6
– NEC, JVC, RCA, Panasonic,
Daewoo, Sharp
• Manchester
Sharp
– RC-5, RC-6
• Pulse width
– Sony
Determin
e if stop
bit is used
Max pulse
> 3T?
• Pulse Position Codes
Yes
Analyze
Measure shortest
pulse (= T)
Measure longest
pulse
Measure longest &
shortest spaces
Count total pulses
until large space
RC-5
No
Max pulse
> 7T
# of
pulses >
12?
No
Yes
NEC
No
• Group 3: no header
– Sharp (38KHz)
– RC-5 (36KHz)
# of
pulses >
20?
JVC
Yes
# of
pulses >
24?
Yes
RCA/Xbox
No
Panasonic
Yes
Daewoo
Part 2: Reality
Findings From Actual Measurements
• Vendors do not necessarily have unique protocols
– Example: Sharp uses NEC plus their own
• NEC protocol is the “standard” for off-brand remotes
– Even name-brands use it for many models
• Sony is unique—no variants and no one else uses it
• Several variants of the NEC protocol
– Toshiba & Daewoo use NEC with somewhat different timings
– JVC uses same header structure but different Addr/Data
•
•
•
•
Sharp is unique
RC5 used by many vendors
RCA not the same as RC5, as suggested in on-line info
Caveat: measurements only done on OLD remotes
– Used an X10 UR-19a to generate the signals
Some Measurements
Addr
T
LCCW
LCW
LPB
RCCW
RCW
RPB
UR19 TV code
header/maximum pulse
minimum pulse
maximum "space" (usually header)
minimum space
maximum spaces greater than 2T
number of pulses before a break
length of break (MSB only)
length of space after next header
NEC-like Signatures
Compro
--T
Addr
header/maximum pulse
130
16
T
minimum pulse
8
1
LCCW maximum "space" (usually header)
65
8
LCW
minimum space
7
1
LPB
maximum spaces greater than42T
RCCW number of pulses before a break
33
RCW length of break (MSB only) 512
64
RPB
length of space after next header
31
4
NEC
--T
130
16
8
1
65
8
7
1
4
33
512
64
31
4
JCV
171, 195
122
15
8
1
83
10
6
1
0
17
256
32
16
2
Xbox
-T
56
11
5
1
118
24
15
3
42
48
0
0
10
2
Sony (Rcvr)
015
T
36
4
9
1
107
12
7
1
0
12
256
28
8
1
Spherex
--T
130
16
8
1
64
8
7
1
7
33
512
64
31
4
Toshiba
062,084
131
16
8
1
87
11
7
1
12
33
512
64
68
9
Creative
--T
131
16
8
1
87
11
7
1
12
33
512
64
68
9
Daewoo
Toshiba
017,
214, 118
130
16
62
8
8
1
8
1
65
8
84
11
7
1
6
1
4
0
33
33
512
64
512
64
31
4
31
4
Not too reliable
Not reliable at all
016
067
130
025
Philips
016
T
13
1
13
1
83
6
34
3
3
10
-34
3
184
Panasonic
075
T
14
1
14
1
25
2
8
1
0
11
1000
12
1
Panasonic
Sharp
183
T 127, 185
51
7
5
1
7
1
5
1
24
3
202
40
5
1
10
2
0
2
max
15
0
512
12
2
25
5
Sharp
Turtle Beach
017,124, 126
128
16
128
16
8
1
8
1
64
8
64
8
7
1
7
1
7
7
33
33
512
64
512
64
32
4
32
4
Pioneer
128
8
64
7
7
33
512
32
16
1
8
1
64
4
RCA
TV
54
18
3
1
140
47
16
5
42
max
0
32
11
Mitsubishi
080
128
16
8
1
64
8
7
1
7
33
512
64
32
4
Revised Recognition Logic
Evaluate
• Group 1: NEC
– large header, 32 bit payload
• Group 2: JVC
Yes: Group
1& 2 & 6
Max pulse
>7T?
– large header, 17 bit payload
# of >2T
spaces >
30
• Group 3: Sony
– short header, 12 bit payload
– no header, 15 bit payload
• Group 5: RC-5
• Group 6: RCA
No
No:
Group 4, 5
– short header, large number of
spaces > 2T
• Group 7: RC-6
– Short header, max # of pulses
Sharp
• Pulse Position Codes
Yes
JVC
# of
pulses >
12?
No
– NEC, JVC, Sharp, RCA
• Manchester
– RC-5, RC-6
# of
pulses >
30
Yes
Max pulse
> 3T?
– no header, 10 bit payload
RC-5
Analyze
• Pulse width
– Sony
Measure shortest
pulse (= T)
Measure longest
pulse
Measure longest &
shortest spaces
Count total pulses
until large space
Sony
Yes
# of
pulses <
15?
RC-6
Measure length of
header space after
break (repeat)
Count total pulses
greater than 2T
RCA/Xbox
No: Groups
1&2
No: Groups
3,4,5 and 7
• Group 4: Sharp
Yes
Yes
NEC
Remote Control Input
Entry: IR
receiver routine
Return with zero
(‘no key’)
Pulse on?
(=‘0’)
Convert remote
key to keycode
Yes
Read the remote
Same as
last key?
Return with zero
(‘no key’)
variable delay
with key up
check
Timer Interrupt
Valid
addr?
Yes
Key
released?
Note: this is “as written”,
and it works
Short delay
Yes
Valid
header?
Yes
Return with zero
(‘no key’)
No
Yes
Return with zero (‘no key’);
disable repeat for next key
Return with key