Datasheet

Chapter 7. The I
2
C Device Routines
30
7.4. Using the MB85RC16V FRAM
The MB85RC16V Ferroelectric Random Access Memory[FUJ1] is a 2Kx8 non-volatile memory chip. It is
useful in cases where the microcontroller does not include enough EEPROM for the application. Many of
the 16-bit families do not include any EEPROM, so this can be useful in cases where other families are
selected. The part can be used in both 3.3 and 5 volt designs.
The data retention for the MB85RC16V is only 10 years, so that is not an advantage over the
dsPIC30F4011's EEPROM retention of 100 years. However, a single cell can be written 10
10
times,
considerably more than the EEPROM's one million writes, so the part might be considered for applications
where many rewrites are expected.
The library contains two functions for using the FRAM, MB85RC16VwriteByte() and
MB85RC16VreadByte(). In addition to the base address of the device (which must always be 0x50), the
function takes an 11 bit address.
#include "../include/i2c.h"
#include "../include/MB85RC16V.h"
.
.
.
/* Initialize the I2C peripheral */
InitI2C();
/* Read a value from the FRAM */
ucMemValue = MB85RC16VreadByte( 0x50, nAddress );
/* Write a value to the FRAM */
MB85RC16VwriteByte( 0x50, nAddress, ucMemValue );