Laptop to PIC Interface

I have a hobby project where I would like to interface a laptop PC to a PIC project utilizing the PC's RS-232 port.

I have the PIC software and the PC software but I'm a bit uncertain as to the electrical interface between the two computers. Can I use the 1488 and

1489 ICs for this interface or is there something simpler?
Reply to
Marlowe
Loading thread data ...

Maxim MAX232 or similar parts do both RS-232->TTL and TTL->RS-232.

If you want to do it "cheap and nasty", a TTL inverter on the PIC serial out will normally drive a PC serial port.

The usual RS-232 drivers do both a level conversion and an inversion.

--
Peter Bennett, VE7CEI  
peterbb4 (at) interchange.ubc.ca  
new newsgroup users info : http://vancouver-webpages.com/nnq
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver.powersquadron.ca
Reply to
Peter Bennett

The very simplest way is to invert the output of your serial port and just connect it direct to the PC. Many (but not all) PCs will accept an 0-5V swing.

A better way is to use a chip like the MAX232A line interface. This is superior to the 1488/89 combo because it has its own on-chip charge pump to generate +/-10V.

Reply to
Lewin A.R.W. Edwards

As others have said, the MAX232-type chips are easier to use because they need only +5 volts and they generate the +/- 9 v. voltages using built-in charge pumps and four small capacitors that you supply. The

1488 and 1489 type chips will also work, but they are the older technology that required that you supply the voltages (+ and -) some other way. If you happen to have +12 and -12 volts available, you can use the 1488 and 1489. But for new designs the ones with the built-in charge-pump are the way to go. For strictly experimental use, you can try using a 0 to +5 volt swing. You will need to use inverters between your PIC and the PC because the PIC TxD and RxD lines are designed to be used with inverting buffers, such as the 1488/1489 or the MAX232. In receiving from the PC, take some steps to protect your input circuit from the possible +/-12v swing that you could find on the serial line from the PC. All you need here is a one-transistor inverting buffer with a large resistor on the base to be able to stand the +12v, and a diode to protect the base during the -12v times.

-Robert Scott Ypsilanti, Michigan (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)

Reply to
Robert Scott

Thanks to all for suggesting the MAX232. I downloaded the data sheet and it is just what I need.

As an aside, I live out in the country, but I have to go into the city for a dentist appointment Monday. I called the electronic supply store and inquired about whether they stocked the MAX232. Yes they did, but the price is $8.50 each. I just placed an internet order with Mouser Electronics for $1.05 each for the IN version!

PIC

and

address is fake.)

Reply to
Marlowe

You can get closer to proper specs by using an op-amp with +5/-5V supplies. You can even build in a little bit of hysteresis and adjust the trip point.

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
     USE worldnet address!
Reply to
CBFalconer

Also, I think Texas Instruments has a pin-compatible MAX232 equivalent.

-Robert Scott Ypsilanti, Michigan (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)

Reply to
Robert Scott

An interesting alternative to the MAX232 family that I've used many times with excellent results is the DS276. Although with somehow limited capabilities (e.g. 20 kbps max. data rate, only one transceiver per package, not fully compliant with the RS232 norm), this thing has been designed for battery-powered systems. The transmitter steals power from the receive signal line to save power. A single 8-pin chip without any external components is frequently all you need to implement a serial interface that consumes very little power. It is also very cheap.

-LENS

Life is not measured by the breaths you take, but by the moments that take your breath away...

PIC

and

address is fake.)

Reply to
Luis E. Navarro-Serment

There are lots of second sources. The retailer nearest our shop stocks (Hylink?) HY232 at CAN$2 each. When I looked to double check this, I see the board in front of me used an Analog Devices ADM232 instead.

Regards. Mel.

Reply to
Mel Wilson

Please don't toppost.

Put two in communication with each other and you have a perpetual motion machine :-)

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
     USE worldnet address!
Reply to
CBFalconer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.