beautypg.com

2 receive pin sampling, 3 ir decoding (receive, 2 receive pin sampling -22 – Maxim Integrated MAXQ Family User Manual

Page 100: 3 ir decoding (receive) example -22, Figure 9-12. ir receive pin sampling -22, Figure 9-13. biphase decoding example -22, Maxq family user’s guide, 3 ir decoding (receive) example

background image

9-22

MAXQ Family User’s Guide

9.5.2.2 Receive Pin Sampling

When IREN = 1 and IRTX = 0, the IR hardware supports the T2H register counting of internal T2L edges just as described for the IR

Transmit mode, but the function of the IRBB bit changes. The IRBB bit is used to store the state of the T2P input pin when a compare

match occurs between the T2H and T2CH registers. Additionally, the CCF[1:0] bits define which edge(s) of the T2 pin should trigger

reloads of the T2H counter to allow some form of synchronization when slightly different transmitter/receiver carrier frequencies and bit

timing exist. The user software would be responsible for reading the IRBB sampled pin states and recreating, based upon the IR encod-

ing format, the actual received data. The IRBB bit can be overwritten, thus the user software is responsible for reading the IRBB bit

between compare matches to avoid loss of captured pin data.

9.5.2.3 IR Decoding (Receive) Example

One possible decoding configuration is shown in Figure 9-13 with the T2CH register configured to produce a match after approximately

1/4 of the subcarrier cycles present during a fixed bit time. Each of the two IRBB samples could be examined to determine one

received bit.

Bit length decoding could use a similar strategy, possibly configuring the T2CH match register to 3/4 the number of subcarrier cycles

present in a 0 bit time. The collected IRBB pattern could simply be inverted to produce the actual input stream.

T2P INPUT

RELOAD (FALLING)

CCF[1:0] = 10b

IRBB

(T2CH MATCH)

1

0

1

0

0

0

1

1

0

1

Figure 9-13. Biphase Decoding Example

00h

T2CL

T2RL

FFh

T2CLK

T2POL[1]

T2MD = 1

T2OE[1] = 0

PORT LATCH

(IF PDx.x = 1)

T2PB

PIN

T2L 8-BIT TIMER

T2H 8-BIT COUNTER

T2P PIN

GATE

IREN

IRBB

SAMPLE T2P ON

T2CH MATCH

CCF[1:0]

T2P PIN

1

0

1

0

IREN = 1

IRTX = 0

00h

FFh

T2RH

T2RH

FFh

T2RH

T2CH

T2CH

EDGE

RELOAD

Figure 9-12. IR Receive Pin Sampling

Maxim Integrated