beautypg.com

1 ir encoding (transmi, 1 ir encoding (transmit) example -21, Maxq family user’s guide – Maxim Integrated MAXQ Family User Manual

Page 99: 1 ir encoding (transmit) example

background image

9-21

MAXQ Family User’s Guide

9.5.2.1 IR Encoding (Transmit) Example

For any encoding scheme, the proper T2L subcarrier generation settings should be established along with the desired T2POL[1] bit

state. The T2POL[1] state takes effect once IREN = 1 and IRTX = 1.

For biphase encoding, the T2H reload value (T2RH) would be configured to count X subcarrier pulses in one half a bit time. The IRTX

enable bit should be configured to logic 1 to block the functionality of the T2 pin used in receive mode. The IRBB bit would initially be

configured to 0 to make the gated condition the starting state on the T2PB pin. At this point, the timer run bits for both the 8-bit timer/coun-

ters, which should be set. Once the timers are running, the software could then modify the IRBB control bit as needed for each half-bit

time. On each T2H overflow, the same T2RH value is used as the reload and IRBB would be used to control whether the T2L subcarri-

er output is enabled to the output pin or gated. This process would continue until the desired number of bits are transmitted, at which

point the user software would be responsible for placing the IR hardware back into receive mode or turning it off entirely.

For bit length encoding, the T2RH reload value could be modified selectively dependent upon whether a 0 or 1 subcarrier duration

needed to be transmitted. In this case, the IRBB control function would remain the same and would typically be toggled on every over-

flow. Figure 9-11 illustrates an example of bit-length encoding.

DESIRED OUTPUT

0

1

0

1

IRBB BIT

(SOFTWARE CONTROLLED)

T2RH

(SOFTWARE MODIFIED)

SHORT

LONG

SHORT

LONG

Figure 9-11. Bit-Length Encoding Example (T2RH Modified)

DESIRED OUTPUT

1

1

0

0

1

IRBB BIT

(SOFTWARE CONTROLLED)

Figure 9-10. Biphase Encoding Example (T2RH Remains Fixed)

Maxim Integrated