You can Translate this page into various languages.
In this blog, I will described various IR protocols adopted by different companies and will go in detail about 2 protocols. One is the most commonly used NEC protocol and another is the Samsung protocol. Why??? Because I have Samsung TV which uses its own protocol and a GTPL setup box, which uses NEC protocol as simple as that.
Different Companies uses their own protocols for eg. we have protocols like Samsung, LG, RC5/RC6 by Philips,and the most commonly used protocol NEC protocol.
Samsung protocol goes in sequence like a start bit,8 bit address,8 bit address,8 bit data and inverse of 8 bit data. In total there are 32 bits after start bit containing address and data.Start bit of this goes like HIGH for 4.5 ms and LOW for 4.5 ms. Followed by this start bit, address and data bits are transmitted. Frequency of transmission is around 38 kHz. To be precise it is 37.9 kHz. Level HIGH and level LOW is decided based on the duration on the low level of the signal. Logic 1 and 0 is decoded like this:
This signal contains address – 11100000 data – 00100000.
NEC protocol is most commonly used for IR communication. Its frequency of transmission is around 38kHz. The difference in samsung protocol and NEC protocol can be easily identified by the start bit. Samsung has 4.5 ms mark and 4.5 ms space while NEC protocol have a start bit of 9 ms mark and 4.5 ms space.
Another difference between samsung protocol and NEC protocol is that NEC protocol contains Address and inverse of Address after that while samsung protocol repeats the address twice. Logic 1 and 0 of this protocol is same as that of samsung protocol.
Decoding and Transmitting Through Arduino
Than we will separate address and data from this array. Now as we know that in NEC protocol the first 8 bits are the address and 17th to 24th bit are the data. Hence we will sort it accordingly.
Thats it. We have decoded the NEC protocol. Now lets see how to transmit it via IR LED.
First of all we will make a array of 32 bit and store the address in first 8 bits and the inverse of the address in another 8 bits. I am fetching the address value in integer from EEPROM.
Than we will transmit this 32 bit data along with start bit and stop bit.Start bit of NEC protocol is HIGH for 9 ms and LOW for 4.5 ms. Here burst is the function which will send the HIGH signal at 38kHz frequency.
The pics in this blog are example of NEC protocol. I have attached link of a code for decoding and transmission of code of Samsung protocol.Further I am trying to make a self learning universal remote control which can simply copy the code into the memory and can be able to transmit the same signal. So that the issue of different protocols will be nullified.If any one have any idea regarding learning remote, do mail me.