Go Down

Topic: DUE no I2C communication to Adafruit 7-Segment Feather (Read 402 times) previous topic - next topic

bxdobs

Hardware:
Due
Adafruit 7-segment Feather

driving 3 x 2.3" 7-Segment Displays (Feather only drives 1 led segments ... the 2.3" Segments have 4 leds in series ... extra circuitry has been added to provide this functionality)
 
At Issue:
can't get seem to get the DUE to communicate with the feather

was expecting to use the DUE SDA(1) & SCL(1) (pins 70 & 71) to drive the Feather SDA SCL

Feather has 10K pullups to VDD (5V) on both lines connected directly to a HT16K33 ... the DUE has no pullups on SDA(1) or SCL(1) ... concerned with 3v3/5V warnings, added a level converter between the 2 devices (Due SDA(1) & SCL(1)) 10K to 3V3,  S-2N7000, G-2N7000 (3V3), D-2N7000 (Feather SDA & SCL)

Testing:

#include <Adafruit_GFX.h>
#include <Adafruit_LEDBackpack.h>
float dRdng;
Adafruit_7segment dsp = Adafruit_7segment();
Serial.begin(9600);

loop() {
 dRdng = readADC(0); // A0 reading
 dsp.print(dRdng);
 dsp.writeDisplay();
 Serial.println(dRdng);
 delay(1000);
}


10k resistors externally pulled up to 3.3V on SDA(1)  & SCL(1) (pins 70 & 71)
1k5 resistors internally pulled up to 3.3V on SDA & SCL (pins 20 & 21)

using a 200MHz Digital Scope I see no activity on any of these 4 pins ... was expecting to see data every second

Online there are a number of threads going back several years suggesting there are issues with the DUE I2C ... some suggesting there was a fix in around board version 1.6.6 ... using board version 1.6.12

already designed & built using this hardware so hoping to find a solution before the new year



 

bxdobs

appears there was a key statement missing in the adafruit example code

there needs to be an <Adafruit_7segment>.begin(<Address>) in the setup

so after adding

dsp.begin(0x70);

the sda & scl signals begin to work but only on pins 20 & 21 ... not sure how to move this functionality to SDA(1) and SCL(1)


ard_newbie


At the beginning of your sketch, when using SCL1 / SDA1, you will have :
#include <Wire.h>
#define Wire Wire1

...........


10K pull-ups on SDA1/SCL1 is not ideal. For best performance the I2C pull-ups should be 2k2 ohms for a 1.5 mA bus current.

There is no glitch filtering on the DUE side of the I2C bus. You may consider adding 10 or 20 Ohm resistors in serie on each line  between the DUE and the bus.

There is a handy I2C bus reset function that you can use whenever the I2C peripheral hangs. You can find this function in the DUE sub forum.

Go Up