Sony SIRC decoder (original) (raw)
SIRC based IR Remote Control Information
All the work presented here is based on information researched on the Internet and my practical testing with a selection of genuine Sony remote controls while developing IR remote control projects for PIC microcontrollers.
It is in no way intended to be a definitive guide to the Sony SIRC protocol or the SIRC standard.
Use of the information on this page is entirely at you own risk as I make no claims to its accuracy or correctness.
PIC based IR remote control projects
Sony SIRC IR Decoder for PIC 16F88 (development project)
Decodes 12, 15 and 20 bit SIRC data streams
Tested with following Sony Remotes;
- RM-U215
- RMT-D166P
- RM-S325
Connections:
- Connect IR Receiver module TTL output to PIC RB0/INT input (use TSOP2238, TSOP1738 or similar)
- Optional monitor LED to PIC RA1 output
- Decoded SIRC data is transmitted as async' serial data from RB5/TX output. ( 38.4Kbs 8N1 )
Configured to use internal RC oscillator at 8Mhz so no external crystal required.
Do use a 100nF decoupling capacitor on the 5volt supply
Sample output
- command word -> cNNNNNNNN
- device word -> dNNNNNNNN
- 20 bit extended word -> xNNNNNNNN
- detected bit stream length [12 | 15 | 20 ] -> NN
- start pulse error -> S
- data pulse error -> D
With the Sony remotes tested, a single press of any button results in the same
code being sent three times in succession.
If the button is held down it will repeat the code indefinitely, but always a
minimum of three times.
Real World Example
The section below shows the output from TSOP2238 IR PCM Receiver captured using aSalea Logic probe.
The output from the TSOP2238 is active low. This means when it receives an IR burst from the remote
control, the output goes low. When no signal is received the output is high.
Note: in the screen shots below
- the active low pulse is called a 'Mark'
- the high (idle) state is called a 'Break'
The Sony SIRC protocol use the pulse length coding method.
The length of the mark pulse is used to determine the data. In theory just measuring the
length of the mark pulses will allow the data to be decoded, however it is best to measure
the mark+break to avoid spurious decodes.
All the Sony remote controls tested transmit the data at least three times, and therefore comparing two or more frames to ensure they contain the same data is also a good idea
to ensure spurious data hasn't been decoded.
The data coding uses multiples of a period of 600uS; one 600uS period is called 'T'
- Each data frame starts with a 4T mark followed by 1T break (5T = 3,000uS = 3mS)
- A '0' bit is 1T mark followed by 1T break (2T = 1,200uS = 1.2mS)
- A '1' bit is 2T mark followed by 1T break (3T = 1,800uS = 1.8mS)
- Every mark pulse is separated by a break of 1T
In the screen shot below the '7' button has been pressed on a Sony TV remote.
The data frame is sent a minimum of three times, more if the button is held down.
Each frame contains identical data.
Looking at one of the three frames from above in more detail.
The start pulse is shown below. You will see from the timing information at the right that
the mark is slightly long at 2.45mS but the overall period of the 4T mark + 1T break is 3mS
Here a '0' bit is highlighted. You see the 1T mark followed by 1T break
Again the timing information on the right shows the mark pulse is 0.65mS but the overall
mark + break is 1.2mS.
Here a '1' bit is highlighted with a 2T mark followed by 1T break
Again the timing information on the right shows the mark pulse is 1.25mS but the overall
mark + break is 1.8mS.
The final screen shot below shows the decoded output from a Sony TV remote with the
'7' button pressed.
- The TV remote is device address '1'
- Button 7 is command '6'
Remember that the bits are sentLSBfirst so to obtain the binary value we need to reverse
the order.
- Command bits transmitted as 0-1-1-0-0-0-0 is 0000110 binary = 6 decimal
- Address bits transmitted as 1-0-0-0-0 is 00001 binary = 1 decimal
Some 12-bit SIRC device/command codes this is not a definitive list
Device Address Type 1 TV 2 VCR 1 3 VCR 2 6 Laser Disc Unit 12 Surround Sound 16 Cassette deck / Tuner 17 CD Player 18 Equalizer | Command Function 0 Digit key 1 1 Digit key 2 2 Digit key 3 3 Digit key 4 4 Digit key 5 5 Digit key 6 6 Digit key 7 7 Digit key 8 8 Digit key 9 9 Digit key 0 16 Channel + 17 Channel - 18 Volume + 19 Volume - 20 Mute 21 Power 22 Reset 23 Audio Mode 24 Contrast + 25 Contrast - 26 Colour + 27 Colour - 30 Brightness + 31 Brightness - 38 Balance Left 39 Balance Right 47 Standby |
---|