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:

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.   Conveniently, the RS-422 driver chip has both the transmit and recieve data lines from the Z180 routed to it already.  We just hijack these via a level shifter and route them to the ESP-01.

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, 5Volt to 3.3Volt 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.  these single pin sockets are probably the most exotic parts on this build.  you can use alternates, like a regular machine socket or header, but it will be a lot uglier

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.  The sparkfun boardlet comes in several versions, and some of them have 4 bidirectional shifters, and some have 2 bidirectional and 2 single directional.    Either will work, as will clones.  The one pictured is the asymmetrical one.   There also are close knockoffs that have similar size and pinout, but these will require small rework.

Important for me was to manage the vertical space used by the boardlet, So I mounted the level shifter on the bottom in this build.   This is purely a matter of taste.

now, I add my power supply.   A bone standard AMS1117-3.3 fits between the level shifter and the mounting socket on the bottom of the board.  if you are using a different 3.3Volt regulator, pay attention to the pinout.  they do vary.

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.

to attach the wiring, I temporarily stick the round pins into a machine socket, since I'll be remelting the solder on the pins, and they could displace while adding wires. Also, I plug in an ESP-01 in for the same reason.

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.

There is an error in this image, where the regulator tab has a connection to ground.  This connection should be to Low Voltage.  the below image has this correct.

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 topside wiring is straightforward.   

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.