Line 13: Line 13:
 
|LSB-MSB(0-7)  || LSB-MSB(8-15) || LSB-MSB(16-23) || LSB-MSB(24-31)
 
|LSB-MSB(0-7)  || LSB-MSB(8-15) || LSB-MSB(16-23) || LSB-MSB(24-31)
 
|}
 
|}
Each bit is transmitted using the pulse distance as shown below. <br>
+
Each bit is transmitted using the pulse distance as shown in the image. <br>
 
<b>Logical '0':</b> A 562.5µs pulse burst followed by a 562.5µs space, with a total transmit time of 1.125ms<br>
 
<b>Logical '0':</b> A 562.5µs pulse burst followed by a 562.5µs space, with a total transmit time of 1.125ms<br>
 
<b>Logical '0':</b> A 562.5µs pulse burst followed by a 1.6875ms space, with a total transmit time of 2.25ms
 
<b>Logical '0':</b> A 562.5µs pulse burst followed by a 1.6875ms space, with a total transmit time of 2.25ms

Revision as of 17:52, 29 July 2016

IR Remote Controllers and receivers follow standard protocols for sending and receiving the data. Some of the standard protocols are NEC , JVC , SIRC (Sony Infrared Remote Control) etc. We will be discussing only the NEC protocol. After understanding the frame format of IR Remote, We will be interfacing a IR receiver with 8051 and decode the key pressed.

NEC Protocol

NEC IR protocol encodes the keys using a 32bit frame format as shown below.

NEC Frame Format
Address Complement of Address Command Complement of Command
LSB-MSB(0-7) LSB-MSB(8-15) LSB-MSB(16-23) LSB-MSB(24-31)

Each bit is transmitted using the pulse distance as shown in the image.
Logical '0': A 562.5µs pulse burst followed by a 562.5µs space, with a total transmit time of 1.125ms
Logical '0': A 562.5µs pulse burst followed by a 1.6875ms space, with a total transmit time of 2.25ms

When a key is pressed on the remote controller, the message transmitted consists of the following, in order:

  1. A 9ms leading pulse burst (16 times the pulse burst length used for a logical data bit)
  2. A 4.5ms space
  3. The 8-bit address for the receiving device
  4. The 8-bit logical inverse of the address
  5. The 8-bit command
  6. The 8-bit logical inverse of the command
  7. A final 562.5µs pulse burst to signify the end of message transmission.

The four bytes of data bits are each sent least significant bit first. Below image illustrates the format of an NEC IR transmission frame, for an address of 00h (00000000b) and a command of ADh (10101101b).

NecIrRemote 0.png

Downloads

Schematic 8051 Interfacing Zigbee.JPG Code and Explanation will be updated soon..