Specifications

177
CONSTRUCTION
with the torch on the photodiode. LED1
should flicker at the burst frequency rate
of the transmitter. This proves that the IR
signals are being detected by photodiodes
and converted into RS232-compatible lev-
els by the MAX232 and output at pin 7 of
MAX232 ICs is available for the PC to
read the pulses.
To test the transmitter side, discon-
nect the module from COM-1 (or COM-2)
port of the PC, and with the device pow-
ered ‘on’, use a short jumper wire from
+5V and touch it at pin 8 of MAX232 IC to
simulate a positive pulse. LED2 should
turn ‘off’ and IRLEDs and LED3 should
turn ‘on’ if the wiring is correct. IRLEDs
would also be glowing, although one can-
not see them glowing. Remove the link
wire from +5V to pin 8 of MAX232 IC and
connect back the ‘D’ connector to PC’s
COM-1 (or COM-2) port.
Run a simple communication software
like PROCOM
or TELIX. Set
the baud rate,
parity, bits per
character, and
stop bits to
9600, n, 8, 1,
respectively,
and send a few
characters from
the keyboard
through COM-1
(or COM-2)
port. You
should be able
to see LED3
flickering for a
few seconds, in-
dicating data
transmission.
Connect
both PCs to the
circuits and set
the software to
chat mode. You
should be able
to transfer data
between the
PCs, as if a
cable was con-
nected.
Depending
on the sensitiv-
ity setting and
power/angle of
IRLEDs, in-
crease the dis-
tance to about
35 cms (12
inches) and try
again for better
distance.
For more
power, use
metal-can type
IRLEDs and re-
duce the value
of resistor R7
for more drive
current. If you
use a laser
beam, as ex-
plained earlier,
remove the
IRLEDs and the
device will
track up to 10
metres with-
out any data
loss.
Hints
1. Aligning
the laser beam is a problem, but once it
is aligned carefully and fixed, the data
transmission and reception would be er-
ror-free. Transmitter and receiver align-
ment routines have been included in this
software program to aid in the alignment
process.
2. Ordinary clear photodiodes should
be used for detector. If you use dark-red
plastic-encapsulated diodes, you may have
problems, as these react only to very bright
natural light or infrared light.
EFY Lab Note. While testing, we did
face problems with red plastic-encapsu-
lated diodes as well as clear Darlington
detectors (GE’s L14F1), probably because
of various light sources in the room caus-
8250 Registers: Offset from Base Address
Offset LCR Bit 7 Meaning Read/write
0 0 Transmitter holding register (THR) Write
[when written to port]
0 0 Receiver data register (RDR) Read
[when read from port]
0 1 Baud rate divisor--low byte (BRDL) Read/write
1 0 Interrupt enable register (IER) Read/write
1 1 Baud rate divsior--high byte (BRDL) Read/write
2 x Interrupt identification register (IIR) Read only
3 x Line control register (LCR) Read/write
4 x Modem control register (MCR) Read/write
5 x Line status register (LSR) Read only
6 x Modem status register (MSR) Read only
TABLE IV
TABLE V
AL Register Bits
Bit
76543 210 Use
X X X • • Baud-rate code
X X Parity code
•••• X Stop-bit code
•••• XX Character-size code
Fig. 4: Actual-size, single-sided PCB for the circuit in Fig. 3
Fig. 5: Component layout for the PCB
TABLE VII
Parity
Bit
4 3 Value Meaning
0 0 0 None
0 1 1 Odd Parity
1 0 2 None
1 1 3 Even Parity
TABLE VI
Baud Rate
Bit Bits per
7 6 5 Value second
0 0 0 0 110
0 0 1 1 150
0 1 0 2 300
0 1 1 3 600
1 0 0 4 1200
1 0 1 5 2400
1 1 0 6 4800
1 1 1 7 9600
TABLE VIII
Stop Bits
Bit
2 Value Meaning
0 0 One
0 1 Two
TABLE IX
Character Size
Bit
1 0 Value Meaning
0 0 0 Not used
0 1 1 Not used
1 0 2 7-bit*
1 1 3 8-bit