Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
boards:ecb:zilog-peripherals:start [2018/07/20 10:05] b1ackmai1er [Schematics] |
boards:ecb:zilog-peripherals:start [2021/06/29 08:33] (current) b1ackmai1er |
||
---|---|---|---|
Line 7: | Line 7: | ||
===== Pictures ===== | ===== Pictures ===== | ||
- | [[https:// | + | {{https:// |
[[: | [[: | ||
- | |||
- | ===== ===== | ||
- | |||
- | ===== ===== | ||
===== Specifications ===== | ===== Specifications ===== | ||
Line 25: | Line 21: | ||
===== Acknowledgments ===== | ===== Acknowledgments ===== | ||
- | The ECB ZILOG Peripherals board is based on a design presented in c't magazine in 1985 " | + | The ECB ZILOG Peripherals board is based on a design presented in c't magazine in 1985 " |
- | Andrew Lynch designed the current | + | Andrew Lynch designed the Retrobrew |
+ | |||
+ | ===== Version ===== | ||
+ | |||
+ | The following documentation and files describe version 2 which has not been manufactured and tested as at 29/11/2019. Version 2 adds a jumper to bridge CTC counter 2 and 3 so that CTC counter 2 can be used as a prescaler. The serial headers connectors have been reconfigured to the IBM PC standard. A reset configuration jumper has been added to allow selection of either KONTRON or Legacy (N8VEM) reset method. | ||
+ | |||
+ | Details on prior versions can be can be found [[: | ||
===== Hardware Documentation ===== | ===== Hardware Documentation ===== | ||
Line 33: | Line 35: | ||
==== Schematics ==== | ==== Schematics ==== | ||
- | {{: | + | {{: |
==== Board Layout ==== | ==== Board Layout ==== | ||
- | {{: | + | {{: |
+ | |||
+ | ==== KiCad Files ==== | ||
+ | |||
+ | {{: | ||
==== PCB Gerber files ==== | ==== PCB Gerber files ==== | ||
- | [[:builderpages:b1ackmai1er:ecb_zilog_peripherals_pcb|Untested ECB Zilog Peripherals Gerber files ]] | + | {{:boards:ecb:zilog-peripherals: |
- | [[https:// | + | ==== PCB Parts List ==== |
+ | |||
+ | {{: | ||
==== Connectors ==== | ==== Connectors ==== | ||
Line 56: | Line 64: | ||
===== Hardware Documentation ===== | ===== Hardware Documentation ===== | ||
- | |||
==== Board address ==== | ==== Board address ==== | ||
Line 82: | Line 89: | ||
Visual guide for I/O address setting: | Visual guide for I/O address setting: | ||
- | {{https:// | + | [[https:// |
==== Chip address ==== | ==== Chip address ==== | ||
Line 156: | Line 163: | ||
| \\ 19200| | | \\ 19200| | ||
| \\ 38400| | | \\ 38400| | ||
+ | |||
+ | More information on baud rate selection and limitations can be found [[: | ||
Next the Z80-DART/ | Next the Z80-DART/ | ||
- | ==== Serial | + | ==== Serial |
- | + | ||
- | 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| | | \\ X3 / X7 pin| \\ Signal| | ||
- | | \\ 1| \\ GND| \\ 5| \\ 5| | | + | | \\ 1| DCD in| |
- | | \\ 2| \\ GND| \\ 5| \\ 5| | | + | | \\ 2| DSR| |
- | | \\ 3| \\ /Tx out| \\ 3| \\ 2| | | + | | \\ 3| \\ /Rx in| |
- | | \\ 4| | + | | \\ 4| |
- | | \\ 5| \\ /Rx in| \\ 2| \\ 3| | | + | | \\ 5| \\ /Tx out| |
- | | \\ 6| | + | | \\ 6| |
- | | \\ 7| | + | | \\ 7| |
- | | \\ 8| | + | | \\ 8| |
- | | \\ 9| | + | | \\ 9| |
| \\ 10| \\ n/c| \\ n/c| \\ n/c| | | | \\ 10| \\ n/c| \\ n/c| \\ n/c| | | ||
Line 179: | Line 186: | ||
The Z80-CTC provides four counter / timer channels. Channel 0 can be used as the baud rate clock source for the Z80-DART/ | 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. | + | The channels can also be used to provide mode 2 vectored interrupts for non-Zilog I/O (e.g. the UART on the Z80 SBC V2). 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. |
+ | |||
+ | Channel 2 & 3 can be configured to provide a 50Hz interrupt which can facilitate implementing multi-tasking system. This required setting appropriate clock dividers, configuration jumpers and software modes. | ||
+ | |||
+ | * Assuming 4.9152Mhz crystal | ||
+ | * Jumper X5 pins 15-16 and pins 9-11 | ||
+ | * Jumper X5 pin 3 (PHI_X) to X4 pin 7 (CTC_TG2) | ||
+ | * Jumper P1 (on v1 board jumper X4 pin 8 (CTC_ZC2) to X4 pin 9 (CTC_TG3) | ||
+ | * Configure the interrupt vector. | ||
+ | * Configure channel 3 to divide by 256 | ||
+ | * Configure channel 4 to divide by 48 and interrupt. | ||
+ | * Refer to ROMWBW ctc.asm driver for example. | ||
+ | |||
+ | To enable the CTC, ROMWBW must be rebuilt with the following custom configuration added: | ||
+ | |||
+ | SBC_std_cust.asm | ||
+ | |||
+ | < | ||
+ | CTCENABLE | ||
+ | CTCBASE | ||
+ | </ | ||
+ | |||
+ | Correct operation of the 50Hz interrupt timer can be confirmed with the TIMER.COM: | ||
+ | |||
+ | < | ||
+ | TIMER /C | ||
+ | </ | ||
+ | |||
+ | [[https:// | ||
==== Z80-PIO ==== | ==== Z80-PIO ==== | ||
Line 195: | Line 230: | ||
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/ | 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 | + | ==== 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/ | 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/ | ||
Line 203: | Line 238: | ||
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/ | 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/ | + | ==== 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. \\ | I am using a SIO/0 on my board. The DART uses the same register layout except the synchronous stuff is missing. \\ | ||
Line 230: | Line 265: | ||
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. | 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 | + | ==== 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. \\ | + | After reset the Z80-PIOs will have their ports set to mode 1 (all inputs). Using the monitor to read the four ports at 0xB8, 0xB9, 0xBC and 0xBD (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? | + | |
+ | A simple register test program is available (base address 0xB0): {{: | ||
+ | |||
+ | \\ | ||
+ | At this stage you should have a functioning Zilog Peripheral Board. Combined with the SBC V2 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. ==== | ==== Using the Z80-PIO with a Centronics printer. ==== | ||
Line 244: | Line 283: | ||
==== Resources ==== | ==== Resources ==== | ||
- | {{filelist> | + | [[: |
+ | |||
+ | \\ | ||