We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-06-25
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: SRAM
Downloaded: 2273 times
Not followed.
License: MIT license
EERAM 2 Click is a standalone serial SRAM memory that includes shadow non-volatile backup. EERAM uses a small external capacitor to provide the energy needed to move the contents of the SRAM to the non-volatile cells when system power is lost.
Do you want to subscribe in order to receive notifications regarding "EERAM 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "EERAM 2 click" changes.
Do you want to report abuse regarding "EERAM 2 click".
Library Description
The library covers all the necessary functions to control EERAM 2 Click board. A library performs the communication with the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
Key functions:
void eeram2_set_write_status ( uint8_t en_write )
- Set write status function.EERAM2_RETVAL_T eeram2_write_continuous ( uint32_t reg, uint8_t *p_tx_data, uint8_t n_bytes )
- Continuous write the data into SRAM function.EERAM2_RETVAL_T eeram2_read_continuous ( uint32_t reg, uint8_t *p_rx_data, uint8_t n_bytes )
- Continuous read the data into SRAM function.Examples description
The application is composed of three sections :
void application_task ( )
{
check_status = eeram2_write_continuous( 0x00543210, &demo_data[ 0 ], 9 );
if ( check_status == EERAM2_ERROR )
{
mikrobus_logWrite( " ERROR Writing ", _LOG_LINE );
mikrobus_logWrite( "--------------------", _LOG_LINE );
for ( ; ; );
}
mikrobus_logWrite( " Writing... ", _LOG_LINE );
mikrobus_logWrite( "--------------------", _LOG_LINE );
Delay_ms( 100 );
check_status = eeram2_read_continuous( 0x00543210, &read_data[ 0 ], 9 );
if ( check_status == EERAM2_ERROR )
{
mikrobus_logWrite( " Reading ERROR ", _LOG_LINE );
mikrobus_logWrite( "--------------------", _LOG_LINE );
for ( ; ; );
}
mikrobus_logWrite( " Read data : ", _LOG_TEXT );
for ( cnt = 0; cnt < 9; cnt++ )
{
mikrobus_logWrite( &read_data[ cnt ], _LOG_BYTE );
}
mikrobus_logWrite( "--------------------", _LOG_LINE );
Delay_ms( 1000 );
}
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.