You need to send null clocks before the start bit. The dummy8 of A_data will be auto aligned/padded by the compiler to the correct storage boundary for the structure so we can use a union to send the correct 3 bytes of 4 and 24 bits to the ADC.
24-bit spi mode 0,0 transmit sequence in the C structure with union overlay to long and 4 byte array.
https://forum.allaboutcircuits.com/threads/pic24-bluetooth-low-energy-dk.128497/#post-1056985
SDO to ADC
SDI from ADC
ADC spi data: top command, bottom response.
24-bit spi mode 0,0 transmit sequence in the C structure with union overlay to long and 4 byte array.
https://forum.allaboutcircuits.com/threads/pic24-bluetooth-low-energy-dk.128497/#post-1056985
SDO to ADC
SDI from ADC
ADC spi data: top command, bottom response.
Last edited: