Page 285 - Making PIC Microcontroller Instruments and Controllers
P. 285
PFOJECI O
5 VOLTS
0 oHtvts
. rhe IFI LED ls ON and
4
Siqnal
WE WANT,
THIS IS THE CONOITION
Single lR transmitter-phototransistor
pairwiring.
Note In the preceding case, vte haw pulkd all the pins on PORTB high. So the dor-
twi conditionfot oM setup should keep the signal highv)hen the liglx bea is not inter
rupted" When the phototrdnsistor sees the IR, it con lucts and its resistance goes to nectr
zem and the signal goes to wh4tewr sde the phototransistor is connected to. In our case,
this is 5 .rohs, so ttu siqnal is high when the IR is on and makes the transistor conduct.
Figure 20.8 pmrides the opposite condition.
The signal to the PORIB pin is off or low when the beam is not brcken. tt', d, rot
v,'ant this condition. The finished panel is shown in Figue 20.9.
The finished touch panel.

