Consumer infrared is usually transmitted on a nominal 38KHz carrier - sometimes 36KHz or 40KHz. There are other frequencies, but these are generally only for specialist use
The carrier frequency indicates how rapidly the IR transmitter actually flashes on and off. When the transmitter is flashing at the nominated frequency, this is treated as logically 'ON'. The reason for using a pulsed transmitter is to make receivers more resistant to interference - it is unlikely that interference will be broadcast on exactly the same frequency.
Phase modulation relies on the change of state of the transmitter (either from 0 to 1 or 1 to 0) in order to encode the data. This mechanism uses a clock pulse, running at twice the data rate, and XORs the data with the clock. Thus, each bit of data is XORed with a clock at both 0 and 1
| Clock | Data | Result |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
So the bit sequence for data bits are:
| Data Bit | Output Sequence |
| 0 | 01 |
| 1 | 10 |
The RC-5 Protocol uses Phase Modulation in the polarity specified above. The packet format is:
| Bit | Meaning |
| 0 | Start bit - logic 1 |
| 1 | Field bit - MSb of Command Code |
| 2 | Control bit - toggles with each key press |
| 3-7 | System address (5 bits) MSb transmitted first |
| 8-13 | Command code (6 bits) MSb transmitted first |
Due to Manchester coding, each packet would be expected to be 28 bits in length - then decoded using the Phase technique into 14 bits, as above
From here3
Either the ON time or the OFF time is fixed, the other varies for 0 or 1
e.g. (Sony scheme)
| Data | ON/OFF time (microseconds) |
| 0 | 600/600 |
| 1 | 1200/600 |
Most schemes have a Preamble and Postamble component to their packets
| Frequency: | 40KHz (pulse=25 microseconds) |
| Burst time: | 24 cycles (600 microseconds) |
| Lead in: | 2400 microseconds ON / 600 microseconds OFF |
| Data 0: | 600 microseconds ON / 600 microseconds OFF |
| Data 1: | 1200 microseconds ON / 600 microseconds OFF |
| Lead out: | Additional OFF time of 990 microseconds |
Note that the OFF time is constant, except for the lead out
| Version A | Version B | Version C | |
| Lead in | Lead in | Lead in | |
| 7 bits | 7 bits | 7 bits | Command ID (LSb transmitted first) |
| 5 bits | 8 bits | 13 bits | Device Code (LSb transmitted first) |
| Lead out | Lead out | Lead out |
| Frequency: | 40KHz (pulse=25 microseconds) |
| Burst time: | 22 cycles (550 microseconds) |
| Lead in: | 8550 microseconds ON / 4275 microseconds OFF |
| Data 0: | 550 microseconds ON / 600 microseconds OFF |
| Data 1: | 550 microseconds ON / 2400 microseconds OFF |
| Lead out: | 550 microseconds ON / 35675 microseconds OFF |
Note that ON time is constant
| Lead in | |
| 8 bits | Device Code (LSb transmitted first) |
| 8 bits | Device Code compliment |
| 8 bits | Function Code (LSb transmitted first) |
| 8 bits | Function Code compliment |
| Lead out |
| 1 | http://en.wikipedia.org/wiki/RC-5 |
| 2 | http://en.wikipedia.org/wiki/Manchester_code |
| 3 | http://www.hifi-remote.com/infrared/IR-PWM.shtml |