ZBasic System Library
288
ZBasic Microcontrollers
Normally, the data pin will be driven high or low according to the data bits being shifted out. For
compatibility with certain data bus interfaces, the flags parameter bit 3 can be used to specify that the
data pin should be put in high impedance input mode when outputting a one bit and actively pulled to
ground for a zero bit. In this mode, an external pullup resistor will need to be used to obtain a voltage
level corresponding to a logic one.
For reference purposes, the ShiftOut() routine is roughly equivalent to ShiftOutEx(dpin, cpin,
bitCnt, Shl(CInt(val), 8), &H04, 74).
Resource Usage
This subroutine uses the I/O Timer if the flags parameter has bit 2 on. If the I/O Timer is already in use,
the subroutine returns immediately. No other use of this resource should be attempted while the shifting
is in progress. Interrupts are disabled during the shifting process. However, RTC ticks are accumulated
during the shifting process so the RTC should not lose time.
Compatibility
This function is not available in BasicX compatibility mode.
See Also
|