Using dual AS5045 magnetic rotary encoders

Hi,

Can anybody advise what would be the easiest way to connect 2 absolute encoders to a single Arduino board (no matter Uno or Mega etc.) I have found how to connect 1 (see link) but is there a way to connect a second one to the arduino?


The type of encoders would be the AS5045A

Thanks in advance!

Its an SPI-like interface, common the clock and data, but provide a separate CS pin for each sensor.
Pull only one of the CS pins low at a time.

Hi MarkT,

Thank you for your response. I have now connected one AS5045A encoder to the Arduino but now I'm not sure if I have connected it correctly and how to read it out.

I have connected this encoder exactly like the circuit diagram below:


I connected this to the ICSP port on the right of the Arduino Uno, is this correct? Because there seems to be a similar port on the other side of the Arduino

Then for programming, I have added a library which I've found on Github:

But I think this library uses another port for communication

Could you, or anybody advise me on how to read out this AS5045A using this I(C)SP?

Thanks!