Chinaunix首页 | 论坛 | 博客
  • 博客访问: 167311
  • 博文数量: 18
  • 博客积分: 285
  • 博客等级: 二等列兵
  • 技术积分: 201
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-02 11:26
文章分类

全部博文(18)

文章存档

2015年(2)

2014年(4)

2012年(12)

我的朋友

分类: LINUX

2012-09-10 13:38:23

原文:
Philips RC-5 Protocol

The RC-5 code from Philips is possibly the most used protocol by hobbyists, probably because of the wide availability of cheap remote controls.
The protocol is well defined for different device types ensuring compatibility with your whole entertainment system. Lately Philips started using a new protocol called RC-6 which has more features.

Features
  • 5 bit address and 6 bit command length (7 command bits for RC5X)
  • Bi-phase coding (aka Manchester coding)
  • Carrier frequency of 36kHz
  • Constant bit time of 1.778ms (64 cycles of 36 kHz)
  • Manufacturer Philips
Modulation

RC5 Modulation The protocol uses bi-phase modulation (or so-called Manchester coding) of a 36kHz IR carrier frequency. All bits are of equal length of 1.778ms in this protocol, with half of the bit time filled with a burst of the 36kHz carrier and the other half being idle. A logical zero is represented by a burst in the first half of the bit time. A logical one is represented by a burst in the second half of the bit time. The pulse/pause ratio of the 36kHz carrier frequency is 1/3 or 1/4 which reduces power consumption.

Protocol

The drawing below shows a typical pulse train of an RC-5 message. This example transmits command $35 to address $05.

RC-5 Pulse Train

The first two pulses are the start pulses, and are both logical "1". Please note that half a bit time is elapsed before the receiver will notice the real start of the message.
Extended RC-5 uses only one start bit. Bit S2 is transformed to command bit 6, providing for a total of 7 command bits. The value of S2 must be inverted to get the 7th command bit though!

The 3rd bit is a toggle bit. This bit is inverted every time a key is released and pressed again. This way the receiver can distinguish between a key that remains down, or is pressed repeatedly.
The next 5 bits represent the IR device address, which is sent with MSB first. The address is followed by a 6 bit command, again sent with MSB first.
A message consists of a total of 14 bits, which adds up to a total duration of 25 ms. Sometimes a message may appear to be shorter because the first half of the start bit S1 remains idle. And if the last bit of the message is a logic "0" the last half bit of the message is idle too.

As long as a key remains down the message will be repeated every 114ms. The toggle bit will retain the same logical level during all of these repeated messages. It is up to the receiver software to interpret this auto repeat feature.

阅读(4403) | 评论(0) | 转发(0) |
0

上一篇:NEC IR协议简介

下一篇:mips浮点运算的处理

给主人留下些什么吧!~~