Virtual/software UART?

Virtual/software UART?

Post by SLee0 » Sat, 24 Feb 2001 04:45:59



I am developing a 'virtual/software' UART (Universal Asynchronous Receiver
Transmitter).
That is, using software to simulate the RS232 Serial port (COM0, COM1, COM2
etc.).
Instead of writing a byte to a hardware register and letting the hardware UART
( like an 8250 or
16550) shift the bits out, I will be doing the shifting in software,
writing/reading only to
a generic GPIO pin (as in an Intel Northbridge chipset) or to one pin of the
parallel port.

Has anyone developed something like this for Linux/UNIX before?

In a related question, Does anyone have sample code of a Linux kernal module
writing to the
8254 timer chip on a typical PC?

Thanks and best regards.

Sang

 
 
 

Virtual/software UART?

Post by Tauno Voipi » Sun, 25 Feb 2001 00:05:27



Quote:> I am developing a 'virtual/software' UART (Universal Asynchronous Receiver
> Transmitter).
> That is, using software to simulate the RS232 Serial port (COM0, COM1,
COM2
> etc.).
> Instead of writing a byte to a hardware register and letting the hardware
UART
> ( like an 8250 or
> 16550) shift the bits out, I will be doing the shifting in software,
> writing/reading only to
> a generic GPIO pin (as in an Intel Northbridge chipset) or to one pin of
the
> parallel port.

> Has anyone developed something like this for Linux/UNIX before?

The first advice is: Don't.

It was a popular way to handle 16 serial lines at the time of the
minicomputers (1970's). At least Data General Nova and several Digital PDP's
used this way of running several 110 bit/s lines together.

For the current line speeds the interrupt overhead is prohibitive. For
decent reception the bit interrupt rate should be at least 8 times the bit
rate. The usual UART's are using sampling at 16 times the bit rate.

Been there and done that.

Tauno Voipio


 
 
 

Virtual/software UART?

Post by Byron A Je » Sun, 25 Feb 2001 14:17:51



-

-> I am developing a 'virtual/software' UART (Universal Asynchronous Receiver
-> Transmitter).
-> That is, using software to simulate the RS232 Serial port (COM0, COM1,
-COM2
-> etc.).
-> Instead of writing a byte to a hardware register and letting the hardware
-UART
-> ( like an 8250 or
-> 16550) shift the bits out, I will be doing the shifting in software,
-> writing/reading only to
-> a generic GPIO pin (as in an Intel Northbridge chipset) or to one pin of
-the
-> parallel port.
->
-> Has anyone developed something like this for Linux/UNIX before?
->
-
-The first advice is: Don't.
-
-It was a popular way to handle 16 serial lines at the time of the
-minicomputers (1970's). At least Data General Nova and several Digital PDP's
-used this way of running several 110 bit/s lines together.
-
-For the current line speeds the interrupt overhead is prohibitive. For
-decent reception the bit interrupt rate should be at least 8 times the bit
-rate. The usual UART's are using sampling at 16 times the bit rate.
-
-Been there and done that.

It's doable with a bit of help. Think about using a Real-Time Linux program
to manage the timer interrupt.

As for sampling the input line, sampling at a 3X rate gives good results.

The original poster didn't specify a speed. Maybe 19.2K or 38.4K might be
good enough.

No clue on the PC timers. Just be aware that Linux uses those timers so
if you mess with them it's at your own peril.

BAJ

 
 
 

1. Virtual/software UART?

I am developing a 'virtual/software' UART (Universal Asynchronous Receiver
Transmitter).
That is, using software to simulate the RS232 Serial port (COM0, COM1, COM2
etc.).
Instead of writing a byte to a hardware register and letting the hardware UART
( like an 8250 or
16550) shift the bits out, I will be doing the shifting in software,
writing/reading only to
a generic GPIO pin (as in an Intel Northbridge chipset) or to one pin of the
parallel port.

Has anyone developed something like this for Linux/UNIX before?

In a related question, Does anyone have sample code of a Linux kernal module
writing to the
8254 timer chip on a typical PC?

Thanks and best regards.

Sang

2. Solaris 4.0.1 C++ compiler question

3. Virtual/Software UART?

4. COMMERCIAL: I am Linux campaign slogan

5. Virtual/Software UART

6. Strange behaviour of GNU 'sort' version 2.0.

7. Creative Phone Blaster

8. 16550 Uarts vs 16650 Uarts!

9. Is my modem UART 16450 or UART 16550 ?

10. Virtual Server Systems software

11. Virtual Host Management Software