BigDumbDinosaur wrote:
Way, way, way back when I did use the 6551 (the original, not the current broken one), I decided I was going to use IRQs in both directions and plugged away at it until I had a “foolproof” driver.
I posted my first attempt at a driver along with my current schematic on the previous page, though I'm sure it's anything but foolproof. It's the W65C51.s attachment - with all the comments it's already too big to include inline. I believe I have to maintain a flag that tracks whether the transmitter is busy or idle; the IRQ handler clearing the flag to idle if it finds the Tx buffer empty and the user 'serial_sendchar' subroutine setting the flag to busy again. The Rx code is simpler and, I agree, ought to be the higher priority of the two.
I'll be away for the next ten days or so visiting family, so no more tinkering for a while. However you celebrate this time of year, I wish you all a happy and peaceful time.