Many old machines and modern hobby projects have UART chips that have many disadvantages.
- Usually obsolete
- Expensive or Hard to get
- Small or non-existent FIFO buffers, causing missing characters from modern PCs
- Need RS232 buffers
- Need RS232-to-USB dongles to talk to modern (post 2004) PCs
- Need +/-12V power rails (unless the buffers generate these rails)
- Often need baud rate generators and crystals
- Over 520 times slower than USB 2.0 (115.2 kbaud vs. 60 megabits/s)
So there is strong motivation to replace them with a USB FIFO interface.
This can happen in new designs, e.g. https://hackaday.io/project/202193-beanzee
Upgrading boards with UARTs could be done by having the USB device sit in the UART socket.
- Pro: The USB chip select signal is on the socket
- Con: Needs different pinning for each type of UART
I had the idea of taking most of the signals from a static RAM socket. These are always in the same place, as per the JEDEC standard, unless the board has swapped address and data lines around (unlikely). The downside is:
- Pro: Suits any board with a static RAM socket (even boards without UARTs!)
- Con: The USB chip select signal will have to come from a flying wire
Next problem is the handshaking flag bit positions. These differ between UART chips. The options are:
- Software: Modify the firmware to use the flag bits where the USB module status has them
- Hardware: Route the status pins to where the existing software expects them
My preference is for the hardware solution. The right choice will depend on the situation.
The ideal situation is if the flags are in the right place already. This is the case for the 6850 UART, which is known to drop characters from the PC due to having no FIFO and the FTDI chip sending up to four characters after being told to stop. So that is a prime candidate for replacement.
Other points to note:
- All the UARTs I investigated have flags that go active high when the receiver has data to read and when the transmitter is ready to send data.
- The FTDI modules have these flags driving pins active low, and need inverting when read.
Keith
Jakob Faltisek
hesam.moshiri
Paul Stoffregen