Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!fub!opal!tub!gmdtub!bigfoot!tmh From: tmh@bigfoot.FOKUS.GMD.DBP.DE (Thomas Hoberg) Newsgroups: comp.unix.sysv386 Subject: Re: 8254 timer usage under Sys V/386 R3.2? Message-ID: <316@bigfoot.first.gmd.de> Date: 11 Feb 91 20:12:21 GMT References: <16808@ogicse.ogi.edu> <1991Feb1.202411.9033@ico.isc.com> Sender: news@bigfoot.first.gmd.de Reply-To: tmh@bigfoot.FOKUS.GMD.DBP.DE (Thomas Hoberg) Distribution: na Organization: Gesellschaft fuer Mathematik und Datenverarbeitung (GMD) Lines: 48 In article <1991Feb1.202411.9033@ico.isc.com>, rcd@ico.isc.com (Dick Dunn) writes: |> apfiffer@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@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@bigfoot.first.gmd.de or tmh%gmdtub@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@DB0TUI11 or +49-30-254 99 160 | tmh@tub.BITNET