Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Teensy 3.1 + MCP4261

  1. #1
    Junior Member
    Join Date
    Jul 2021
    Posts
    4

    Teensy 3.1 + MCP4261

    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

    DigiPotTest.zip

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    2,013
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •