3.1.3
Timer
Standard PCs as well as the VP7 are equipped with a 8254 compatible timer. This timer contains three
counters. Each counter output provides a key system function. Counter 0 is connected to interrupt
controller input IRQ0 and provides a system timer interrupt for time-of-day, floppy disk timeout and
other system timing functions. Counter 1 generates a refresh request signal and Counter 2 generates the
sound for the speaker. The following table gives an overview of the 8254 functions.
Interval Timer Functions
Function:
Gate:
Clock In:
Out:
Counter 0 (System Timer)
Always On
1.193 MHz(OSC/12)
IRQ0 (INT1)
Function:
Gate:
Clock In:
Out:
Counter 1 (Refresh Request)
Always On
1.193 MHz(OSC/12)
Refresh Request
Function:
Gate:
Clock In:
Out:
Counter 2 (Speaker Tone)
Programmable via Port $061
1.193 MHz(OSC/12)
Speaker
The counter/timers are programmed by I/O accesses. A single control word register controls the
operation of all three counters. The register map is shown in the following table:
I/O Address
Access Type
Function
Name
$0040
W
Write Initial Count to Counter 0
WIC0
$0041
W
Write Initial Count to Counter 1
WIC1
$0042
W
Write Initial Count to Counter 2
WIC2
$0043
W
Write Control Word
WCW
$0040
R
Read Status of Counter 0
RSC0
$0041
R
Read Status of Counter 1
RSC1
$0042
R
Read Status of Counter 2
RSC2
$0043
R
no function
For more information on programming and a more detailed register description see the 8254 data sheet.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com