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

Thread: I2C and AD7991 and Teensy4

  1. #1
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    86

    I2C and AD7991 and Teensy4

    Hi all,

    The Teensy 4...... my questions : the AD7991 works on pins 19 and 18 but not on 17 and 16 any suggestions?
    Best,
    Johan
    Last edited by pd0lew; 08-25-2019 at 04:21 PM. Reason: to quick for asking

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,145
    Quote Originally Posted by pd0lew View Post
    Hi all,

    The Teensy 4...... my questions : the AD7991 works on pins 19 and 18 but not on 17 and 16 any suggestions?
    Best,
    Johan
    The Teensy 4 does not have alternate I2C pins like the previous Teensy LC/3.x microprocessors did. So for the first i2c port, you have to use pins 19 and 18.

    However, the Teensy 4.0 does have a second i2c that are on pins 16 & 17. To use this port, you need to change references from Wire to Wire1 in both your code and in the driver. Typically you would need to clone the driver to have a new name, and change the include file in your .ino/.pde file. Some i2c drivers let you pass in the i2c bus to use as an optional argument.

    As in the previous Teensys when using the alternate i2c pins, pin 17 is the SDA pin and pin 16 is the SCL pin (reversing the order from the standard i2c pins, where pin 19 is SCL and pin 18 is SDA).

    There is a 3rd i2c bus on the Teensy 4.0 that you would need to use the underneath pads to use (pad 24 is SCL2 and pad 25 is SDA2).

  3. #3
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    86
    Thanks Michael that did the job.

    Best regards,
    Johan

Posting Permissions

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