I/O Ports And Registers; I/O Port Bit Assignment; Data Setting; Figure 4.1. Output Port - Contec CNT24-4 User Manual

Table of Contents

Advertisement

4. I/O Ports and Registers

I/O Port Bit Assignment

This board occupies consecutive I/O addresses for two ports.
Each I/O port has a register; the register is assigned by a command.
To set the register, execute an OUT command for the port (+0) to be
set, and enable the register. Then, execute an OUT command to
load data into the register for output, or to read the +1 port for input.
That is, for either input or output, first execute an OUT command to
enable the register, then output data to the register, or read the
register on the +1 port.
To set a register, execute an OUT command every time for the
output port (+0).
The following Figure 4.1. and Figure 4.2. show the I/O port bit
allocation.
Base Address

Figure 4.1. Output port

Base Address

Figure 4.2. Input port

Data Setting

To set 8 bit data, execute an OUT command for the +0 port and
output data to the +1 port. To set 24 bit data, execute an OUT
command for the 0 port and output data three times to the + port.
In this case, the data is set from the lower bite, the middle byte and
the upper byte. Data of 24 bits is read from the lower byte, the
middle byte and the upper byte.
Similarly, to set 32 bit data, output data four times to the +1 port.
D7
D6
D5
Command output (select register)
+0
Setting data output
+1
Not use
+2
Not use
+3
D7
D6
D5
Impossible
+0
Data / status read
+1
+2
+3
CNT24-4(PCI)
D4
D3
D2
D1
D4
D3
D2
D1
Not use
Not use
I/O Ports and Registers
D0
D0
33

Advertisement

Table of Contents
loading

Table of Contents