I need to interface a LTC1257 which is a 12-bit DAC with a mega16. The linear technologies says that this DAC has a serial SPI interface.
I have found assembly code that bit-bangs the serial interface, but I want to use SPI and C.
I know that SPDR is 8-bit and for LTC1257 I need a 12-bit word. So I am going to need 2 data transfers.
Should I feed 4bit junk and then MSB to LSB bits in a total of 16-bit or should I send MSB to LSB bits and then 4-bit junk to complete the 2 data transfers?
Any help is welcomed!