I have already blogged on here about how awesome the Z88 is, and how ahead of it’s day it was. Well, being awesome in your own right doesn’t cut it these days – so you’ve got to be able to communicate and talk to things to be considered worthwhile.
The biggest weapon the Z88 has up its sleeve is the humble serial port. Combined with the built in terminal software (as well as the ability to ‘print’ serial data) and you’ve got a beast that’s almost ready to talk to anything. Almost…
But first there’s the slight problem of the non-standard pinout of the serial port, and then there’s the issue that few things these days use +\-6v to communicate
The solution to the level shifting is simple enough. A MAX232 is a simple chip that converts RS232 signals of up to +\-15v to a regular 5v. The same device is available in a 3v3 version which is called a MAX3232. Because I wanted to use the Z88 with a Raspberry Pi, which uses 3v3 logic and is not 5v tolerant, I went with a MAX3232. (Most 5v devices work fine with a 3v3 input, but it doesn’t work well the other way around – at least, not for long!)
Here’s a basic wiring diagram of what connects to where
Note that the MAX3232 does not use the RTS, CTS, CD or DTR lines, but for the Z88 to function properly, it needs the signals looping back as shown above.
Detailed view of the plug with looped back RTS\CTS and CD\DTR pins. Some Sugru will neaten this up and give it a bit of resilience!
In order to prove that this works, and I was able to talk to my Raspberry Pi with the Z88, I made up the circuit as shown in the diagram above with a MAX3232 available off the shelf in Maplins. (Ignore the Arduino, power module and temperature sensor – they’re part of other projects)
For the sake of making a more compact plug adapter, however, I bought some pre-made MAX3232 boards from eBay. These have all the capacitors on one side, and the chip on the other, and cost a fifth of what the chip alone from Maplins does… but you have to wait a few weeks for delivery from China
Using a spare offcut of Vero board, and some 2.54mm header pins, I knocked up this simple adapter to match a FTDI pinout
To neaten it up, and protect the dodgy soldering from abuse, I applied a liberal amount of Sugru and a hand made sticky label to show what’s what