Our SRAM memory with non-volatile EEPROM backup ensures your data is safe and ready when you need it
A
A
Hardware Overview
How does it work?
EERAM 3.3V Click is based on the 47L16, an I2C serial chip with 16 Kbit and EEPROM backup, from Microchip. The memory cells are organized into 2048 bytes, each 8bit wide. The data is read and written by the I2C serial communication bus, routed to the respective pins of the mikroBUS™ (SCL and SDA pins). To access the device, the first byte sent from the host MCU should be the I2C slave address. In most cases, the master I2C device will be the host MCU itself. The slave IC2 address depends on the state of the hardware address pins on the EERAM 3.3V click. These pins are routed to the onboard SMD jumpers, labeled as A1
and A2, so they can be pulled either to a HIGH or to a LOW logic level. Besides the address pins, the I2C slave address is determined by the section of the device that needs to be accessed. There are two sections, accessed by a different slave address: SRAM section and the CONTROL REGISTER section. The datasheet of the 47l16_3v3 contains more information on these addresses and how to access certain groups of registers. However, provided click library functions allow easy and transparent operation with the EERAM 3.3V click. The provided example application demonstrates the usage of these library functions, and it can be
used as a reference for future custom application development. The store to EEPROM/backup function will not be executed if the SDRAM content has not been changed since the last time it was written to EEPROM. This is tracked by the AN bit of the status register. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Features overview
Development board
EasyAVR v7 is the seventh generation of AVR development boards specially designed for the needs of rapid development of embedded applications. It supports a wide range of 16-bit AVR microcontrollers from Microchip and has a broad set of unique functions, such as a powerful onboard mikroProg programmer and In-Circuit debugger over USB. The development board is well organized and designed so that the end-user has all the necessary elements in one place, such as switches, buttons, indicators, connectors, and others. With four different connectors for each port, EasyAVR v7 allows you to connect accessory boards, sensors, and custom electronics more
efficiently than ever. Each part of the EasyAVR v7 development board contains the components necessary for the most efficient operation of the same board. An integrated mikroProg, a fast USB 2.0 programmer with mikroICD hardware In-Circuit Debugger, offers many valuable programming/debugging options and seamless integration with the Mikroe software environment. Besides it also includes a clean and regulated power supply block for the development board. It can use a wide range of external power sources, including an external 12V power supply, 7-12V AC or 9-15V DC via DC connector/screw terminals, and a power source via the USB Type-B (USB-B)
connector. Communication options such as USB-UART and RS-232 are also included, alongside the well-established mikroBUS™ standard, three display options (7-segment, graphical, and character-based LCD), and several different DIP sockets which cover a wide range of 16-bit AVR MCUs. EasyAVR v7 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU
Architecture
AVR
MCU Memory (KB)
64
Silicon Vendor
Microchip
Pin count
40
RAM (Bytes)
4096
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic
Step by step
Project assembly
Track your results in real time
Application Output via UART Mode
1. Once the code example is loaded, pressing the "FLASH" button initiates the build process, and programs it on the created setup.
2. After the programming is completed, click on the Tools icon in the upper-right panel, and select the UART Terminal.
3. After opening the UART Terminal tab, first check the baud rate setting in the Options menu (default is 115200). If this parameter is correct, activate the terminal by clicking the "CONNECT" button.
4. Now terminal status changes from Disconnected to Connected in green, and the data is displayed in the Received data field.
Software Support
Library Description
This library contains API for EERAM 3.3V Click driver.
Key functions:
eeram3v3_generic_write
- This function writes a desired number of data bytes starting from the selected register by using I2C serial interfaceeeram3v3_generic_read
- This function reads a desired number of data bytes starting from the selected register by using I2C serial interfaceeeram3v3_status_write
- Status register contains settings for write protection and auto-store function. Use this function to configure them
Open Source
Code example
This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.
/*!
* @file main.c
* @brief EERAM3v3 Click example
*
* # Description
* This example show using EERAM click to store the data to the SRAM ( static RAM ) memory.
* The data is read and written by the I2C serial communication bus, and the memory cells
* are organized into 2048 bytes, each 8bit wide.
*
* The demo application is composed of two sections :
*
* ## Application Init
* EERAM driver nitialization.
*
* ## Application Task
* Writing data to click memory and displaying the read data via UART.
*
* @author Jelena Milosavljevic
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "eeram3v3.h"
// ------------------------------------------------------------------ VARIABLES
static eeram3v3_t eeram3v3;
static log_t logger;
static char wr_data[ 20 ] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 };
static char rd_data[ 20 ];
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void ) {
log_cfg_t log_cfg; /**< Logger config object. */
eeram3v3_cfg_t eeram3v3_cfg; /**< Click config object. */
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
eeram3v3_cfg_setup( &eeram3v3_cfg );
EERAM3V3_MAP_MIKROBUS( eeram3v3_cfg, MIKROBUS_1 );
err_t init_flag = eeram3v3_init( &eeram3v3, &eeram3v3_cfg );
if ( I2C_MASTER_ERROR == init_flag ) {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
void application_task ( void ){
log_info( &logger, "Writing MikroE to SRAM memory, from address 0x0150:" );
eeram3v3_write( &eeram3v3, 0x0150, &wr_data, 9 );
log_info( &logger, "Reading 9 bytes of SRAM memory, from address 0x0150:" );
eeram3v3_read( &eeram3v3, 0x0150, &rd_data, 9 );
log_info( &logger, "Data read: %s", rd_data );
Delay_ms( 1000 );
}
void main ( void ) {
application_init( );
for ( ; ; ) {
application_task( );
}
}
// ------------------------------------------------------------------------ END