Specifications

Remote Control and Receiver-Transceiver Specifications and Requirements
for Windows Media Center in Windows Operating Systems
130
The prefix byte contains the value 100 in the upper three bits and the data length in the lower five
bits. There can be as many as 30 bytes of data.
For the data bytes, the following format is used.
[h l6 l5 l4 l3 l2 l1 l0]
IR data is coded in a series of run-length coded bytes. The h bit indicates whether the signal is
high (1, on - light produced/received) or low (0, off). Bits l6 through l0 form the number L which is
the duration, in IR sample periods, during which the signal is high or low. L can range from 1 to
127. If a signal is high or low for more than 127 samples, multiple run-length coding bytes with
the same h bit may be used. The IR sample period may be hard-coded in the firmware to 50
microseconds.
The IR LED is turned off when the Data End command is received. If no Data End command is
received, the device returns an RSP_TX_TIMEOUT error.
When sending IR, the transmitting IR ports are set using the Set IR Transmit Ports command.
When receiving IR, a Last Received Port message is sent before the Data End byte to identify
which IR port received the data.
IR Data End Message
For the data bytes, the following format is used.
[1 0 0 0 0 0 0 0]
The Data End command indicates the end of a set of IR data.
When returning data received to the host, you must send this value at the end of the IR data. The
end of the IR data happens after there is a period of IR silence equal to the IR timeout value. The
Data End message must be sent after the RSP_EQIRRXPORTEN and RSP_EQIRRXCFCNT
messages.
When receiving data to transmit from the host, a Data End message will always indicate the end
of data. If you do not receive the Data End message, you should return RSP_TX_TIMEOUT to
the host.
Example: transmission
Because our sample period is 50 microseconds, 1 millisecond (ms) is 20 sample periods. So, our
IR signal would be on for 10 ms, then off for 20 ms, then on again for 10 ms. To send this IR to
port #1 with a 36 kHz carrier, the host would send the following sequence of bytes to the device:
// Set the output port.
[10011111] 0x9F CMD_PORT_IR IR command
[00010100] 0x08 CMD_SETIRTXPORTS set output ports
[00000001] 0x01 use the first port
// Set the carrier frequency 36 kHz.
[10011111] 0x9F CMD_PORT_IR IR command
[00000110] 0x06 CMD_SETIRCFS
[00000001] CP 1 - carrier prescalar
[01000010] CF 66 - carrier period
// Send the RLC.
[10001000] prefix byte 8 bytes of IR data follows
[11111111] on for 127 sample (6.35 ms)
[11001001] on for 73 sample (3.65ms bringing the total to 10 ms)
[01111111] off for 127 samples (6.35 ms)
[01111111] off for 127 samples (6.35 more ms bringing the total to 12.7 ms)
[01111111] off for 127 samples (6.35 more ms bringing the total to 19.05 ms)