Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| boards:ecb:zilog-peripherals [2019/08/18 19:17] – Initial import from Wayback Machine | boards:ecb:zilog-peripherals [2026/06/15 12:51] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| /* Imported from Wayback Machine | /* Imported from Wayback Machine | ||
| - | | + | |
| - | | + | |
| | | ||
| */ | */ | ||
| Line 189: | Line 189: | ||
| 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 blue is what you type) | + | 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/ | 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/ | ||
| Line 204: | Line 204: | ||
| \\ | \\ | ||
| - | '' | + | '' |
| - | '' | + | '' |
| - | '' | + | '' |
| - | '' | + | '' |
| - | '' | + | '' |
| - | '' | + | '' |
| - | '' | + | '' |
| - | '' | + | '' |
| \\ | \\ | ||
| Next check the status by | Next check the status by | ||
| - | '' | + | '' |
| Bit 6 is set after a chip reset and is cleared with | 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 | 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 | 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.\\ | and the result should be 40. If not then try again as it could be leftover crud in the receive buffer.\\ | ||
