a "bit-width" codification.
This is one of the more simple code
to understand and to decode.
consider the smaller time as T, measuring 600 microseconds.
transmited bit is composed by -T +T for bit zero or -T +2T for bit 1.
bit zero has a length of 1200us, while bit 1 is 1800us.
UP level (+T) on the above signal means infrared being transmitted
carrier, while the DOWN level means silence.
you hook up an infrared Module Sensor, you will see this waveform
at its output, since its output goes DOWN in presence of
save remote batteries, most manufacturers use to squeeze the UP
to 5/6 and some goes up to 3/4 of the original pulse width.
By doing this,
a 500 hours battery life extends to 600 hours (5/6) or to
800 hours in the
other manufacturers don't care about it, and reinforce the transmit
by expanding a little bit of the time the 36kHz carrier is active
means that in practical way, if you could scope the actual digital output
modulate the 36kHz carrier, based on the actual Sony Remote RM-Y123
see this signal waveform.
seems that Sony transmit 7/6 of what should be the carrier time.
lets see the frame data:
it is transmited a header, it can be considered a START bit.
The header has
3T width, or 1800 microseconds of active infrared.
the header you will find straight 12 bits, modulated as above.
500us of Silence
+ 700us of IR for bits ZERO,
500us of Silence + 1300us of IR for bits ONE.
first immediate bit after the START is the LSB of the 12 bits.
name this first bit as B0, the Last will be B12.
B0 to B6 form the 7 bits
for the Command Code.
B8 to B11 form the 5 bits for the Device Address.
Internet information say that Sony codification is broken down
to 3 blocks
of 4 bits, but it is not true, by doing that you can not
the device model or function.
the above example, Address is 02, Command is 16.
There are 32 possible Addresses
and 128 possible Commands.
whole transmited frame, Header + 12 bits, can vary in time,
since the ONE
bits are larger than ZERO bits.
If you hold the remote button pressed,
the whole transmited frame
repeats every 25ms.
easiest way to decode SONY infrared, is to measure time and
locate the "1"
you use one Infrared Detector Modules available at the Market,
the above waveform will be reversed as you can see below.
What is UP will
be Down and vice-versa:
following procedure to detect and identify the code, will work
microcontroller / microprocessor.
Set Var1 = 8, Var2 = 0
Start by waiting the signal to go DOWN - This will be the START Bit (T3
Wait for the signal to go UP - This will be the start of the bit.
Wait for the signal to go DOWN - This is the real thing, if short, bit
= 0, if long = 1.
Now Wait 750 to 950 microseconds.
Measure the Signal Level.
If the Signal is UP - Received Bit is ZERO
Set Carry Bit = 0
- Rotate Right Var1 (Carry Bit enters
- Rotate Right Var2 (Var1 Carry Bit enters
MSB Var2 and Var2 bit 0 goes to Carry).
- Check Carry
Bit, if ON Goto , if OFF Goto 
If the Signal is DOWN - Received Bit is ONE
Set Carry Bit = 1
- Rotate Right Var1 (Carry
Bit enters MSB Var1)
- Rotate Right Var2 (Var1
Carry Bit enters MSB Var2 and Var2 bit 0 goes to Carry).
Check Carry Bit, if ON Goto , if OFF Goto 
that here it goes back to  and not  as in 
is because if the signal still DOWN, you need to wait it goes UP,
 it is already in UP level, so it goes directly to the next step .
Here it already read all 12 bits.
Contains 8 bits, Var2 contains 4.
5 bits of Var1 is the Address.
The Right 3
bits of Var1 + 4 Left bits of Var2 form the Command.
you shift right Var1 + Var2 3 times, you will have the Right 5 bits of Var1
and the Left 7 bits of Var2 = Command.
doing this sequence, you only need a timming routine of 750 to 950
and don't need to measure individual bits.
loaded VAR1 with hex 8 (binary 00001000) at entry, this bit will exit
Carry only after 12 times "Rotate Right VAR1 + VAR2", since it
is 4 bits on Var1
plus 8 bits of Var2 to this happen. It is
used as a Rotation Right Counter Flag.
is the List of Var1/Var2 read from the
Remote Control RM-Y123:
: Command Description
------------- ------- -----------
01:12 Volume Up
is the List of Var1/Var2 read from the
Remote Control RMT-V124B:
Address : Command Description
-------------- ------- -----------
VB (Voice Booster)
you want to have your Sony remote control read and posted here, send it to our
posted at the home page. If you want your remote back, please
send $3.95 in stamps along with
the remote, so we'll ship it back to you
via priority mail (don't forget to include your name and mail
If you have a list of your Sony remote control codes just email me it,
I will post it here..
Lipnharski - UST Research Inc - March/2002