PDA

View Full Version : PC serial port questions



achilles03
- 20th April 2011, 04:47
My old computer had a serial port that I could read 9600bps data exported from a 16F628 operating at 5V without a MAX232 chip. I installed a card with a parallel and serial port on my new computer to be able to interface with some legacy hardware, and when I try to read data from the same PIC, I don't get anything...

So my question is, was my old port operating with TTL as opposed to RS232? And is the new serial port I installed in my new computer operating with RS232? For reference, my old computer was XP, and my new computer has Vista.

Also, the CD with drivers has a bunch of subfolders and options... can I configure the serial port to be TTL as opposed to RS232?

Thanks in advance for any insight!
Dave

Charles Linquis
- 20th April 2011, 06:13
RS-232 voltage levels are +/- 3V to +/- 12V. This means that the receiver (your PC) - by specification - doesn't have to read the 0 to +4 V output of the PIC correctly.

The PIC will probably see the output of the PC, since most of them output +/- 10V or so. This also brings up a point - make certain that the input pin of your PIC has resistor in series!

And no, you can't change the driver to output TTL levels.

achilles03
- 20th April 2011, 19:09
So how come my older computer could read serial data from a PIC operating at 5V? Was it not "RS232"? I had ground between them connected, so the data line wasn't "floating".

Also, hypothetically speaking, couldn't I convert TTL to an "approximate" RS232 with an op-amp using 6+V with a 3V reference as ground? Or even a transistor tied to a 6+V supply with a 3V ref tied to the RS232 ground?

aratti
- 20th April 2011, 19:43
Using MAX232 (level converter) you will be able to Connect TTL to RS232 Without any problem.

Cheers

Al.

Charles Linquis
- 21st April 2011, 01:14
So how come my older computer could read serial data from a PIC operating at 5V? Was it not "RS232"? I had ground between them connected, so the data line wasn't "floating".

Also, hypothetically speaking, couldn't I convert TTL to an "approximate" RS232 with an op-amp using 6+V with a 3V reference as ground? Or even a transistor tied to a 6+V supply with a 3V ref tied to the RS232 ground?

A lot of things work outside of their specifications - they just aren't GUARANTEED to do so. A PIC pin is rated to sink 25mA. Most will do 80mA,
but that isn't something that I would expect from every device, under all conditions.

Some RS-232 receivers REQUIRE that the signal go negative, some don't. The spec says they must. Your ideas *may* work, but a properly configured MAX232 *will* work.

I suggest you read the Wikipedia explanation of RS-232. You obviously have a computer and an internet connection.