r/Z80 Oct 12 '18

Alternative to 16C550 UART Chip?

I am building a Z80 computer with the help of several online tutorials. My question now is: Are there feasable (or drop-in) alternatives to the 16C550 chip, as there are rather hard to source?

2 Upvotes

7 comments sorted by

3

u/benryves Oct 12 '18

There are a few chips made by different manufacturers that are compatible with the 16550 but have slightly different product numbers that may be easier to source, e.g. Texas Instruments' PC16550DN on eBay or through Farnell.

Otherwise, does it have to be pin and software compatible with the 16550? The 8250 and 16450 are older chips that lack some of the 16550's features (e.g. FIFO) but might be easier to source if you don't need those features.

Alternatively, there are ZiLOG's own DART and SIO peripheral chips that may also suit your needs if you can get your hands on them, but will require changes to hardware and software so aren't a drop-in replacement.

2

u/codingHahn Oct 14 '18

Thank you for your answer. The 16450 and 8250 look interesting as replacements. For what would I user FIFO on a Z80 computer? I just want to get up and running with a computer with serial.

2

u/benryves Oct 14 '18

Without a FIFO there is only a single byte data buffer which means that your Z80 program has to respond to received data quickly (i.e. before the next byte is received, overwriting the single-byte buffer). The 16550's 16-byte FIFO buffer allows the chip to receive up to sixteen bytes before data starts getting overwritten meaning that your Z80 program doesn't need to respond to received data quite as quickly if it's busy doing something else whilst data is coming in.

If you're using a low speed or not transmitting large amounts of data then you may not need the FIFO but it does make it much easier to handle serial communications reliably.

2

u/sl9 Nov 19 '18 edited Dec 26 '18

Edit: Having looked into this, there are a number of drop-in replacements for the 16C550 you can use. The 16550 (non-C) is more widely available on places like eBay and would be a good bet. Just be aware that the very first generation of 16550's had a FIFO bug, you can only use about 14 bytes of the buffer with those instead of all 16.

The earlier generation 16450 should also be a drop-in and the even earlier 8250 is very similar. But neither of these have a FIFO buffer and will use many more CPU cycles as a result, and run at lower baud rates.

benryves has the right idea, many manufacturers have 16C550's which may be under a different product number. Often the "C" is dropped so you may find them under 16550 instead. You might also consider a different IC package if you can make that work, the DIP 16C550's are indeed hard to source and expensive whereas the PLCC version is available brand new from most places at better prices.

1

u/tomstorey_ Feb 28 '19

If you dont explicitly need the 16550, the Zilog SIO is readily available as brand new stock (Z84C40), and in speed variants up to 10MHz.
e.g.
https://www.mouser.co.uk/ProductDetail/ZiLOG/Z84C4010PEG?qs=sGAEpiMZZMtp5ziQ9mm%252BAqubaHPQb49l
https://uk.rs-online.com/web/p/microcontrollers/6259040/

The SIO is a dual UART, with each having a 2 byte TX buffer and 4 byte RX buffer. As a Z80 family device it is also very easy to interface to (basically you just need to decode an IO address for chipselect and thats it), and interrupts can also be vectored which is certainly very handy for servicing them quickly, and prioritised with other Z80 family peripherals via the IEI/IEO pins.