DNx-SL-514 Synchronous Serial Interface Board
Chapter 2
16
Programming with the High-Level API
May 2018
www.ueidaq.com
508.921.4600
© Copyright 2018
United Electronic Industries, Inc.
2.6
Configuring
Minimum
Pulse Widths
Users can optionally configure the SL-514 to only recognize signal transitions
that last longer than a user-programmed minimum pulse width setting. The
default setting for the minimum pulse width is 0, which results in no restriction.
To set the minimum pulse width parameter:
•
On master ports, use the
SetMinimumDataPulseWidth()
method.
•
On slave ports, use the
SetMinimumClockPulseWidth()
method.
The minimum pulse width is programmed in µs.
To read the current setting of the minimum pulse width parameter:
•
On master ports, use the
GetMinimumDataPulseWidth()
method.
•
On slave ports, use the
GetMinimumClockPulseWidth()
method.
NOTE:
This value can be incremented in ~15 ns steps and should be set to the
smallest possible setting that solves an issue of signal ringing
(debounces the signal).
The following code reads the minimum pulse width parameters for the master
port on channel 1 and the slave port on channel 2:
The following code sets the minimum pulse width parameters for the master port
on channel 1 to 50 ns and the slave port on channel 2 to 100 ns:
// Read minimum pulse width parameters
CUeiSSIMasterPort* masterMPW;
CUeiSSISlavePort* slaveMPW;
double slaveValue, masterValue;
masterMPW = dynamic_cast<CUeiSSIMasterPort*>(ssiSession.GetChannel(1));
masterValue = masterMPW->GetMinimumDataPulseWidth();
slaveMPW = dynamic_cast<CUeiSSISlavePort*>(ssiSession.GetChannel(2));
slaveValue = slaveMPW->GetMinimumClockPulseWidth();
// Set minimum pulse width parameters
masterMPW = dynamic_cast<CUeiSSIMasterPort*>(ssiSession.GetChannel(1));
masterMPW->SetMinimumDataPulseWidth(0.050);
slaveMPW = dynamic_cast<CUeiSSISlavePort*>(ssiSession.GetChannel(2));
slaveMPW->SetMinimumClockPulseWidth(0.100);