The board uses a Z80 PIO in order to provide 16 digital lines (PD0-7, PB0-5, PC0-1). This was chosen over the 82C55 because you can set the bit directions per line and you can easily make any line an interrupt. The mapping to the Arduino digital pins is not 1:1. Instead they are ordered so that the normal SPI MISO and MOSI lines come out as bit 7 and 0 on port B. This allows much faster SPI bit banging (over 16Kbyte/second with the usual 7.3MHz Z80).


The I²C pins are wired to a PCF8584 which occupies the other half of the 8 I/O ports. This side should drive I²C devices but will need a correction first (the SDA/SCL pins are wrong)

There are a couple of other things that want changing. I would be useful to jumper the signals that the Arduino always wants to provide that we provide (right now that's the IOREF pin). That way it would be possible to build the board with through pins and actually piggyback an Arduino the other side so you can use an Arduino as an I/O processor.

It would also be nice to tweak the addressing. Right now it occupies 8 ports which means that if it's at 0x68 it maps the same was as the Z80 PIO usual address for RC2014, but blocks the second PIO if using the I²C. The SPI bitbang is 16bit port clean so it might make sense to use A15 to select device and tighten the decode. Probably doable as I don't think M1 actually has to be checked on the 74HCT138.