Chapter 5
Signal Connections
©
National Instruments Corporation
5-15
All digital I/O lines have programmable direction, and you can configure
each bit as active-low (inverting) or active-high (non-inverting). Software
commands that read and write the port use logical values (TRUE/FALSE)
for each bit. Depending upon the programmed polarity for a bit, a TRUE
value may correspond to a high voltage (active-high) or low voltage
(active-low) on the physical pin.
Reads from input pins always return the logic value of the input bits. Writes
to input pins do nothing. Writes to output pins set/reset the logic levels of
the output bits. Reads from output pins return the logic levels last written
to the port.
The FlexMotion software supports the MustOn/MustOff (MOMO)
protocol for setting and resetting the output bits in a port. The MOMO
approach allows you to define which bits must be On (active), which bits
must be Off (non-active), and which bits you want to stay in the same state.
In this way, an individual bit or bits can be set or reset without worrying
about the values of the other bits in the port. Of course, the entire port can
also be set or reset at any time. Each output circuit can sink and source
24 mA.
The state of the input pins at power-up is controlled by the DPull pin.
Connecting DPull to +5 V or leaving it unconnected configures all pins in
all ports for 100 k
Ω
pull-ups. Connecting DPull to ground configures the
ports for 100 k
Ω
pull-downs.
PWM Features
The 7344 controller provides two pulse width modulation (PWM) outputs
on the digital I/O connector. The PWM outputs generate periodic
waveforms whose period and duty cycles can be independently controlled
through software commands. You can think of PWM as a digital
representation of an analog value, because the duty cycle is directly
proportional to the desired output value. PWM outputs are typically used
for transmitting an analog value through an optocoupler. A simple lowpass
filter turns a PWM signal back into its corresponding analog value. If
desired, you can use the PCLK input instead of the internal source as the
clock for the PWM generators.