4. Using the I/O Address Map
26
CNT16-8(FIT)GY,
CNT16-8L(FIT)GY
Description of Output Commands
Initial Count Value (command 00h - 07h)
The command is issued to the output port +16, and an initial count value is set on the output port +17.
Because count data consists of 16 bits, count values are output two times in low, middle, and high order,
8 bits each time. When the third (high 8 bits) count value is output, data consisting of 16 bits is loaded
simultaneously by the counting process.
Following are program examples that set a count value 100(64h) on CH0:
Microsoft C
Microsoft QBASIC
outp( ADR+16, 0x0 );
OUT ADR+16, &H0
outp( ADR+17, 0x64 );
OUT ADR+17, &H64
outp( ADR+17, 0x0 );
OUT ADR+17, &H0
Count Data Latching (command 10h)
Command D7 D6 D5 D4 D3 D2 D1 D0
Function
Data
length
10h CH7
CH6
CH5
CH4
CH3
CH2
CH1
CH0
Count
data
latching
8-bit
This command latches a count value on a corresponding channel to the READ register.
The command issues the value "10h" to the output port +16, and sets a data latch on the output port +17.
These bits are associated with the respective channels. The command latches the count value by setting the
applicable bit to "1". All channels can be latched simultaneously by setting all applicable bits to "1".
CAUTION
The initial condition is no-latch (00h).
Interrupt Mask (command 11h)
Command D7 D6 D5 D4 D3 D2 D1 D0
Function
Data
length
11h CH7
CH6
CH5
CH4
CH3
CH2
CH1
CH0
Interrupt
Mask 8-bit
This command issues the value "11h" to the output port +16, and sets a mask on the output port +17. The
generation of interrupt signals is disabled when an applicable bit is set to "1".
These bits are associated with the respective channels. Setting the value "1" to any of these bits disables a
carry-up interrupt on the associated channel. Setting the value "0" resets the disabled condition.
CAUTION
-
In the initial condition, all channels are timer-masked (FFh).
-
Even in the masked state, on all channels the carry-up conditions change.