This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong.
The Zilog Peripherals board adds Zilog Z80 family peripheral I/O chips to an existing N8VEM Z80 SBC or N8 computer. It provides two serial ports with RS-232 converters, four parallel ports with handshaking signals and four counter / timer channels.
The board occupies 16 I/O addresses. The base address is selected by the jumpers labeled SW1 to SW4 near the ECB connector. All jumpers need shorting headers to select the desired address range. If used with an N8 computer it is generally safe to use address ranges A0h and above. Not all possible conflicts are shown as many of the ECB boards have flexible address selection. The photo shows the board set for 10h to 1Fh.
Each of the four I/O chips uses four I/O addresses. In this table 'n' is the board base address.
The Z80-DART/SIO provides two serial ports with handshaking. The DART provides asynchronous serial protocols (the type normally used) and the SIO provides asynchronous and synchronous serial protocols. Zilog produced a number of variations to cater for different functions and pinouts. Any type can be used with this board if you allow for the slight pin differences outlined below. The Z80-SIO/9 only has one channel and the pins marked n/c should not be connected.
The ring indicator signals are not on connectors X3 and X7 at RS-232 levels.
The Z80-DART and Z80-SIO/0 can be used without extra board modification.
The Z80-SIO/1 needs pins 26 and 27 joined at the chip for the same baud rate on transmit and receive, chip pin 25 routed to board pin 26, no DTR or RI signals.
The Z80-SIO/2 needs pins 27 and 28 joined at the chip for the same baud rate on transmit and receive, chip pin 29 routed to board pin 28, no RI signal
The Z80-SIO/9 needs all channel B pins left disconnected.
One recommended modification is to bridge pins 13 and 14 of the Z80-DART/SIO. This joins /RxCA to /TxCA so channel A has the same baud rate clock source on receive and transmit.
There are two ways of providing the baud rate clock to the Z80-DART/SIO. For a fixed baud rate it uses the divider selection on header X5. Programmable baud rates can use the CTC channels (detailed later).
The source of the baud rate divider can be either the system clock (PHI) or an oscillator module at position U8. Recommended oscillator modules are 4.9152MHz or 2.4576MHz. This clock source is fed to a 74LS393 which divides it by 2 to 256 depending on a jumper at header X5. This divided source (PHI_X) is routed to the Z80-DART/SIO and/or Z80-CTC. From this it can be seen as very flexible (or confusing) so a simple example will be given. The source for the divider will be a 4.9152MHz oscillator module. This will be divided by the 74LS393 to give a fixed baud rate to both channels of the Z80-DART/SIO from 300 to 38400 baud (76800 and 153600 baud rates are also possible, for 115200 a 1.8432MHz oscillator is used in U8 and no divider).
First jumper pins 15-16 of X5 to select the oscillator module. A second jumper on X5 selects the divider output for PHI_X. The /16 or /64 option is programmed into the Z80-DART/SIO registers. The photo shows the jumpers for 9600 baud.
Next the Z80-DART/SIO's clock pins need to be connected to PHI_X using header X6. For the fixed baud rate jumper pins 3-5 or 5-7 for channel A and 8-10 for channel B of header X6 (as in the photo). This assumes the above recommended modification has been made.
The Zilog peripheral board header layouts are different to the other boards in the N8VEM range so custom cables must be made. Here is an example - the Z80-DART/SIO doesn't provide a DSR input so it uses DCD instead. Ring Indicator is also not used.
The Z80-CTC provides four counter / timer channels. Channel 0 can be used as the baud rate clock source for the Z80-DART/SIO channel A. Channel 1 can be used for the Z80-DART/SIO channel B baud rate clock source. All four channels are available on header X4.
The channels can also be used to provide mode 2 vectored interrupts for non-Zilog I/O (e.g. the UART on the N8VEM Z80 SBC). To do this put the channel into counter mode with a preset value of 1. When the trigger input is activated by the interrupt source, the counter will decrement to zero and cause an interrupt to the CPU with the vector provided by the Z80-CTC.
The Z80-PIOs provide two 8-bit parallel ports each. Each Z80-PIO has its own header with +5v and GND lines for connecting to the outside world. Note these connectors have a totally different layout to the PPI connectors on other boards. No jumpers need to be set to use these Z80-PIOs.
The /INT pins from the Z80-DART/SIO, Z80-CTC and Z80-PIOs are connected together as a 'wired-OR' gate and buffered for a common interrupt to the CPU. These pins are open-drain outputs so they can be connected together. The board is setup for Mode 1 or Mode 2 interrupts. The four chips are also daisy chained to give priority to the interrupts. The Z80-CTC has the highest priority, followed by the Z80-DART/SIO, Z80-PIO1 and lowest is Z80-PIO2. Z80-CTC channel 3 is ideal for use as a 'general' mode 2 interrupt as it doesn't have an output pin.
For example, to use the UART on the Z80-SBC MK-II board with mode 2 interrupts requires a jumper setting and a hardware modification. On the N8VEM Z80-SBC MK-II jumper pins 2-3 on k12. This connects the UART interrupt to A23 on the ECB connector. On the Zilog peripherals board solder a bridge between A23 on the ECB connector and pin 20 of the Z80-CTC. Alternatively solder to pin 11 of header X4 and jumper pins 9-11 to connect to the Z80-CTC. The N8VEM Z80-SBC MK-I requires more modifications and is not covered here.
For this section I will assume the base address of the board is B0h, the oscillator module at U8 is 4.9152MHz. On X5 there are jumpers between 7-8 and 15-16 to give a baud rate of 9600. On X6 jumper pins 3-5 and 8-10 to put the baud rate clock to the Z80-DART/SIO. If available use a frequency counter to measure 153600Hz at pins 13, 14 and 27 of the Z80-DART/SIO.
On X6 put a jumper on pins 2-4 to put the 153600Hz signal to channel 0. Using DBGMON send the following to the Z80-CTC. (Text in blue is what you type)
>O B0 47
>O B0 00
>O B1 27
>O B1 00
>O B0 47
>O B0 00
>O B1 27
>O B1 00
The first command sets channel 0 as a counter, the second sets the count value to 256. The output on pin 7 of the Z80-CTC should be 600Hz (153600 / 256). The third and fourth commands set channel 1 as a timer which divides the system clock by 65536. Given my setup has the CPU running at 4MHz the output on pin 8 of the Z80-CTC should be a bit over 61Hz (4000000/65536). The outputs are not a square wave but a series of pulses and were too short to be picked up by my ancient logic probe. However they measured correctly on my frequency counter. An oscilloscope would be handy as well.
I am using a SIO/0 on my board. The DART uses the same register layout except the synchronous stuff is missing.
Loopback test. Install a jumper between pins 3 and 5 of X7 to connect TxD with RxD of channel A. Using DBGMON send the following:
>O B6 04 select write register 4
>O B6 46 x16 clock, 1 stop, no parity
>O B6 01 select write register 1
>O B6 04 disable interrupts
>O B6 03 select write register 3
>O B6 C1 8 bits, no auto enables, receiver enable
>O B6 05 select write register 5
>O B6 EA DTR on, RTS on, enable transmit
>O B6 04
>O B6 46
>O B6 01
>O B6 03
>O B6 C1
>O B6 05
>O B6 EA
Next check the status by
Bit 6 is set after a chip reset and is cleared with
>O B6 C0
>O B6 C0
If bit 2 (Tx pending) is set then we're ready to transmit, so
>O B4 40
>O B4 40
will send the character 40 (@) to the transmit buffer. Then read status and bit 0 should be set to indicate a character has been received. Read it with
and the result should be 40. If not then try again as it could be leftover crud in the receive buffer.
Once the loopback test is successful then take out the jumper in X7, put in your carefully constructed serial lead and try it with a terminal.
After reset the Z80-PIOs will have their ports set to mode 1 (all inputs). Using the monitor to read the four ports at $B8, $B9, $BC and $BD (i.e.I B8) will read the values on the pins. With nothing connected to headers X1 and X2 my Z80-PIOs read all zeros. A clip lead from the +5 to any I/O pin will show up as a different value when the port is read.
At this stage you should have a functioning Zilog Peripheral Board. Combined with the N8VEM Z80-SBC you now have enough serial ports, timers and parallel ports to create a working MP/M system. Any takers?
Using the Z80-PIO with a Centronics printer.
The Z80-PIO has four modes of operation - input, output, bi-directional and bit. The input and output modes have handshaking pins for each port, the bi-directional mode (port A only) uses handshaking pins from both ports and bit mode uses no handshaking pins. For a printer the output mode is used with the port's RDY pin used as a strobe output and the /STB pin used as an ACK input. However the RDY signal is too short (and the wrong polarity) for the printer. This signal is used to trigger a monostable (say a 74LS123) with an active low output pulse about 0.5mS long. The BUSY signal and other control lines go to/from the other port in bit mode.
Buffering the data and control lines are needed for long cables. Use a 74LS245 or similar for the data lines, a 74LS07 or similar for the control lines.
The above idea has been prototyped and may become a future mini-board.