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

Thread: Teensy 3.5 I2C stops working after a while

  1. #1
    Junior Member
    Join Date
    Sep 2016
    Posts
    18

    Teensy 3.5 I2C stops working after a while

    I made a simple sketch for using the I2C IO Expander MCP23017 with a teensy 3.5 board.
    Using Teensyduino v1.40 with Arduino IDE 1.8.5
    The pullup resistors (4.7k) are OK.
    After a short while (between 5s up to 2min) the expander stops working.

    Code:
    #include <Wire.h>
    #include "Adafruit_MCP23017.h"
    
    Adafruit_MCP23017 mcp;
      
    void setup() {  
      mcp.begin();      // use default address 0
      mcp.pinMode(6, OUTPUT);
      mcp.pinMode(7, OUTPUT);
    }
    
    void loop() {
      delay(500);
      mcp.digitalWrite(6, HIGH);
      mcp.digitalWrite(7, LOW);
      delay(500);
      mcp.digitalWrite(6, LOW);
      mcp.digitalWrite(7, HIGH); 
    }
    What's wrong?

  2. #2
    Junior Member
    Join Date
    Sep 2016
    Posts
    18
    It seems that it is a problem with the chip. I have the same problem on Arduino UNO.
    Sorry.

  3. #3
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,461
    Isn't there an improved and optimized wire library, especially for the Teensy 3.x processors?

Posting Permissions

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