I/O Ports and Registers
CNT24-4(PCI)
50
Programmable time
(Command timer data:17h, Timer start:18h)
D7
D6
D5
D4
D3
D2
D1
D0
17h
Programable timer data
D7
D6
D5
D4
D3
D2
D1
D0
18h
Not used
START
The programmable timer generates an interrupt with a frequency
that has been set in the 32 bit data. To generate an interrupt by the
timer, set the 32 bit data, then set the START bit to "1".
To set the programmable timer, output 17h to output port +0 and set
the timer data on output port +1. Since the timer data is 32 bit data,
output the data four times, eight bits at a time, from the lower bits to
the upper bits. The range is 1msec - 200sec.
To start the timer, output the timer start command (18h) and set the
corresponding bit on output port +1. Setting the bit to "0" stops
the timer.
Table 4.8. shows the relationship between the programmable timer
data and the timer interrupt frequency.
Example : The following program sample show how to set the
programmable timer to 1 second.
OUT 0h, 17h
(Select timer setting)
OUT 1h, FFh
(Lowest bits)
OUT 1h, 2Ch
(Lower bits)
OUT 1h, 31h
(Upper bits)
OUT 1h, 01h
(Highest bits)
OUT 0h, 18h
(Select timer start)
OUT 1h, 1h
(Timer start)
Note!
In the default setting, the timer is disabled.