woodelf wrote:
Chuck Guzis wrote:
woodelf wrote:
The clock frequency is derived from the 4.77 MHz
system clock and is
1.19318 MHz, derived from the 4.77 MHz processor clock. The largest
interrupt interval allowed by the 8253 CTC is 65536 counts, which
gives you
18.2 times per second.
Well 20 Hz is better than 18.2. :(
Not really. Anything that *uses* those timebases would
let the compiler figure out how many IRQ's, clock cycles,
"whatever" are needed for a specific interval. It's not
wise to write code *assuming* you'll be able to do something
"simple" to get a "nice number" (e.g., 16Hz would encourage
folks to think they could just use a few shifts to get "seconds"
from "IRQ's", etc.)
And, in some environments (*not* desktops) the jiffy IRQ may not
be "periodic" (but that's another issue :> )