Serial Peripheral Interface: Difference between revisions

Content deleted Content added
mNo edit summary
Tag: Reverted
Line 153:
*** NOP for the sub's hold time
*** Pull SCLK low
** {{Code|byte_in|C}}now contains that recently-received byteuhybbyte and can be used as desired
* Pull {{Overline|CS}} high to unselect the sub
Bit-banging a sub's protocol is similar but different from above. An implementation might involve [[busy waiting]] for {{Overline|CS}} to fall or triggering an [[Interrupt handler|interrupt routine]] when {{Overline|CS}} falls, and then shifting in and out bits when the received SCLK changes appropriately for however long the transfer size is.