• Z280 timer

    From Robert@21:1/5 to All on Mon Aug 7 15:47:00 2023
    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.

    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 ;

    I can read the all the counter/timer registers and they ar set to the
    correct values. When I read the count-time register, it is always set
    to 14, never changing. I even tried to use the counter/
    timer 1 as a counter, with a an square wave signal at the input of the
    counter, but this is also not working.

    I bought five Z280 from utsource years ago. Two of them show a very
    weird behavior. Address and control pins toggle, but the Z280 program is
    not running as it should. The other three Z280 run, but the
    counter/timer 1 does not work at all.
    Maybe I bought an batch of Z280

    Is there a undocumented bit in one of the registers of the Z280, which
    has to be set, in order to get the counter/timer working, or has anybody succeeded using the counter/timer 1 of the Z280.

    Regards,
    Robert

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tilmann Reh@21:1/5 to All on Tue Aug 8 08:33:59 2023
    Am 07.08.2023 um 15:47 schrieb Robert:
    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 ;

    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...

    Tilmann

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fritz@21:1/5 to All on Tue Aug 8 16:41:09 2023
    Am 07.08.2023 um 15:47 schrieb Robert:

    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.


    I can't help but there is a manual:

    https://oldcomputers-ddns.org/public/pub/rechner/zilog/z280/manual/index.html

    --
    -- Fritz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tilmann Reh@21:1/5 to All on Tue Aug 8 17:07:20 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert@21:1/5 to Tilmann Reh on Wed Aug 9 12:18:10 2023
    On 8/8/23 17:07, Tilmann Reh wrote:
    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

    @ Fritz and Tilmann

    Thanks for the help
    The timer 1 is now working

    Robert

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)