I recently designed a Z80 SIO-based serial board for the RC2014 and had it built at OSH Park. I needed extra ports for my VT510, Decwriter LA100, and Model 33 Teletypes. Being stuck at 115200 baud would not hack it. This was my first attempt at PC board design and Kicad. It turned out very nicely, but not without problems.
The board has an onboard MC14411 bit rate generator providing selectable 9600, 2400, 1200, 300, and 110 baud rates as well as using the system clock for 115200 baud. The I/O port is selectable from 16 I/O port addresses and uses 8 bytes of I/O space. CTS is brought out to the serial port header to allow higher baud rate connections to the VT510 and LA100, which rely on hardware handshaking for reliable connections (when the SIO is programmed for “Autos”, transmit handshaking/flow control is automatically taken care of by CTS). CTS can also be jumpered to ground to disable this flow control. The board can also be configured to use either an SIO/0 or an SIO/2 through jumpers. (I ordered SIO/2’s from eBay, but got SIO/0’s.)
During performance testing I noted that performance at 115200 baud was abysmal. Numerous people on the RC2014 board said to add a delay after each character. That seemed to solve the problem, but inserting a 1 millisecond delay after each character drops the effective baud rate to something close to 9200 baud, which is slower than a 9600 baud connection. I wanted to find out why the performance was so poor and to fix the problem. So I acquired a logic analyzer and started testing.
I discovered that when the SIO dropped RTS (RTS High), two characters were dropped. RTS was dropped in the middle of a received character which was dropped. (See SIO_RTS_Anomaly below.) Note no IRQ or IORQ activity for the two characters received after RTS was dropped. I couldn’t believe this was happening, since both the Monitor ROM code and the CPM22 code (from Grant Searle) appeared to rely on dropping RTS to stop the data flow to prevent buffer overflow - as it should. Since the buffer high watermark is designed to allow any characters received after the RTS is dropped to be received and placed in the buffer, you would expect that it works that way. Nope!
A second test was run with the original RC2014 68B50 serial board. Everything worked as expected. The two characters that were received after RTS was dropped were processed as expected. Note the IRQ and IORQ activity for the two characters indicating that they were processed. (See ACIA_RTS_Test below.)
How could I fix this problem? Was the SIO I received a (mostly functional) clone? Is this behavior normal? Is anyone else having this problem?
My fix to the problem was to use the SIO DTR instead of RTS. This involved a minor board modification and a software change to toggle DTR instead of RTS. Results are shown in SIO_RTS_DTR_Fix below. I now have completely reliable communications at 115200 baud without inserting a delay after each character.
My fix to the problem was to use the SIO DTR instead of RTS. This involved a minor board modification and a software change to toggle DTR instead of RTS. Results are shown in SIO_RTS_DTR_Fix below. I now have completely reliable communications at 115200 baud without inserting a delay after each character.