Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| boards:ecb:zilog-peripherals [2021/01/24 03:07] – Revision from 2021-01-24 | boards:ecb:zilog-peripherals [2026/06/15 12:51] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | /* Imported from Wayback Machine | ||
| + | | ||
| + | | ||
| + | | ||
| + | */ | ||
| + | |||
| + | ====== ECB Zilog Peripherals ====== | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ===== Pictures ===== | ||
| + | |||
| + | ===== Specifications ===== | ||
| + | |||
| + | Two serial ports using Z80-DART or Z80-SIO | ||
| + | |||
| + | Baud rates can be jumper selected or use Z80-CTC channels for software programmable | ||
| + | |||
| + | Four parallel ports with handshaking using two Z80-PIO | ||
| + | |||
| + | Four counter / timers using Z80-CTC | ||
| + | |||
| + | Daisy chained priority interrupts for Z80 mode 2 operation | ||
| + | |||
| + | ===== Hardware Documentation ===== | ||
| + | |||
| + | ==== Schematics ==== | ||
| + | |||
| + | ==== Board Layout ==== | ||
| + | |||
| + | ==== Connectors ==== | ||
| + | |||
| + | X1 - PIO1 | ||
| + | |||
| + | X2 - PIO2 | ||
| + | |||
| + | X3 - DART/SIO channel B (RS-232 levels) | ||
| + | |||
| + | X4 - CTC, DART/SIO channel A (TTL levels) | ||
| + | |||
| + | X5 - oscillator divider selection | ||
| + | |||
| + | X6 - DART/SIO baud rate clock source selection | ||
| + | |||
| + | X7 - DART/SIO channel A (RS-232 levels) | ||
| + | |||
| + | ==== Board address ==== | ||
| + | |||
| + | 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. | ||
| + | |||
| + | |\\ Base\\ \\ Address|\\ SW1\\ \\ (A7)|\\ SW2\\ \\ (A6)|\\ SW3\\ \\ (A5)|\\ SW4\\ \\ (A4)|\\ Conflicts | ||
| + | |\\ 00h |\\ 2-3 |\\ 2-3 |\\ 2-3 |\\ 2-3 |\\ I/O on N8 CPU after reset| | ||
| + | |\\ 10h |\\ 2-3 |\\ 2-3 |\\ 2-3 |\\ 1-2 | | | ||
| + | |\\ 20h |\\ 2-3 |\\ 2-3 |\\ 1-2 |\\ 2-3 |\\ Used for Disk I/O IDE | | ||
| + | |\\ 30h |\\ 2-3 |\\ 2-3 |\\ 1-2 |\\ 1-2 |\\ Used for Disk I/O Floppy | | ||
| + | |\\ 40h |\\ 2-3 |\\ 1-2 |\\ 2-3 |\\ 2-3 |\\ N8 CPU registers | ||
| + | |\\ 50h |\\ 2-3 |\\ 1-2 |\\ 2-3 |\\ 1-2 |\\ N8 CPU registers | ||
| + | |\\ 60h |\\ 2-3 |\\ 1-2 |\\ 1-2 |\\ 2-3 |\\ Used by Z80 SBC I/O | | ||
| + | |\\ 70h |\\ 2-3 |\\ 1-2 |\\ 1-2 |\\ 1-2 |\\ Used by Z80 SBC I/O | | ||
| + | |\\ 80h |\\ 1-2 |\\ 2-3 |\\ 2-3 |\\ 2-3 |\\ N8 I/O default | ||
| + | |\\ 90h |\\ 1-2 |\\ 2-3 |\\ 2-3 |\\ 1-2 |\\ N8 I/O default | ||
| + | |\\ A0h |\\ 1-2 |\\ 2-3 |\\ 1-2 |\\ 2-3 | | | ||
| + | |\\ B0h |\\ 1-2 |\\ 2-3 |\\ 1-2 |\\ 1-2 | | | ||
| + | |\\ C0h |\\ 1-2 |\\ 1-2 |\\ 2-3 |\\ 2-3 | | | ||
| + | |\\ D0h |\\ 1-2 |\\ 1-2 |\\ 2-3 |\\ 1-2 | | | ||
| + | |\\ E0h |\\ 1-2 |\\ 1-2 |\\ 1-2 |\\ 2-3 | | | ||
| + | |\\ F0h |\\ 1-2 |\\ 1-2 |\\ 1-2 |\\ 1-2 |\\ ECB VDU I/O | | ||
| + | |||
| + | ==== Chip address ==== | ||
| + | |||
| + | Each of the four I/O chips uses four I/O addresses. In this table ' | ||
| + | |||
| + | |\\ n0h|\\ CTC channel 0 |\\ Can be used for DART/SIO channel A baud rate| | ||
| + | |\\ n1h|\\ CTC channel 1 |\\ Can be used for DART/SIO channel B baud rate| | ||
| + | |\\ n2h|\\ CTC channel 2 | ||
| + | |\\ n3h|\\ CTC channel 3 | ||
| + | |\\ n4h|\\ DART/SIO channel A data |\\ on connector X7 | | ||
| + | |\\ n5h|\\ DART/SIO channel B data |\\ on connector X3 | | ||
| + | |\\ n6h|\\ DART/SIO channel A command| | ||
| + | |\\ n7h|\\ DART/SIO channel B command| | ||
| + | |\\ n8h|\\ PIO1 port A data |\\ on connector X1 | | ||
| + | |\\ n9h|\\ PIO1 port B data |\\ on connector X1 | | ||
| + | |\\ nAh|\\ PIO1 port A command | ||
| + | |\\ nBh|\\ PIO1 port B command | ||
| + | |\\ nCh|\\ PIO2 port A data |\\ on connector X2 | | ||
| + | |\\ nDh|\\ PIO2 port B data |\\ on connector X2 | | ||
| + | |\\ nEh|\\ PIO2 port A command | ||
| + | |\\ nFh|\\ PIO2 port B command | ||
| + | |||
| + | ==== Z80-DART/ | ||
| + | |||
| + | The Z80-DART/ | ||
| + | |||
| + | | |\\ Pin 11|\\ Pin 25|\\ Pin 26|\\ Pin 27 |\\ Pin 28|\\ Pin 29| | ||
| + | |\\ Z80-DART | ||
| + | |\\ Z80-SIO/0 (Z8440)|\\ /SYNCA|\\ /DTRB |\\ TxDB |\\ /RxTxCB|\\ RxDB |\\ /SYNCB| | ||
| + | |\\ Z80-SIO/ | ||
| + | |\\ Z80-SIO/ | ||
| + | |\\ Z80-SIO/ | ||
| + | |||
| + | Where | ||
| + | |||
| + | /DTRB - Data Terminal Ready channel B (modem signal) | ||
| + | |||
| + | TxDB - Transmit data out channel B | ||
| + | |||
| + | RxDB - Receive data in channel B | ||
| + | |||
| + | /RxTxCB - baud rate clock input for both channels | ||
| + | |||
| + | /RxCB - baud rate clock input for channel B receive | ||
| + | |||
| + | /TxCB - baud rate clock input for channel B transmit | ||
| + | |||
| + | RIA, RIB - ring indicator input for channel A, B | ||
| + | |||
| + | /SYNCA, /SYNCB - synchronisation I/O channel A, B (synchronous modes only) | ||
| + | |||
| + | 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/ | ||
| + | |||
| + | ==== Baud rate selection ==== | ||
| + | |||
| + | There are two ways of providing the baud rate clock to the Z80-DART/ | ||
| + | |||
| + | 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/ | ||
| + | |||
| + | 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/ | ||
| + | |||
| + | |\\ BAUD |\\ PHI_X (Hz)|\\ /16 or /64|\\ X5 Jumper| | ||
| + | |\\ 300 |\\ 19200 |\\ /64 |\\ 3-4 | | ||
| + | |\\ 600 |\\ 38400 |\\ /64 |\\ 3-5 | | ||
| + | |\\ 1200 |\\ 19200 |\\ /16 |\\ 3-4 | | ||
| + | |\\ 2400 |\\ 38400 |\\ /16 |\\ 3-5 | | ||
| + | |\\ 4800 |\\ 76800 |\\ /16 |\\ 6-8 | | ||
| + | |\\ 9600 |\\ 153600 | ||
| + | |\\ 19200|\\ 614400 | ||
| + | |\\ 38400|\\ 1228800 | ||
| + | |||
| + | Next the Z80-DART/ | ||
| + | |||
| + | ==== Serial leads ==== | ||
| + | |||
| + | 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/ | ||
| + | |||
| + | |\\ X3 / X7 pin|\\ Signal |\\ DB-9M|\\ DB-9F|\\ Note| | ||
| + | |\\ 1 |\\ GND |\\ 5 |\\ 5 | | | ||
| + | |\\ 2 |\\ GND |\\ 5 |\\ 5 | | | ||
| + | |\\ 3 |\\ /Tx out|\\ 3 |\\ 2 | | | ||
| + | |\\ 4 |\\ DCD in |\\ 6 / 1|\\ 4 | | | ||
| + | |\\ 5 |\\ /Rx in |\\ 2 |\\ 3 | | | ||
| + | |\\ 6 |\\ DTR out|\\ 4 |\\ 6 / 1| | | ||
| + | |\\ 7 |\\ RST out|\\ 7 |\\ 8 | | | ||
| + | |\\ 8 |\\ n/c |\\ n/c |\\ n/c | | | ||
| + | |\\ 9 |\\ CTS in |\\ 8 |\\ 7 | | | ||
| + | |\\ 10 |\\ n/c |\\ n/c |\\ n/c | | | ||
| + | |||
| + | ==== Z80-CTC ==== | ||
| + | |||
| + | The Z80-CTC provides four counter / timer channels. Channel 0 can be used as the baud rate clock source for the Z80-DART/ | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ==== Z80-PIO ==== | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ==== Interrupts ==== | ||
| + | |||
| + | The /INT pins from the Z80-DART/ | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ==== Initial Testing ==== | ||
| + | |||
| + | 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/ | ||
| + | |||
| + | Testing the Z80-CTC | ||
| + | |||
| + | 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 <font inherit/ | ||
| + | |||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | |||
| + | 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/ | ||
| + | |||
| + | Testing the Z80-DART/ | ||
| + | |||
| + | 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: | ||
| + | |||
| + | \\ | ||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | |||
| + | \\ | ||
| + | Next check the status by | ||
| + | |||
| + | '' | ||
| + | |||
| + | Bit 6 is set after a chip reset and is cleared with | ||
| + | |||
| + | '' | ||
| + | |||
| + | If bit 2 (Tx pending) is set then we're ready to transmit, so | ||
| + | |||
| + | '' | ||
| + | |||
| + | 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. | ||
| + | |||
| + | Testing the Z80-PIOs | ||
| + | |||
| + | 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? | ||
| + | |||
| + | ==== Extra Ideas ==== | ||
| + | |||
| + | 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. | ||
| + | |||
| + | |\\ \\ <code code> | ||
| + | |||
| + | \\ | ||
