Mark IV Wifi

John Coffman designed a blazingly fast, feature-dense Z180 CPU board using the ECB bus with half a meg of RAM, a large boot rom, 2 kinds of mass storage, and 2 serial ports. If that isn't enough, the ECB bus can be stuffed with many different I/O options, including a selection of graphics, disk controllers, and more. All open source and well supported by a vibrant user community. go see: https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:z180_mark_iv:z180_mark_iv

Note: working out the software has caused me to add some functionality to this boardlet that is not fully described in the images and step-by-step. they consist of:

  1. software control of the ESP-01 reset line. This uses an unused flip flop on the Mark IV, and has 2 short, straight wires on the back of the CPU card, no cuts and no software incompatibility. simply toggling a bit on an output port sets and resets the ESP-01 RST line, forcing a reboot. finally, I route the RST through one of the unused level shifters, so I meet the ESP-01's reset line specs.

  2. added a 2 pin header on the boardlet to allow connection of a debug serial output. GPIO2 and ground are brought out to a dupont header. I've color coded mine to make it clear which is the TX and which is the ground.

One thing I was puzzled by is the inclusion of a RS-422 serial port, along with an odd choice, an RJ-12 connector for it. I had no use for this, but looking at the board, I noticed that this real estate could be repurposed to do real networking. I have a few dozen of the most excellent ESP-01 modules, and they have a serial interface and do WIFI.

I desoldered the square post pins and replaced them with smaller round pins (0.5mm diameter) so I could put it into a socket. I cropped the pins to make them 3.5 mm long on the bottom.

Also, I needed to clear the decks on the Mark IV. I removed the RJ-12, the resistors for the RS-422, and the RS-422 driver chip.

A nibble tool is a handy item to trim proto boards, and I did just that to fill the space I just cleared.

I don't have a lot of space, and I'll need to put my connection socket pins, level shifters, a power supply, and the ESP-01. It will just fit, if I'm clever.

parts required: AMS-1117-3.3, 2 channel level shifter board, ESP-01, bypass cap, wirewrap wire, proto board, 12 square header pins, 16 round pins, 8 socket pins. Total cost about $10.00 US.

tools: nibbler tool, 8 pin machine tool socket jig, soldering iron.

using an 8 pin machine tool socket as a jig, I soldered in 8 pins onto the proto board. I trim these to about 4mm protruding down the bottom.

I also install 8 pin sockets for the ESP-01 onto the board. I've found these socket carriers to be an excellent technology for building prototypes.

I add a 2 channel Sparkfun level shifter boardlet to the bottom using square pin headers and clip off the protruding pins. I solder the pins on the top side. I'll later take the plastic pin holders off too, but I need them to hold the headers together until later. Note that the low voltage side of the level shifter is towards the ESP-01 socket. This makes the wiring much cleaner.

now, I add my power supply. A bone standard AMS1117-3.3 fits between the level shifter and the mounting socket.

Note that the tab on the back is Vout as well as the middle pin. I exploit this in the wiring. I did not happen to have a through-hole regulator in my parts box, so I used a surface mount part.

A 104 radial bypass cap fits just below the regulator, not clearly shown in this image, since it's on the top.

That's it for parts, now for the wiring.

I need to plug in the ESP-01 into the socket, because when I solder wires onto the socket pins, they would otherwise move or even fall out. The ESP-01 only needs to connect TX, RX, 3.3V, and ground, which are all on the corners. putting long chunks of wire wrap wire on the pins will make things a lot easier when stitching it all together. In this image, I've removed the level shifter board by pulling the plastic header holders and prying the board up.

Also, note the wire soldered to the regulator tab. this is an error, and I moved it on top of the level shifter board, which will be placed on the pins shown.

Now we finish the wiring on the bottom. the power tab goes to the low voltage line of the level shifter, the ESP-01 ground goes to the level shifter ground, the ESP-01 power is pulled from the middle pin of the regulator, both TX and RX are connected to both of the TXI pins of the level shifter.

The level shifter channels are bidirectional, so we ignore the RXI/RXO pins in the level shifter.

The level shifter really ought to have been an 8 pin board, and there is a 4 channel board with the same form factor.

The topside wiring is straightforward. Again, I need to put the 8 pin machine tool socket on the pins so they don't move during the soldering of the wires.

the RS422 driver chip only really uses pins 1-4, since we removed the unneeded resistors that connect the output side to pullups. I exploit this to make the wiring cleaner.

Pin 4 is ground, and we run this into the nearest pin on the regulator. this is tied to one side of the bypass cap on the other side. It further gets chained to both level shifter ground lines, labeled 'N'.

Pin 1 is VCC, and we run this into far side of the regulator, and chain off to the HV voltage on the level shifter, labeled 'Q'.

Pin 2 and 3 are tied to L and Q, which are the high sides of the level shifter data lines.

plug in the ESP-01, and then plug the whole thing into the Mark IV.

The default baud rate of the ESP-01 is 115200, and the serial port on the Mark IV does not have flow control. this is a problem. Changing the baud rate saved in the flash is done by doing a AT+CIOBAUD=38400.

The AT firmware on the ESP-01 is seriously downrev, and I have not been able to generate a newer one from the current Github repo.

To avoid this problem entirely, I have generated a straight passthrough firmware that connects the serial port on the Mark IV directly to a TCP port on a single machine. The Wifi, host, and port is all separately programmable into flash.

The serial port is accessed via UC1: or COM1: device.

RomWBW has the talk application, which is invoked by:

TALK UC1:

complete exploitation of the WIFI function, using CP/NET and/or other groovy things is incomplete.

There are 2 related github repos that contain forks of excellent CP/Net work which are being augmented to work with TCP and the ESP-01.

https://github.com/cm68/cpnet-server has the ESP-01 code, plus a unix server that matches it. https://github.com/cm68/cpnet-z80 contains a start at getting the CP/Net client for the Mark IV.


The complete installation. It fits securely and does not increase the Mark IV footprint.