Access PCI-DIO-24D(H) 用户手册

下载
页码 29
Programming the 8254
The counters are programmed by writing a control byte into the counter control register. Refer to the 
previous register map for the base addresses of the counters and the counter control register. The control 
byte specifies the counter to be programmed, the counter mode, the type of read/write operation, and the 
modulus. The control byte format is as follows: 
 
B7 B6 B5  B4  B3 B2 B1 B0 
SC1 SC0 RW1 RW0 M2
M1
M0
BCD 
  
 
SC0-SC1: These bits select the counter that the control byte is destined for. 
 
SC1
SC0
Function
 
Program Counter #0 
Program Counter #1 
Program Counter #2 
1 1 
Read/Write 
Cmd.* 
  
* See section on Reading and Loading the Counters. 
  
 
 
RW0-RW1: These bits select the read/write mode of the selected counter. 
 
RW1
  RW0
Counter Read/Write Function
 
Counter Latch Command 
Read/Write LS Byte 
Read/Write MS Byte 
Read/Write LS Byte, then MS Byte 
  
 
M0-M2: These bits set the operational mode of the selected counter.  
 
Mode
M2
M1
M0
 
0 0 
1 0 
2 X 
3 X 
4 1 
5 1 
  
 
BCD: Set the selected counter to count in binary (BCD = 0) or BCD (BCD = 1). 
Manual PCI-DIO-24DH 
23