XMODEM Baud Rate Mod for RC2014

Many users of the RC2014 retro computer have had difficulty getting XMODEM file transfers to work. At least part of the problem seems to be that the standard baud rate of 115200 bps is way too fast for the 7.3728MHz Z80 processor to handle. Unfortunately neither the MC68B50 ACIA used on the original RC2014 Serial I/O module nor the Z80 SIO used on the current Dual Serial SIO/2 module has an internal baud rate generator. Both boards simply feed the bus clock to the chip to generate a fixed baud rate of 115200 bps. This mod shows how to change the baud rate for one common RC2014 configuration, using the Dual Serial SIO/2 with the Dual Clock module.

The Dual Clock module generates two clocks. The CLOCK signal on pin 21 of the standard bus is used by the processor and related peripherals. The CLOCK2 signal on pin 21 of the enhanced bus is available for other uses. Each clock can be jumper-selected to a variety of rates, including divide-downs of the fast 7.3728MHz clock corresponding to standard baud rates down to 4800.

The Dual Serial SIO/2 module supports two serial ports. Port A is the primary port, wired to the RX and TX pins on the standard RC2014 bus, while Port B is wired to RXB and TXB on the enhanced bus. Port A is wired to always use the CLOCK signal from the standard bus. Port B uses the CLOCK2 signal from the enhanced bus. If the system doesn’t have a clock source connected to the enhanced bus, jumper JP1 on the Dual Serial SIO/2 module can be used to connect the two bus clocks together.

If we have both the Dual Clock module and the Dual Serial SIO/2 module, we can easily vary the baud rate of Port B by moving the clock rate jumper for CLOCK2 on the Dual Clock module. Unfortunately, lots of software (and some hardware, such as the Pi Zero Serial Terminal) assumes that Port A is the console port and also used for file transfer, so it doesn’t really help that we can set the baud rate on Port B. We can also vary the baud rate on Port A, again by moving the corresponding clock rate jumper on the Dual Clock module. Unfortunately, this changes the CPU clock as well, so as we slow down the baud rate we also slow down the CPU by the same factor. That doesn’t help with the problem that the CPU can’t keep up with the baud rate. We need to be able to lower the serial baud rate without slowing down the CPU clock. We will have to modify the wiring of the Dual Serial SIO/2 module to make this possible.

The SIO chip has five clock inputs. Pin 20 is the bus clock, which must be the same as the Z80 CPU clock. Pins 13 and 14 are the receive and transmit clocks for Port A. Pins 28 and 27 are the receive and transmit clocks for Port B. We need to separate pins 13 and 14 from pin 20, allowing pin 20 to remain connected to the CPU clock on the standard bus. Then we will need to connect pins 13 and 14 to some slower clock source.

We could choose to add a new baud rate generator for Port A. If we copied the divider circuit from the Dual Clock module, we’d need three ICs and a 2×10 header, which would be a lot of circuitry to bodge onto the Dual Serial SIO/2 board. Other circuit designs might be smaller, but still painful to add to the board. Let’s just use the existing clocks already available from the Dual Clock module. We could choose to simply use the CLOCK2 signal from the expanded bus, which is already available on the serial board. That would mean that Port A and Port B always used the same baud rate. If that’s a problem, we could instead run a flying lead from the clock select jumper pins on the Dual Clock module to Port A on the serial module. This mod accommodates either option.

On the Dual Serial SIO/2 circuit board (as of version 1.0), the wiring that connects pins 13, 14, and 20 is on the component side of the board, and is hidden under the IC socket for the Z80 SIO2. I didn’t want to remove that 40-pin socket to cut traces. Instead, I lifted pin 20 of the chip out of its socket and jumpered it directly to the CLOCK signal on the standard bus, right on the bus pin. Then I cut the trace from the bus pin to the rest of the board. That isolates the traces that connect pins 13 and 14 of the chip and also one side of JP1, the jumper that was intended to bridge CLOCK2 to the standard bus CLOCK. See photos.

IMG 8101

IMG 8103

Now we can install a jumper at JP1 to connect Port A’s clock inputs to CLOCK2, and run both Port A and Port B at the baud rate corresponding to CLOCK2. Or, we can run a flying lead from any baud rate we choose from either clock rate jumper header on the Dual Clock module to the Port A side of JP1 on the Dual Serial SIO/2 module, and run them at different baud rates.

IMG 8104

IMG 8127

I tested with the version of XMODEM for CP/M that is named XM.COM in version 2.9.1 of RomWBW. On the host side, I was running minicom 2.7 under Raspbian on the Pi Zero Serial Terminal board. I found that XMODEM transfers from the host to CP/M were perfectly reliable at 9600 baud, yielding a transfer rate of about 870 bytes/second (to RAM disk or to CompactFlash), about 90.6% efficient, on large files. I found that XMODEM transfers didn’t work at all at 19200 baud with this configuration.

Here’s a video of XMODEM working at 9600 baud on the RC2014: (YouTube)

Leave a Reply

Your email address will not be published. Required fields are marked *