Trying to install an FRAM breakout board onto a 4.1. Running the test code in the Adafruit FRAM library linked below, the program returns a successful read when attached to pins 18 and 19. However, when attached to SDL/SCA 1 or 2 (understanding that SCL/SDA flip order on the board), the serial monitor is blank, even though the code is supposed to return a message if there's an unsuccessful read. When I unplug the pins, the unsuccessful read does show up (instead of blank, like when it's plugged into SCL/SDA 1 and 2). Also tried running a general i2c test code, which returns a successful read when at on the first pins, but says that no i2c ports found when plugged into the others. Wondering if the blank serial monitor is significant in context.
My connections seem fine, The only other things currently attached to the board are a few momentary switches, which aren't programmed into the code. They're just soldered in place so I wanted to ask this question before dismantling the whole project, in the highly likely event that there's something that I don't know about attaching i2c devices. I'm also trying to use two other i2c devices. Should I use them on the same bus?
Here's the board, test code located
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-i2c-fram-breakout.pdf
Code from the FRAM library:
My connections seem fine, The only other things currently attached to the board are a few momentary switches, which aren't programmed into the code. They're just soldered in place so I wanted to ask this question before dismantling the whole project, in the highly likely event that there's something that I don't know about attaching i2c devices. I'm also trying to use two other i2c devices. Should I use them on the same bus?
Here's the board, test code located
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-i2c-fram-breakout.pdf
Code from the FRAM library:
Code:
#include <Wire.h>
#include "Adafruit_EEPROM_I2C.h"
/* Example code for the Adafruit I2C EEPROM breakout */
/* Connect SCL to SCL
Connect SDA to SDA
Connect VDD to 3 - 5V DC
Connect GROUND to common ground */
Adafruit_EEPROM_I2C i2ceeprom;
#define EEPROM_ADDR 0x50 // the default address!
void setup(void) {
Serial.begin(115200);
if (i2ceeprom.begin(0x50)) { // you can stick the new i2c addr in here, e.g. begin(0x51);
Serial.println("Found I2C EEPROM");
} else {
Serial.println("I2C EEPROM not identified ... check your connections?\r\n");
while (1) delay(10);
}
// Read the first byte
uint8_t test = i2ceeprom.read8(0x0);
Serial.print("Restarted "); Serial.print(test); Serial.println(" times");
// Test write ++
i2ceeprom.write8(0x0, test+1);
// dump the first 256 bytes of memory
uint8_t val;
for (uint16_t addr = 0; addr < 256; addr++) {
val = i2ceeprom.read8(addr);
if ((addr % 32) == 0) {
Serial.print("\n 0x"); Serial.print(addr, HEX); Serial.print(": ");
}
Serial.print("0x");
if (val < 0x10)
Serial.print('0');
Serial.print(val, HEX); Serial.print(" ");
}
}
void loop(void) {
}