ShiftIn()
From Microduino Wiki
shiftIn()
- Description
Shift one byte of a number in one by one, starting from the most significant bit(on the leftest)the least significant bit(on the rightest). For every bit, firstly, pull the clock voltage up, and then read one bit from the data transmission wire, finally, pull the clock wire down.
Note:This is a software implementation;Arduino provides a SPI library of hardware implementation, of which the speed is quicker but it is only valid for specified pins.
- Syntax
shiftIn(dataPin,clockPin,bitOrder)
- Parameters
dataPin:Output the pins of each bit of the data(int).
clockPin:The level change(int) of this pin when dataPin has a value . bitOrder:The order of output bit, the highest priority or the lowest priority.
- Return
The value read(byte)