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

        8253-5 Programmable Interval Timer

        The 8253-5 features three independent programmable timers
        with several modes of timing operations available. See the
        Intel Microprosessor and Peripheral Handbook, for
        specifications.

        The three timer is used this way:

                Channel      Used for
                ------------------------------------
                   0         System timer (INT 8)
                   1         Memory refresh
                   2         Casette and speaker

        The 8253 clock input of 1,193,180 Hz is derived from the
        4,772,727 Hz systen clock which is obtained from the system
        board 14,3178 MHz crystal. This frequency results in an
        interrupt frequency ranging between a high of every 838 ns
        (corresponding to one bus cycle, or four 8088 cycles) to a
        low of every 54.925493 ms depending on the 1-65536 divisor
        selected. Use a divisor of 0 after 65535 to obtain 65536.
        Set the mode bits in port 43h to load the LSB/MSB divisor
        for the desired channel.

        Load the divisor into the port for that channel (40h-42h) to
        set the interrupt rate. To calculate the divisor, divide
        1,193,180 by the desired frequency. Or, the frequency per second
        equals 1,193,180 divided by the divisor. For example, MS-BASIC
        uses a divisor of 16,384 to obtain 1,193,180/16,384=72.826
        interrupts per second (an interrupt every 13.73 ms) to time
        its music functions.

        Timer channel current contents may be obtained without
        affecting the current countdown in that channel by latching
        the channel using port 43h, then reading LSB/MSB. Both LSB
        and MSB most be read to insure proper operation.

See Also: 040 041 042 043 INT 08h

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