Not whole byte SSI - AS5134 Encoder

Hi,

Just begining to research how to use the arduino as the master in SSI communications to the AS5134 encoder.

This uses:
~ three wire SSI: DIO (dual input output), DCLK (clock signal), and CS (chip select) OR
~ two wire SSI: DIO (dual input output), DCLK (clock signal)

I think it would be possible to tie together an input and output pin and connect this to the DIO pin on the encoder, ignoring the input pin while I write to the device. My confusion is how to use the SPI library when I don't want to shift out or read in a complete number of bytes worth of bits, and how to ensure the reading is triggered promptly after completing the write?

Any pointers or do I need to consider a little extra hardware to sit between the arduino and the encoder?

Cheers,

Wesley.

Data sheet for the encoder can be found here: ams OSRAM a global leader in optical solutions | ams OSRAM

My confusion is how to use the SPI library when I don't want to shift out or read in a complete number of bytes worth of bits,

Basically you can't. You can only transfer bytes.

The only option is to bit bang the interface, but that will be slower than using the SPI hardware so you might consider using direct port access.

Thanks for the reply!

Sorry for the long delay in response, I've been side tracked setting up other parts of the project.

It looks like using the PWM output will be the way to go for the shor term at least.