When using data rates over 38.4 kbps, the following conditions need to be considered:
When reading the first byte, the start bit is first tested about 11.5 µs after the start of the tx stop bit.
When reading bytes after the first, the start bit is first tested about “full” + 11 us after the previous bit 8 read, which occurs
near the middle of bit 8.
When enabled, STB does the following to aid in debugging asynchronous reads:
STB is set about 6 µs after the start of the last tx stop bit, or about “full” + 6 us after the previous bit 8 read.
STB is cleared about 0-2 us after the rx start bit is detected.
STB is set after about “half”.
STB is cleared after about “full”.
Bit 0 is read about 1 µs later.
STB is set about 1 µs after the bit 0 read.
STB is cleared after about “full”.
Bit 1 is read about 1 µs later.
STB is set about 1 µs after the bit 1 read.
STB is cleared after about “full”.
This continues for all 8 data bits and the stop bit, after which STB remains low.
Declaration:
long AsynchConfig ( long *idnum,
long demo,
long timeoutMult,
long configA,
long configB,
long configTE,
long fullA,
long fullB,
long fullC,
long halfA,
long halfB,
long halfC )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
*idnum – Local ID, serial number, or -1 for first found.
demo – Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
timeoutMult – If enabled, read timeout is about 100 milliseconds times this value (0-255).
configA – If >0, D8 is set to output-high and D9 is set to input.
configB – If >0, D10 is set to output-high and D11 is set to input.
configTE – If >0, D12 is set to output-low.
fullA/B/C – Time constants for a “full” delay (1-255).
halfA/B/C – Time constants for a “half” delay (1-255).
Outputs: