The circuit shown will
convert logic level voltages to and from RS232 serial voltages
levels.
For basic serial comms between a
Microchip PIC and a PC or other device you generally
only need to connect the Gnd, Txd and Rxd lines.
This little circuit will work with
a supply voltage of 3.3v to 5v making it ideal for interfacing with
a PIC
It derives the negative supply for
the RS232 transmit data from the serial RS232 receive data line in a parasitic
fashion. This means that the device it's connected to must
use voltage levels within the RS232 specification. You can't for
example connect two of these back to back since nothing is supplying
the negative voltage.
The RS232 physical specification
gives a logic 1 at the receiver input as -3 to -25 volts and logic 0
as +3 to +25 volts. You may find that the reliable
transmission over long cables, especially in electrically noisy environments
with a 3.3v supply is not possible.
We've successfully used this circuit to transfer
a 1.6Mb Linux kernel to a router at 115Kbs using a 3.3 volt supply
without any errors through several metres of cable.
|