- •Preface
- •About this document
- •Intended audience
- •Organization
- •Typographical conventions
- •Further reading
- •ARM publications
- •Feedback
- •Feedback on this document
- •Feedback on the ARM PrimeCell Generic Infrared Interface (PL140)
- •Introduction
- •1.1 About the ARM PrimeCell Generic Infrared Interface (PL140)
- •1.1.1 Features of the PrimeCell GIR
- •1.1.2 Programmable parameters
- •1.2 Block diagram
- •1.3 AMBA compatibility
- •Functional Overview
- •2.1 ARM PrimeCell Generic Infrared Interface (PL140) overview
- •2.2 PrimeCell GIR functional description
- •2.2.1 AMBA APB interface
- •2.2.2 Register block
- •2.2.3 Receive and transmit clock divider
- •2.2.4 Transmit FIFO
- •2.2.5 Receive FIFO
- •2.2.6 Transmit logic
- •2.2.7 Receive logic
- •2.2.8 Interrupt generation logic
- •2.2.9 Synchronizing registers and logic
- •2.2.10 Test registers and logic
- •2.3 Infrared methodology
- •2.4 PrimeCell GIR operation
- •2.4.1 Interface reset
- •2.4.2 Clock signals
- •2.4.3 Receive processing
- •2.4.4 Receive demodulation
- •2.4.5 Receive FIFO information
- •2.4.6 Transmit processing
- •2.4.7 Transmit modulation
- •2.4.8 Clock dividers
- •Programmer’s Model
- •3.1 About the programmer’s model
- •3.2 Summary of PrimeCell GIR registers
- •3.3 Register descriptions
- •3.3.1 GIRFCR: [15] (+ 0x00)
- •3.3.5 GIRSTAT: [8] (+0x10)
- •3.3.7 GIRIIR/GIRICR: [3/0] (+0x18)
- •Programmer’s Model for Test
- •4.1 PrimeCell GIR test harness overview
- •4.2 Scan testing
- •4.3 Test registers
- •4.3.4 GIRTISR: [1] (+0x88)
- •4.3.5 GIRTOCR: [5] (+0x8c)
- •4.3.6 GIRTTXCDC [16] (+0x90)
- •4.3.7 GIRTRXCDC [16] (+0x94)
- •4.3.8 GIRTTXC [20] (+0x98)
- •4.3.9 GIRTRXPTC [20] (+0x9c)
- •4.3.10 GIRTDC [7] (+0xa0)
- •A.1 AMBA APB signals
- •A.2 On-chip signals
- •A.3 Signals to pads
Functional Overview
2.3Infrared methodology
Most infrared control systems only need to transmit small data rates, but a vital prerequisite is safety of transmission such that unintelligible signals must simply be ignored. Commands can be transmitted by digital transmission employing modulation of the infrared optical carrier. There are numerous standards established and the PrimeCell GIR is capable of implementing most of them.
Commands may be transmitted as a code word where data are defined as a series of bits or binary values.
There are various methods of encoding that may be employed to represent each bit as a symbol to be transmitted, and the PrimeCell GIR requires this encoding and decoding to be performed in software. Three commonly used representations of a bit in infrared remote control systems are as follows:
•Frequency Shift Keying (FSK) transmits a bit using two different frequencies. Although this is accepted as a safe method, a major disadvantage is cost and power consumption.
•Biphase modulation (Manchester encoding) represents a bit using an edge transition, where a rising edge represents 1 and a falling edge represents 0. The symbols are modulated by a carrier frequency.
•Pulse distance modulation is used with a carrier and also in a pulse modulated mode (also called flash mode). This is where distance between the rising edges defines the bit to be 0 or 1, for example, a short distance between two pulses represents a 0 and a long distance represents a 1.
ARM DDI 0149B |
© Copyright ARM Limited 1999. All rights reserved. |
2-7 |
Functional Overview
Frequency Shift Keying is illustrated in Figure 2-2.
Frequency Shift Keying (FSK) is coding of bits using two frequencies,
= frequency f1 = frequency f2
The sequence of the transmitted frequencies determines logic 0 or 1.
For example:
|
|
|
|
|
= logic 0 |
|
|
|
= logic 1 |
|
|||||||||
|
|
|
|
|
bit period |
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1 |
0 |
0 |
0 |
0 |
1 |
1 |
|
|
|
|
|
|
|
|
Figure 2-2 Frequency shift keying
In Figure 2-3 biphase encoding is shown where a rising edge within a time window represents a logic 1 and a falling edge denotes a logic 0.
Bi-phase encoding (Manchester encoding) represents a bit using an edge transition. For example
= logic 0 |
|
= logic 1 |
|
|
|
|
|
bit period
1 |
1 |
0 |
0 |
0 |
0 |
1 |
1 |
|
|
|
|
|
|
|
|
Figure 2-3 Biphase encoding
2-8 |
© Copyright ARM Limited 1999. All rights reserved. |
ARM DDI 0149B |
Functional Overview
Pulse distance modulation is illustrated in Figure 2-4.
Pulse distance modulation represents a bit by the distance between edge transitions. For example:
|
|
|
|
|
|
|
|
|
= logic 0 |
|
|
|
|
= logic 1 |
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1 |
0 |
0 |
0 |
0 |
1 |
1 |
|
|
|
|
|
|
|
|
Figure 2-4 Pulse-distance modulation
A commonly used standard in Europe is RC-5 which uses biphase encoding and modulation by a 36kHz carrier.
The transmission of a code word begins with two start bits (start bit, S and field bit, F) followed by a toggle bit (or control bit, C) that changes value in each code word (this distinguishes interruption of the infrared link from multiple key presses). The remainder of the code word consists of a 5-bit address and a 6-bit command.
The high phase of each bit in the code word consists of a burst of 32 pulses with a repetition rate of 36kHz. The timing is shown in Figure 2-5 on page 2-10.
ARM DDI 0149B |
© Copyright ARM Limited 1999. All rights reserved. |
2-9 |
Functional Overview
113.778ms
24.889ms
S |
|
F |
|
C |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
1 |
|
1 |
|
0 |
0 |
0 |
0 |
0 |
1 |
|
1 |
0 |
1 |
1 |
1 |
1 |
||
|
|
|
|
|
|
|
5 Address Bits |
|
|
|
|
6 Command Bits |
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6.944 s
27.778 s
32 Carrier Pulses
Figure 2-5 RC-5 code word transmission
With a 36 kHz carrier, the period is 27.778μs and at a duty cycle of 0.25 the carrier pulse duration is 6.944μs. Since the HIGH half of each symbol (bit) in the RC-5 code word consists of 32 carrier pulses, the symbol period is 64 x 27.778μs = 1.778ms and the 14
symbols (bits) of a complete RC-5 code word take 24.889ms to transmit. A RC-5 code word is repeated every 113.778ms (4096/fCARRIER) as long as a remote control key remains depressed.
2-10 |
© Copyright ARM Limited 1999. All rights reserved. |
ARM DDI 0149B |