User Tools

Site Tools

한국어

cubloc:shiftin:index

ShiftIn( )

variable = ShiftIn(clock, data, mode, bitLength)

variable Variable to store results. (No String or Single)
clock Clock port. (0 to 255)
data Data port. (0 to 255)
mode 0 = LSB first (Least Significant Bit first), after rising edge
1 = MSB first (Most Significant Bit first), after rising edge
2 = LSB first (Least Significant Bit first), after falling edge
3 = MSB first (Most Significant Bit first), after falling edge
4 = LSB first (Least Significant Bit first), before rising edge
5 = MSB first (Most Significant Bit first), before fising edge
bitLength Length of bits (1 to 16)

The ShiftIn command receives a shift input. It uses 2 ports, CLOCK and DATA, to communicate.

The ShiftIn and ShiftOut commands can be used to communicate with SPI, Microwire, and similar communication protocols. When using EEPROM, ADC, or DAC devices that require SPI communication, this command can be used.

Dim A AS Byte
A = ShiftIn(3,4,0,8)    ' Port 3 is CLOCK, port 4 is DATA,
                        ' mode is 0, 8 bits to be received.

Go CUBLOC home

cubloc/shiftin/index.txt · Last modified: 2016/04/14 11:07 (external edit)