Adafruit I2C FRAM Breakout support Arduino Due

I try to get an Adafruit I2C FRAM Breakout Board running by following this guide. Instead of an Arduino Uno I'm using an Arduino Due. I'm pulling down WP to GND cause I want to write the FRAM later.

However if I execute the official example sketch MB85RC256V I get I2C FRAM not identified ... check your connections? The FRAM is fresh out of the box and should have the default address 0x50. As in the docs the address wires are not connected cause I only want to connect a single device.

Does the library Adafruit_FRAM_I2C.h support the Arduino Due?

Hi @florian_k1

Are you using the Due's SDA and SCL lines on pins 20 and 21 respectively, rather than SDA1 and SCL1 (next to AREF)?

I'm using the SDA and SCL lines mentioned in the sketch...

/* Connect SCL    to analog 5
   Connect SDA    to analog 4
   Connect VDD    to 5.0V DC
   Connect GROUND to common ground */

This only applies to the Arduino Uno/Nano.

Try connecting it to the SDA and SCL lines on the Due. Just make sure to power the FRAM device off the 3.3V power pin and not 5V, (since the Due's pins are not 5V tolerant).

I expected that the lib uses software I2C cause the sketch is mentioning analog 5 and 4. Do you mean the HW I2C pins of the Arduino Due? SDA (20) + SCL (21) or SDA1 + SCL1?

Yes, I mean SDA on 20 and SCL on 21, with FRAM's power going to 3.3V on the Due.

The Adafruit library for this device should call on the Arduino Wire library that will automatically take care of the I2C communications. The default I2C pins used by the Wire library on the Due are 20 (SDA) and 21 (SCL).

I tried... it does not work: I2C FI2C FRAM not identified ... check your connections?

I've tried with an Arduino Mega with pins SDA+SCL and SDA1+SCL1 as well. Again... the sketch does not work: I2C FI2C FRAM not identified ... check your connections?

Do you have your computer connected to the Due's programming port, (rather than its native USB port)?

I presume that the example FRAM sketch compiles and has successfully uploaded on to your Due board?

Run the example address finder in the IDE to check your fram is actually x50

( take it you have nothing connected to Wp,A0,A1,A2)and the gnd/0v connection of the Arduino and fram connected .

Yes, I had the Arduino Due connected to the programming port.

That's not possible cause fram.begin() does not connect at all. What do you mean :smiley:

The A0, A1 and A3 pins have internal pulldown resistors. So I don't have to do anything cause the default address should be 0x50.

I could not find a lib on github. Where can I find the source code of this lib?

Use an I2C scanner sketch to see if the FRAM is there at the right address.

I have no issues using 2Kbyte or 8kbyte FRAMs on a DUE, with my own library, when they are connected to the appropriate hardware I2C pins.

I'll simply try out all addresses with corresponding A0, A1, A2 signals.

Have you connected something to the A0, A1, A2 signal?

You can find the source code for Adafruit's FRAM library on Github here: https://github.com/adafruit/Adafruit_FRAM_I2C.

I know... but I could not find the sources related to the wire object.

Why would I want to do that, as I said standard hardware I2C works just fine ?

"with my own library" you've of course no issue :smiley: I'm pretty sure I'm missing something w.r.t. the official Adafruit I2C FRAM lib...

I don't want to... but I have to try everything that I can report that I've tried everything possible with the official libs :grinning_face_with_smiling_eyes:

The Wire lib is board specific and for the Arduino Due here: https://github.com/arduino/ArduinoCore-sam/tree/master/libraries/Wire

I can confirm that FRAM I2C library does indeed call on the Wire library, but it's located in Adafruit's Bus IO library, line 1 here: https://github.com/adafruit/Adafruit_BusIO/blob/master/Adafruit_I2CDevice.h.

Have you also loaded the Adafruit_Bus IO library with the Arduino IDE Library Manager? In the Arduino IDE: Sketch->Include Library->Manage Libraries. Type something like "Arduino Bus" into the Library Manager's search and it should come up. Check to see that it's installed?