Skip to content

FRAM TinyShield Tutorial

This FRAM Shield allows you to add memory to your TinyDuino projects that can read and write at a virtually instant rate. Built around the Fujitsu MB85RS1MT, this board allows for some extra processing memory when your Arduino device is powered on and retains it even while power is shut off.

The FRAM Shield is low power and works through the SPI interface. It has 1Mbit of storage and is byte-addressable.  Example code is provided to make it simple to add FRAM support to your projects.  

Technical Details

TECH SPECS

Fujitsu MB85RS1MT FRAM Specs

  • 128K x 8 (1 Mbit)
  • Zero Write Time
  • Unlimited read and write cycles

TinyDuino Power Requirements

  • Voltage: 2.5V - 5.5V 
  • Current:
    • Standby: 120uA
    • Read: 9.5mA
    • Write: 9.5mA
    • Sleep: 10uA
    • Due to the low current, this board can be run using the TinyDuino coin cell option.

Pins Used

  • 05 - SPI_CS: This signal is the SPI chip select for the SRAM.
  • 11 - MOSI: This signal is the serial SPI data out of the TinyDuino and into the SRAM.
  • 12 - MISO: This signal is the serial SPI data out of the SRAM and into the TinyDuino.
  • 13 - SCLK: This signal is the serial SPI clock out of the TinyDuino and into the SRAM.

Dimensions

  • 20mm x 20mm (.787 inches x .787 inches)
  • Max Height (from lower bottom TinyShield Connector to upper top TinyShield Connector): 5.11mm (0.201 inches)
  • Weight: 1.11 grams (.039 ounces)

Learn more about the TinyDuino Platform


Materials

Hardware

Software


Hardware Assembly

On top of the processor board of choice, attach the FRAM TinyShield using the tan 32-pin connector. Connect your hardware stack to your computer using a microUSB cable. Make sure the processor is switched on.


Software setup

For this Wireling, you will need to download the FRAM library. The zip file for this library can be found under the Software section. To install an Arduino library, check out our Library Installation Help Page.

Make the correct Tools selections for your development board. If unsure, you can double check the Help page that mentions the Tools selections needed for any TinyCircuits processor.


Upload Program

The example program will demonstrate a simple write and read operation:

FRAM Example Program
/**********************************************************************
 * FRAM Memory TinyShield Example:
 * Performs a basic write and read operation of a string to FRAM chip
 * 
 * Written by: Laveréna Wienclaw for TinyCircuits
 * Initialized: Feb 2020
 * Last modified: 
 *********************************************************************/

#include <FRAM.h>

// Make Serial Monitor compatible for all TinyCircuits processors
#if defined(ARDUINO_ARCH_AVR)
  #define SerialMonitorInterface Serial
#elif defined(ARDUINO_ARCH_SAMD)
  #define SerialMonitorInterface SerialUSB
#endif

uint8_t FRAM_CS_PIN = 5;
FRAM fram(FRAM_CS_PIN);

void setup() {
  SerialMonitorInterface.begin(9600);
  fram.begin();
}

void loop() {
  char test [] = "hello, world";
  fram.seek(1);
  SerialMonitorInterface.print("Data to write: ");
  SerialMonitorInterface.println(test);
  fram.write((byte *) test, sizeof test);
  char buf[100];
  fram.seek(1);
  fram.readBytes((char *) buf, sizeof buf);
  SerialMonitorInterface.print("Data read: ");
  SerialMonitorInterface.println(buf);
  delay(1000);

//  int framData = fram.read();
//  SerialMonitorInterface.println(framData);
}

Downloads


Contact Us

If you have any questions or feedback, feel free to email us or make a post on our forum. Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it.

Thanks for making with us!