SPI using 10 data bits instead of 8

Hi,

I have to interface an Arduino Micro with a Analog Devices AD5263 digital potentiometer ( http://www.analog.com/static/imported-files/data_sheets/AD5263.pdf ) using SPI. The AD5263 SPI interface requires 10 bits of data: 2 bits for address (identifying one of the 4 digital potentiomter outputs) followed immediately by 8 bits of data.

Unfortunately it looks like the SPI library supports only 8-bit data bytes, but not 10 bits.

What options do I have? Can the SPI library be extended to transfer 10 instead of 8 data bits?

Cheers, Wolf

Do it as 16 bits (2 bytes) with the high order ones "don't care". From the datasheet:

Note that only the last 10 bits that are clocked into the register are latched into the decoder. As CS goes high, it activates the address decoder and updates the corresponding channel according to Table 7.

Therefore it only uses the last 10 bits you sent it.

So you can put it two bytes of data with theSPI calls. Or you can bit bang 10 bits of SPI.