Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
100Ω
effect of ambient infrared light. Practically PD5(T1)
12
LEDs can handle. This last figure can be
PD6(AIN0)
every modern microcontroller sports one 13 found on the LED’s datasheet, which will
PD7(AIN1) D1
or more asynchronous serial interfaces ATmega8 also help determine a suitable pulse width
(UARTs), which make perfect partners for PB0(ICP)
14
to set in the software.
15 T1
IR receivers and transmitters. PB1(OC1A)
16
R4
PB2(SS/OC1B) 10k
PB3(MOSI/OC2)
17 The maximum baud rate that can be
An example of a suitable receiver is the 18 BC447 achieved will depend on the receiver cho-
PB4(MISO)
19
TSOP17xx, where the ‘xx’ stands for the PB5(SCK) sen. Using a TSOP17xx around 1200 baud
modulation frequency, measured in kilo- is possible, which should be adequate for
hertz. Its output can be connected directly 070170 - 11 simple control commands. For bidirec-
to the RxD pin of a microcontroller. tional communication it will be necessary
Because of the open-collector output stage, to build both a receiver circuit and a trans-
it is possible to connect several receiver mitter circuit at each end of the link. It is
modules in parallel to increase the area be used to provide modulation, or alter- worth bearing in mind that because of the
covered. The transmitter consists simply of natively an external NE555 can be used. effect of reflections scope for full-duplex
an IR diode and a couple of discrete com- In this example we are using an ATMega8 operation is rather limited.
ponents. A timer in the microcontroller can with Timer1 configured so that the output (070170-I