User`s manual

About the X5 XMC Modules
Function Type Description
DioPortData() Property Broadside Read/Write to low-order 32-bits of
DIO.
Typical use of the digital IO port involves first configuring the port using the Config() operator. This sets the byte direction and
the clock mode. The port is then ready for read/write configurations to each port. For instance:
// Open the module
Innovative::X5_400M Module;
Module.Target(0);
Module.Open();
// All bits input
Module.Config(0x0);
// Read the state of the port
volatile short x = Module.DioPortData();
// All bits output
Module.Config(0x3);
// Toggle the state of all output bits
while (1)
Module.DioPortData(~Module.DioPortData());
Hardware
Implementation
Digital
I/O
port
activity
is
controlled
by
the
digital
I/O
configuration
control
and
data
register.
Port
direction
is
controlled
by
the
configuration
control
register.
Bit Function
0 DIO bits 7..0 direction control, 0=input, default
1 DIO bits 15..8 direction control, 0=input, default
31..6 -
Figure 13.
DIO
Control
Register
(BAR1+0x14)
Port Address
DIO_L
BAR1+0x13
DIO_H
BAR1+0x16
Figure 14.
Digital
IO
Port
Addresses
X5-GSPS User's Manual 36