Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Apart from the operation of the CPU, other basic hardware and software
  functions occur at regular intervals based on a preset clock frequency.
  For example, the dynamic RAM chips that constitute the computer's main
  memory must be accessed at regular intervals to refresh the information
  represented in them. Also, ROM BIOS and operating system functions such as
  keeping track of the time of day require the computer to generate a
  "clock-tick" signal at a predetermined rate. All PCs and PS/2s have
  circuitry that generates the necessary timing signals.

  In the PC and PC/XT, an Intel 8253-5 programmable timer/counter chip
  produces the RAM refresh and timer-tick signals. In the PC/AT, an Intel
  8254-2 is used in the same way. The PS/2 models 25 and 30 use an 8253-5
  for the timer tick, but RAM refresh timing is a function of a custom
  integrated circuit. In the PS/2 models 50, 60, and 80, all timing
  functions are implemented in custom silicon. Despite these hardware
  variations, the timer programming interface is the same in all PCs and
  PS/2s.

  In the PC/XT/AT family, the timer chip has three output channels, each
  with a particular dedicated function:

  .  Channel 0 is the system clock-tick timer. When the computer is cold
     booted, the ROM BIOS programs the timer to oscillate with a frequency
     of about 18.2 ticks per second. This signal is tied to the computer's
     interrupt controller in such a way that interrupt 08H is generated each
     time the clock ticks.

  .  Channel 1 is always dedicated to producing the RAM refresh timing
     signal; it's not intended for use in software applications.

  .  Channel 2 is used to control the computer's speaker: The frequency of
     the timer's channel 2 signal determines the frequency of the sound
     emitted by the loudspeaker. (We'll come back to this later.)

  PS/2 models 50, 60, and 80 also have a timer channel 3. The signal
  produced on channel 3 is tied to the computer's nonmaskable interrupt
  (interrupt 02H), and can be used by an operating system as a "watchdog" to
  ensure that some other critical function, such as servicing a clock-tick
  interrupt, does not crash the computer by taking too long to execute.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson