Hello BDD and Floobydust,
Sorry for the delay in responding. I think I'm finally making progress. I've been attempting to add the delay-driven send/interrupt-driven receive code back into the Planck's software over the last few days and I've finally had some success. I'm now able to paste in a 200+ line Forth program without errors. The Planck is running at 6Mhz and the baud rate is currently set to 112500. I do have to use a 3ms intra-character delay and a 10ms end-of-line delay. Still this is progress!
The ACIA is a WDC 65C51. Jonathan's design is intended to run at 12Mhz and I think these speeds rule out 6551s other than WDC. I did buy a used Rockwell 2Mhz chip (I didn't see any 4Mhz parts on Ebay when I was looking); not surprisingly, it didn't work. I've also just received some 16550s and I hope to put together an add-on card for the Planck that uses one of those at some point.
I imagine that this would all have been easier if I hadn't chosen such a fast machine as my first build! Also, I should mention that Jonathan has not seen the same character dropping issues in his build, so there may be other factors at play.
BDD, thank you for your welcome! In response to your question about trying with slower baud rates; I had experimented with slower baud rates although I did not go down to 1200 baud. I also experimented with character delays on send. For error-checking, I was just sending formatted blocks of text that made it easy to spot when a character was dropped (this was after not being able to reliably paste source code into the Planck).
Floobydust, my main computer is a MacBook Air running the latest version of MacOS. I'm currently using a communications program called tio (
https://github.com/tio/tio), which I like quite a bit as it's small and mostly stays out of the way. It does support intra-character and end-of-line delays. I currently have it set to 3 ms between characters and 10 ms at end of line, and this is now successful, as mentioned above. I have also used CoolTerm and minicomm. Communication is via a USB to TTL cable. I highlight text in VIM, copy it to the system clipboard and paste into the terminal window. I run tio inside of terminal.app on the Mac.
The send/receive software setup that I have now is mostly based on
this post from SamCoVT in which he adapts Garth Wilson's interrupt tutorial. Of course, Sam has the use of a working Rockwell 6551, so I subbed in your delay loop and a simple delay-based send in the transmit section. It uses a 256 byte circular receive buffer.
I have attached a stripped-down version of the current (mostly-working) code that I'm adding back into Jonathan's software for his Planck computer, just so you can see where I'm at.
Thanks for noticing the lack of CTS/RTS on the Planck design. I might try wiring that up, because currently, if the receive buffer gets too full, it seems to just freeze and it definitely freezes with no character delays in between characters. I soldered a couple of bodge wires between pin 8 and rts and pin 9 and dsr, but it's late for me here and I'll have to have another go tomorrow.
Thanks for taking an interest!
Ben