One of the key advantages of using the backplane method of construction, is that it is very simple to extend the system with additional cards, and the user can choose which cards best suits their overall application. The system can be extended as and when time and budget permits. This was a major consideration with the early homebrew computers - where memory was expensive and each additional kilobyte represented a substantial investment!
Digital Input and Output.
Whilst this can be done using the Z80 series peripheral ICs - generally DIP 40 LSI devices, the more traditional method of interfacing to a microcontroller was to use standard 7400 series TTL chips (TTL is Transistor, transistor logic). These operate with a 5V power supply and with logic levels and drive capabilities that were a good match to those of the early microprocessor ICs.
For digital input, the requirement was to capture the state of the digital input lines and transfer this captured byte onto the Z80 data bus at the right time for the input (IN) instruction. This is best done using an 8-bit tristate buffer - and the 74HC245 meets the requirements perfectly.
For digital output, the normal method is to use an 8-bit latch, such as a 74HC374, or 74HC574 (which has a more bus-friendly pinout).
Conveniently Spencer has put both of the '245 and '374 devices onto his Digital I/O card - and this is the subject of this blog post.
|The Digital I/O board is a simple through hole kit|
Construction was simple, and I chose to add the sockets and switches to the board first. Unfortunately the footprint used for the switches is not quite right - and it was a bit of a fiddle to get them all neat and level.
Next I added the LEDs and the resistors....
and finally the 40 pin right angled SIL pin header strip - which is common to all boards that fit into Spencer's Z80 backplane.
To use the GPIO board we use the INP and OUT command provided in the ROM BASIC.
This simply reads the input port at Port 0 and sends that byte out to the output port also located at Port 0.
For a more sophisticated demonstration - Spencer offers this Cylon programme:
Here the individual LEDs are lit by using increasing powers of 2 to access them one at a time.
The GPIO board is self contained and good for demonstration or simple interaction with the application using either BASIC or Z80 assembly language.
For more sophisticated control and monitoring applications - Spencer has created another couple of pcb modules - that provide 24 lines of input, and 24 lines of output - using the same ICs as used in the GPIO demo board. These will be a useful addition to this growing Z80 system.
|Input module provides 24 lines of input using three 74HC245|
|Output module gives 24 lines of output using three 74HC374|
The backplane connector has been shrunk to 39 pins - which allows it to fit on a 10cm wide pcb. This makes it useful for those who may wish to design additional boards or modify these - using KiCAD or EagleCAD - and take advantage of the low cost 10x10 cm board offers from certain Far East pcb manufacturers.
In the next Part we look at the Composite Video Terminal board - which recreates a serial terminal using a Raspberry Pi Zero, - as soon as my Pi Zero arrives!