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: 2021-01-05
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: EEPROM
Downloaded: 2893 times
Not followed.
License: MIT license
EEPROM 5 Click is a compact add-on board that contains the highest-density memory solution. This board features the M95M04, the 4Mbit electrically erasable programmable memory organized as 524288 x 8 bits accessed through the SPI interface from STMicroelectronics.
Do you want to subscribe in order to receive notifications regarding "EEPROM 5 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "EEPROM 5 click" changes.
Do you want to report abuse regarding "EEPROM 5 click".
Library Description
The library covers all the necessary functions to control EEPROM 5 click board. Library performs a standard SPI interface communication.
Key functions:
void eeprom5_enable_memory_write ( uint8_t en_wr_mem )
- Enable memory write function.oid eeprom5_read_memory ( uint32_t addr, uint8_t *p_rx_data, uint8_t n_bytes )
- Read EEPROM memory function.void eeprom5_write_memory ( uint32_t addr, uint8_t *p_tx_data, uint8_t n_bytes )
- Write EEPROM memory function.Examples description
The application is composed of three sections :
void application_task ( )
{
eeprom5_enable_memory_write( EEPROM5_WRITE_MEMORY_ENABLE );
Delay_ms( 10 );
eeprom5_write_memory( 14, &demo_data[ 0 ], 9 );
mikrobus_logWrite( " Write data : ", _LOG_TEXT );
for ( n_cnt = 0; n_cnt < 9; n_cnt++ )
{
mikrobus_logWrite( &demo_data[ n_cnt ], _LOG_BYTE );
}
mikrobus_logWrite( "- - - - - - - - - - -", _LOG_LINE );
Delay_ms( 100 );
mikrobus_logWrite( " Read data : ", _LOG_TEXT );
eeprom5_read_memory( 14, &read_data[ 0 ], 9 );
Delay_ms( 1000 );
for ( n_cnt = 0; n_cnt < 9; n_cnt++ )
{
mikrobus_logWrite( &read_data[ n_cnt ], _LOG_BYTE );
}
mikrobus_logWrite( "---------------------", _LOG_LINE );
Delay_ms( 5000 );
}
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.