Hi,
This subroutine happily bit-bangs SPI (sending a byte) for an RTC and a radio:
SPI shift out (ie write) a single byte, most-significant bit first, data pre-clock.
; Sends output data from SPI_DATAB byte variable.
; Destroys tempB0, tempB1, SPI_DATAB.
SPI_shiftout_byte_MSB_preclock:
for...