Teensy 3.1 + MCP4261

Status
Not open for further replies.

Scattered

New member
Hi,

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.
https://imgur.com/a/iq7ZLWd

With Uno. (Only one was connected)
https://imgur.com/a/WJoqoKA

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.
 
Status
Not open for further replies.
Back
Top