Maker Pro
Maker Pro

Simplest PC/Terminal Serial Interface?

J

Jim Miller

Jan 1, 1970
0
I need to interface a microcontroller based device to a PC or PDA running a
terminal program for occasional control, readout or calibration.

I am limited in pins to do this interface. The data rate can be 300baud if
necessary to minimize overrun issues. Of course 4800 or 9600 feels better
subject to the fact that the device end will be bitbanged.

Do I need to implement handshake lines at all, i.e. DTR, DSR, RTS?

If they need to be implemented can they just be hardwired to loop back to
the PC or PDA?

What's the minimum number of lines that will actually be reliable beyond TxD
and RxD?

Pointers to websites welcome.

thanks

jtm
 
P

petrus bitbyter

Jan 1, 1970
0
Jim Miller said:
I need to interface a microcontroller based device to a PC or PDA running a
terminal program for occasional control, readout or calibration.

I am limited in pins to do this interface. The data rate can be 300baud if
necessary to minimize overrun issues. Of course 4800 or 9600 feels better
subject to the fact that the device end will be bitbanged.

Do I need to implement handshake lines at all, i.e. DTR, DSR, RTS?

If they need to be implemented can they just be hardwired to loop back to
the PC or PDA?

What's the minimum number of lines that will actually be reliable beyond
TxD
and RxD?

Pointers to websites welcome.

thanks

jtm

You only need TXD and RXD and hardwire the other lines on the PC side to
satisfy it. The speed problem will be in your micro these days. A common PC
running a terminal emulator will be fast enough for 9600Bd assuming you're
not running to much other programs on it at the same time. You have the
possibility to use the Xon-Xoff protocol to do flow control. Most terminal
emulators can do this but implementing it in a micro reliably using
bitbanging will be quite a task.

petrus bitbyter
 
R

Rich Grise

Jan 1, 1970
0
You only need TXD and RXD and hardwire the other lines on the PC side to
satisfy it.

Actually, you need three, because you need at least signal ground. Looking
up serial port interfacing on the internet is trivially easy.
The speed problem will be in your micro these days. A common
PC running a terminal emulator will be fast enough for 9600Bd assuming
you're not running to much other programs on it at the same time. You have
the possibility to use the Xon-Xoff protocol to do flow control. Most
terminal emulators can do this but implementing it in a micro reliably
using bitbanging will be quite a task.

And, at 9600 BPS, in the same room, I wouldn't even worry about flow
control - If you drop a bit under those conditions, then there's something
wrong with the hardware or your bitbanger loop. ;-)

Good Luck!
Rich
 
R

Robert Baer

Jan 1, 1970
0
Jim said:
I need to interface a microcontroller based device to a PC or PDA running a
terminal program for occasional control, readout or calibration.

I am limited in pins to do this interface. The data rate can be 300baud if
necessary to minimize overrun issues. Of course 4800 or 9600 feels better
subject to the fact that the device end will be bitbanged.

Do I need to implement handshake lines at all, i.e. DTR, DSR, RTS?

If they need to be implemented can they just be hardwired to loop back to
the PC or PDA?

What's the minimum number of lines that will actually be reliable beyond TxD
and RxD?

Pointers to websites welcome.

thanks

jtm

Pin 7; the common line, for a total of three lines minimum if you
insist on communications in both directions.
The following will "loop back" the handshaking on each end:
source destination
2 ---------> 3
3 <--------- 2
4 ---| |--- 4
5 <--+ +--> 5
8 <--| |--> 8
7 ---------- 7
20 ---| |-- 20
6 <--| |--> 6
Not all equipment needs all of the handshaking shown, but one needs to
transmit at a rate slow enough so that the receiving end does not
overflow its UART (or equivalent).
One can use 2 or more stop bits to help guarantee that.
As a point of reference, the original IBM PC XT with its interpretive
BASICA could send and receive and save to HD at 1200 baud with a little
time to spare.
That means a tightly written machine language routine most likely
would communicate both ways (no saving to HD and no printing) at 2400
baud, with no lost characters.
 
J

Jim Miller

Jan 1, 1970
0
thanks all

i was more concerned with signal lines. of course i'll add a ground
reference.

the pin limitations were on the microcontroller not the cable.

tnx
jtm
 
Top