Specifications

Chapter 3 – Input/Output Interfaces
86 PL 3120/PL 3150/PL 3170 Power Line Smart Transceiver Data Boo
k
Infrared Input
The infrared input object is used to capture a stream of data generated by a class of infrared remote control devices (see
Figure 3.43). The input to the object is the demodulated series of bits from infrared receiver circuitry. The period of the
on/off cycle determines the data bit value, a shorter cycle indicating a one, and a longer cycle indicating a zero. The
actual threshold for the on/off determination is set at the time of the call of the function. The measurements are made
between the negative edges of the input bits unless the invert keyword is used in the I/O declaration.
The infrared input object, based on the input data stream, generates a buffer containing the values of the bits received.
The resolution and range of the timer/counter period options is shown in Table 3.8 in the Notes section at the end of this
chapter.
This function can be used with an off-the-shelf IR demodulator such as an NEC µPD1913 or Sharp GP1U50X to
quickly develop an infrared interface to the PL Smart Transceiver. The edgelog input object can also be used for
this purpose. However, this requires more code.
Timer/Counter 1
Timer/Counter 2
IO10
IO9
IO8
IO0
IO1
IO2
IO3
IO4
IO5
IO6
IO7
mux
Input
Data Stream
IO11
INPUT
(IO0 TO IO7)
TIME
START OF
io_in()
END OF
io_in()
t
ret
t
fin
t
win (1 BIT)
Symbol Description Min Typ Max
t
fin
Function call to start of input sampling 82.2 µs
t
ret
End of last valid bit to function return max-
period
max-
period
t
win
Minimum input period width 93 µs
Note: max-period is the timeout period passed to the function at the time of the call.
Figure 3.43 Infrared Input Object