Справочник Пользователя для National Instruments PCI-DIO-96

Скачать
Страница из 93
Chapter 6
Programming
PCI-DIO-96 User Manual
6-8
©
 National Instruments Corporation
Mode 0 has the following features:
Two 8-bit ports (A and B) and two 4-bit ports (upper and lower 
nibbles of port C).
Any port can be input or output.
Outputs are latched, but inputs are not latched.
Mode 1
This mode transfers data that is synchronized by handshaking signals. 
Ports A and B use the eight lines of port C to generate or receive the 
handshake signals. This mode divides the ports into two groups 
(group A and group B) and includes the following features:
Each group contains one 8-bit data port (port A or port B) and one 
4-bit control/data port (upper or lower nibble of port C). 
The 8-bit data ports can be either input or output; both are latched. 
The 4-bit ports are used for control and status of the 8-bit data ports.
Interrupt generation and enable/disable functions are available.
Mode 2
This mode can be used for communication over a bidirectional 8-bit 
bus. Handshaking signals are used in a manner similar to mode 1. 
Mode 2 is available for use in group A only (port A and the upper 
nibble of port C). Other features of this mode include the following:
One 8-bit bidirectional port (port A) and a 5-bit control/status port 
(port C).
Latched inputs and outputs.
Interrupt generation and enable/disable functions.
Single Bit Set/Reset Feature
Any of the eight bits of port C can be set or reset with one control word. 
This feature generates control signals for port A and port B when these 
ports are operating in mode 1 or mode 2.
Mode 0–Basic I/O
You can use mode 0 for simple I/O functions (no handshaking) for each 
of the three ports and assign each port as an input or an output port. 
Table 6-2 shows the 16 possible I/O configurations. Notice that bit 7 of 
the control word is set when programming the mode of operation for 
each port.