Returns the serial-out data bits pulse width for the logic high and logic low time in microseconds for all 4 serial-out channels.
Gx3756SerialOutGetDataBitsPulseWidth (nHandle, pdwLogicHighPulseWidth, pdwLogicLowPulseWidth, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3756 board. |
pdwLogicHighPulseWidth |
PDWORD |
Returns the serial-out data bits pulse width for the logic high time in microseconds for all 4 serial-out channels. |
pdwLogicLowPulseWidth |
PDWORD |
Returns the serial-out data bits pulse width for the logic low time in microseconds for all 4 serial-out channels. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function returns the serial-out data bits pulse width for the logic high and logic low time in microseconds for all 4 serial-out channels. Data bits pulse width for the logic high: Each bit transmitted duration is set according to the Gx3756SerialOutSetBitRate() API.
During the time that each transmitted bit with logic level set to high (‘1’), the user can program the time inside the bit rate duration of how long the logic high will stay high before it goes low. For example, if the bit rate is set to 1000uSec (1mSec):
dwLogicHighPulseWidth = 0: for the duration of transmitting any logic high bits, the output will be set low.
dwLogicHighPulseWidth = 500: for the duration of transmitting any logic high bits, the output will be set to logic high for the first 500uSec, and then set to low for the rest of the bit rate time.
dwLogicHighPulseWidth = 1000: for the duration of transmitting any logic high bits, the output will be set high.
During the time that each transmitted bit with logic level set to low (‘0’), the user can program the time inside the bit rate duration of how long the output will stay high before it goes low. For example, if the bit rate is set to 1000uSec (1mSec):
dwLogicLowPulseWidth = 0: for the duration of transmitting any logic low bits, the output will be set low.
dwLogicLowPulseWidth = 500: for the duration of transmitting any logic low bits, the output will be set to logic high for the first 500uSec, and then set to low for the rate of the bit rate time.
dwLogicLowPulseWidth = 1000: for the duration of transmitting any logic low bits, the output will be set high.
Channels 0-3 (Group 0) can be programmed to operate as serial-out transmitter or as Static I/O, see Gx3756SerialOutSetMode() API for more details. When any of Channels 0-3 (Group 0) are set to Serial Out, all 4 channels direction is set to output.
Channels 3-7 (Group 1) can be programmed as an external trigger source to channels 0-3 (Group 0), when they are set to serial-out operation mode. See Gx3756SerialOutSetMode(), and Gx3756SerialOutGetTriggerSource() APIs for more details.
See the Gx3756SerialOutGetStatus () API for complete example.
The following example returns the serial-out data bits pulse width for the logic high and logic low time in microseconds for all 4 serial-out channels:
SHORT nHandle, nStatus;
DWORD dwLogicHighPulseWidth, dwLogicLowPulseWidth;
Gx3756SerialOutGetDataBitsPulseWidth (nHandle, &dwLogicHighPulseWidth, &dwLogicLowPulseWidth, &nStatus);
Gx3756SerialOutReset, Gx3756SerialOutSetArmState, Gx3756SerialOutSetBitRate, Gx3756SerialOutSetData, Gx3756SerialOutSetDataBitsPulseWidth, Gx3756SerialOutSetTriggerSource, Gx3756SerialOutSetMode,
Gx3756SerialOutSetNumOfDataBits, Gx3756SerialOutSetShiftMode, Gx3756SerialOutSetTriggerDelay, Gx3756SerialOutSetTriggerSource, Gx3756SerialOutTrig, GxFpgaGetErrorString