Virtual/Software UART

Virtual/Software UART

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



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 Michael Schnel » Sun, 25 Feb 2001 18:40:18


SLee000 schrieb:

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.

While I think it's possible you should note that this will take _a_lot_ CPU power
and is not very worthwile.

You need a timer that issues interrupts at a rate of _least_ 4 times the baudrate
for receiving. You need to sample the input line at this clock. You need to do the
sampling directly in the ISR otherwise you will be delayed too long by the OS. But
even here I suppose you will see some glitches when Linux masks the interrupt at
unwanted times (even true with quite low baudrates). You can use RT/LINUX  or a
similar add-on to overcome this, but I think it's much to complex regarding the
hardware saving you want. It would be _much better_ adding a hardware UART to the
system somehow.

 
 
 

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. bt848 video capture driver

3. Virtual/Software UART?

4. how to duplicate a linux installation?

5. Virtual/Software UART

6. Adaptek AHA1542 in PnP motherboards

7. Virtual/software UART?

8. change_passwd

9. 16550 Uarts vs 16650 Uarts!

10. Is my modem UART 16450 or UART 16550 ?

11. Virtual Server Systems software

12. Virtual Host Management Software