8254 timer usage under Sys V/386 R3.2?

Thomas Hoberg tmh at bigfoot.FOKUS.GMD.DBP.DE
Tue Feb 12 07:12:21 AEST 1991


In article <1991Feb1.202411.9033 at ico.isc.com>, rcd at ico.isc.com (Dick
Dunn) writes:
|> apfiffer at admin.ogi.edu (Andy Pfiffer) writes:
|> > I'd like to be able to program and poll one of the timers on the 8254
|> > Programmable Interval Timer under a vanilla System V/386 R3.2.  I have
|> > no difficulty accessing the ports, but I'm not certain how UNIX uses them.
|> 
|> There really isn't a timer you can use without screwing things up.  For two
|> of them, it's not so much how UNIX uses them as how the hardware uses
|> them.
|> 
|> > There are three 1.19 MHz timers on the chip...
|> 
|> Yeah...there's actually one crystal-controlled oscillator driving all three
|> CLK inputs on the 8254.  The frequency is 1.193182 MHz.  (Some AT tech refs
|> are imprecise on this; it does matter for how you program it if you want an
|> accurate clock.)
|> 
|> >...My guesses:...
|> > 	    0	100Hz clock interrupt
|> > 	    1	DRAM refresh (about 66 KHz)
|> > 	    2	beep & buzz
|> > Are these correct?
|> 
[...]
|> 
|> It's unfortunate that there isn't a free timer for other uses.  It would be
|> very useful for both system and application tasks.  It would be nice if
|> there were a simple I/O card with a programmable timer or two...couldn't
|> take more than a few chips.  Does anyone know if such an animal exists?
|> -- 
|> Dick Dunn     rcd at ico.isc.com -or- ico!rcd       Boulder, CO   (303)449-2870
|>    ...Mr. Natural says, "Use the right tool for the job."
I might be all wrong and I have the appropriate manuals at home, but....
I believe the CMOS clock uses an extra IRQ line and can be programmed for
alarms as well as periodic interrupts. I don't know what the resolution is and
I'm quite sure since it uses interrupts, you'd have to write a driver for it,
but if all you need is *one* timer, and if the resolution it provides is good
enough...
:-> tom
----
Thomas M. Hoberg   | UUCP: tmh at bigfoot.first.gmd.de  or  tmh%gmdtub at tub.UUCP
c/o GMD Berlin     |       ...!unido!tub!gmdtub!tmh (Europe) or
D-1000 Berlin 12   |       ...!unido!tub!tmh
Hardenbergplatz 2  |       ...!pyramid!tub!tmh (World)
Germany            | BITNET: tmh%DB0TUI6.BITNET at DB0TUI11 or
+49-30-254 99 160  |         tmh at tub.BITNET



More information about the Comp.unix.sysv386 mailing list