I have an AS5040 10-bit magnetic encoder. I'm reading both absolute position using SSI and quadrature with index. When I connect it to an Arduino 2560 Mega I can feed it either 3.3V or 5V and I get correct and stable absolute positions.
I connected it to a Teensy 3.2 and feed it 3.3V (also tried powering encoder with 5V, same result). CS = 15, CLK = 15, DO = 13. Quadrature is being tracked by interrupts and looks ok but when the encoder is not moving I get values that bounce between x and x/2. The encoder might show 900, 900, 900, 450, 450, 450, 900... If I move the motor to let's say position 256 it will randomly bounce between that and about 128. It's not exactly x/2 but close. Each output is showing fault on the Teensy.
This is the library I'm using. https://github.com/MarkTillotson/AS5040
Thanks for any insight.
I connected it to a Teensy 3.2 and feed it 3.3V (also tried powering encoder with 5V, same result). CS = 15, CLK = 15, DO = 13. Quadrature is being tracked by interrupts and looks ok but when the encoder is not moving I get values that bounce between x and x/2. The encoder might show 900, 900, 900, 450, 450, 450, 900... If I move the motor to let's say position 256 it will randomly bounce between that and about 128. It's not exactly x/2 but close. Each output is showing fault on the Teensy.
This is the library I'm using. https://github.com/MarkTillotson/AS5040
Thanks for any insight.