Defective Silicon
I have had no luck getting an old Rockwell R6551 UART to actually receive data over serial. I suspect it's the chip itself, since I've confirmed my initialization program matches known working examples, and logic analyzer confirmed valid data on that pin. So I need a new one.
Turns out Western Design Center still makes a CMOS variant of the 6551, the W65C51. It's available as new stock from the usual legitimate retailers. I figured rather than risk picking up another defective unit from surplus, I'd get a new one. Besides, a newer model is sure to work better, right?
Right?
No. There are some serious flaws in the WDC implementation of the 6551. Most obvious is the Transmit Data Register Empty bit in the Status register is stuck and does not indicate that the TDR actually is empty. There is another bug that stops transmission if the chip is accessed while it is transmitting data. So interrupts are out, and polling status is out.
Members of the 6502.org forums discovered these bugs back in 2013, but the same manufacturing lot the plagued them is still the same lot available for purchase now. WDC has no interest or motivation to fix the bugs.
I thought I could work around this. Instead of checking TDRE bit and idle looping until it's set before transmitting, I could just transmit and idle loop for a millisecond(!) waiting for the chip to finish transmitting.
Sounded good at least. I never could get it to work. The first byte would transmit and then nothing else after that.
On paper, the 6551 is a great chip: compact, supports all hardware flow control signals, internal baud rate generator, readable command/control registers, etc. Unfortunately, I'm not having good luck with it. I think it might be time to try something else.










