uint8_t tarr[4] ;define an array with 4 bytes
Tarr[0] = 0b01010101 ; bits 7...0 // these are the 32 bits you want to send but stored in 8-bit variables
Tarr[1] = 0b01010101 ; bits 15...8
Tarr[2] = 0b01010101 ; bits 23...16
Tarr[3] = 0b01010101 ; bits 31...24
uint8_t ByteCounter, BitCounter;
SYNC = LOW; // tell it data is on its way
ByteCounter = 3;
(A) BitCounter = 7;
put Tarr[ByteCounter] bit [BitCounter] on the data line
toggle the clock line
decrement the BitCounter, if it isn't zero, go back to (A)
decrement the ByteCounter, if it isn't zero, go back to (A)
SYNC = HIGH; // tell it all the bits have now been sent and can be used