I try to use the internal counter/timer 1 of the Z280 as the baudrate generator for the internal uart. So far the timer 1 is not running.
I see the output of the counter/timer 1 is set to one, but the output
doesn't toggle.
My timer code is below
ld hl, 14 ; timer constant
ld c, $ea ; counter 1 time constant
outw
ld a, $88 ; counter continuous, output enabled,
; timer
out ($e8), a ; counter 1 configuration
ld a, $c0 ; enable, software gate set
out ($e9), a ;
Hi,
I try to use the internal counter/timer 1 of the Z280 as the baudrate generator for the internal uart. So far the timer 1 is not running.
I see the output of the counter/timer 1 is set to one, but the output
doesn't toggle.
When I used the Z280 decades ago, I set the CS1 register to E0h, not C0h.
Don't have the manual at hand to look up what that means...
Am 08.08.2023 um 08:33 schrieb Tilmann Reh:
When I used the Z280 decades ago, I set the CS1 register to E0h, not C0h.
Don't have the manual at hand to look up what that means...
Following the manual linked by Fritz, that makes the difference.
Bit 5 is the Trigger Bit ("TG"), which needs to be set from 0 to 1 to
start the counter/timer. See page 9-7 of the manual, last paragraph.
Tilmann
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 16:03:33 |
Calls: | 10,389 |
Files: | 14,061 |
Messages: | 6,416,934 |