Teensy 3.1 + MCP4261


New member

I'm trying to get MCP4261 shield to get worked with Teensy 3.1.
When the code is uploaded on an Uno it works well. But when it's on Teensy 3.1, values are not dependable.

Output of those MCP4261 is connected with a Gamepad to move the joystick obviously.

This video, on Teensy. Both + should be moving diagonally.

With Uno. (Only one was connected)

Below is the code. I tried with clock divider 8, 16. Same issue

View attachment DigiPotTest.zip
That chip is limited to 10MHz SPI, you need to ensure the Teensy version sets the SPI clock speed to <= 10MHz.
The Uno is physically imcapable of clocking faster than 8MHz so it won't see this problem.

Also you should configure the correct SPI mode whenever using it.