Brief and incomplete guide to reading IRP

From JP1 Remotes
Jump to: navigation, search

Contents

Brief and incomplete guide to reading IRP

General

{carrier frequency, time unit, sequencing rule} Mitsubishi:{32.6k,300}<1,-3|1,-7>(D:8,F:8,1,-80)+

Carrier Frequency

Hz; e.g. 38.3k; default is 0k--no modulation

Time Unit

Integer that can represent durations. Suffix u (default) is microseconds, p denotes number of pulses of the carrier.

Sequencing Rule

lsb|msb; lsb (default) means the least significant bit of a binary form is sent first.

BitSpec

Rule for the translating bit sequences to duration sequences. <ZeroPulseSeq|OnePulseSeq|TwoPulseSeq....>. Most IR protocols use only <ZeroPulseSeq|OnePulseSeq>, and the sequence is simply OnDuration,OffDuration. Example: NEC uses <1,-1|1,-3>

Bitfield

D:NumberOfBits:StartingBit. E.g. if D=71= 01000111, D:2:5 means x10xxxxx. D:2:5 = 10b = 2. ~ is the bitwise complement operator. ~D =10111000. Specifying the StartingBit is optional. D:6 is equivalent to D:6:0.

IRStream

The sequence of data. Enclosed in parentheses, items separated by commas. A trailing + means send one or more times. A trailing 3 means send 3 times; 3+ means at least 3 times. A trailing * means send zero or more times. NEC2: {38.4k,564}<1,-1|1,-3>(16,-8,D:8,S:8,F:8,~F:8,1,-78)+

Durations

no suffix means duration is expressed in Time Units, as defined above. m is milliseconds, u microsec, p pulses. No prefix means a flash, a preceding - (minus) means a gap.

Extent

A gap which trails a signal. The trailing gap is adjusted to make the total length of signal plus trailing gap equal to the extent. Notation is like a gap duration, except ^ replaces the minus sign. RC-5:(1:1,~F:1:6,T:1,D:5,F:6,^114m)+

Expressions

names, numbers and bitfields connected by standard symbols for arithmetic and logical operations. Enclosed in parentheses. Panasonic: {37k,432}<1,-1|1,-3>(8,-4,2:8,32:8,D:8,S:8,F:8,(D^S^F):8,1,-173)+

Permitted operators in decreasing order of precedence

  1. unary – (negation)
  2. ∗∗ (exponentiation)
  3. ∗ /, % (multiplication, integer division, modulo) (* is also used in IRStreams)
  4. +, – (addition, subtraction (+ is also used in IRStreams)
  5. & (bitwise AND)
  6. ^ (exclusive OR) (also used in extents)
  7. | (OR)
  8. ~ (complement) is permitted in Bitfields

Definitions

Expressions separated by commas, enclosed in curly brackets.
GI Cable: :{38.7k,490}<1,-4.5|1,-9>(18,-9,F:8,D:4,C:4,1,-84,(18,-4.5,1,-178)*) {C = -(D + F:4 + F:4:4)}

Assignments

For example T=T+1, which can be used to describe the RC-5 toggle bit.

Variations

Up to 3 expressions enclosed in square brackets. The first variation is sent on the first transmission, second for middle transmissons, and the third for the final transmission. E.g. the Zaptor toggle bit is zero until the last frame: [T=0] [T=0] [T=1]

Further Reading

Personal tools
Namespaces

Variants
Actions
Navigation
Tools