[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timer?



Michael J. Kelly <mjk1@intelsrv2.cs.uofs.edu> wrote:

> Is there a programmable timer for the II series to generate an interrupt
> after a specified time (ie, alarm() type stuff.)

Certainly not in the ][, ][+ or IIe, unless you add a card which
provides this facility.  Some clock cards have a configurable periodic
interrupt, but the most common method is with an Apple II Mouse card,
which provides a vertical retrace interrupt.

The IIc has a built-in vertical retrace interrupt (accessed through the
mouse firmware), and the IIgs has at least three periodic interrupt
sources: vertical retrace, one second and quarter second (ish).  The
latter is reserved for use by the AppleTalk firmware.

In all of these cases, you get an interrupt every period (e.g. sixty or
fifty times a second for the vertical retrace).  It would be up to the
interrupt handler to count off a longer period.

An I/O card with a VIA chip (6522) could provide a programmable timer
interrupt, though not with a very long period (it only has a 16-bit
timer).  There are bound to be other options.

There is at least one clock chip (the MC146818, used in the PC as the
clock/CMOS until it was superseded by improved versions) which has an
actual programmable alarm.  I'm not aware of any clock card for an Apple
II which uses this chip.  I've encountered the OKI MSM chip (four digit
number which eludes me - 5432?), and the Dallas SmartWatch (as in the No
Slot Clock).  I'm not sure what the Thunderclock uses.

Some clumsier options that occur to me:

- Using a serial interface card or port to generate a timed interrupt by
selecting an appropriate baud rate and using transmit ready interrupts
as if they were timer interrupts.  This would also be periodic, and may
depend on flow control handling and what is connected to the port.

- On the IIgs, using the Ensoniq DOC chip to generate a silent waveform,
basically using it as a timing source.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand