EEPROM 11 click
EEPROM 11 Click is a compact add-on board with a highly reliable, nonvolatile memory solution. This board features the S-34C04AB, an EEPROM for DIMM serial presence detection from ABLIC. The EEPROM is internally organized as 2 pages of 256 words x 8-bit, and a capacity of 4Kbits and is an EE1004-1 JEDEC standard-compliant.
click Product page
Click library
- Author : Stefan Ilic
- Date : Aug 2023.
- Type : I2C type
Software Support
We provide a library for the EEPROM 11 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for EEPROM 11 Click driver.
Standard key functions :
eeprom11_cfg_setup
Config Object Initialization function.
void eeprom11_cfg_setup(eeprom11_cfg_t *cfg)
EEPROM 11 configuration object setup function.
EEPROM 11 Click configuration object.
Definition eeprom11.h:153
eeprom11_init
Initialization function.
err_t eeprom11_init(eeprom11_t *ctx, eeprom11_cfg_t *cfg)
EEPROM 11 initialization function.
EEPROM 11 Click context object.
Definition eeprom11.h:139
eeprom11_default_cfg
Click Default Configuration function.
err_t eeprom11_default_cfg(eeprom11_t *ctx)
EEPROM 11 default configuration function.
Example key functions :
eeprom11_page_write
EEPROM 11 page write function.
err_t eeprom11_page_write(eeprom11_t *ctx, uint8_t address, uint8_t *data_in)
EEPROM 11 page write function.
eeprom11_clear_page
EEPROM 11 page clear function.
err_t eeprom11_clear_page(eeprom11_t *ctx, uint8_t address)
EEPROM 11 page clear function.
eeprom11_set_page_addr
EEPROM 11 set page address function.
err_t eeprom11_set_page_addr(eeprom11_t *ctx, uint8_t page_addr)
EEPROM 11 set page address function.
Example Description
This is an example that demonstrates the use of the EEPROM 11 Click board.
The demo application is composed of two sections :
Application Init
Initializes the driver and USB UART logging, disables write protection.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
if ( I2C_MASTER_ERROR ==
eeprom11_init( &eeprom11, &eeprom11_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
@ EEPROM11_ERROR
Definition eeprom11.h:169
#define EEPROM11_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition eeprom11.h:127
void application_init(void)
Definition main.c:31
Application Task
Writes a desired number of data bytes to the EEPROM 11 memory into a specified address, and verifies that it is written correctly by reading from the same memory location.
{
uint8_t rx_data[ 16 ] = { 0 };
Delay_ms ( 1000 );
{
log_printf( &logger, " Write data: %s \r\n", tx_data );
}
else
{
log_error( &logger, " Write operation failed!!! " );
}
Delay_ms ( 1000 );
{
log_printf( &logger, "Read data: %s \r\n", rx_data );
}
else
{
log_error( &logger, " Write operation failed!!! " );
}
log_printf( &logger, " - - - - - - - - - - - \r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
@ EEPROM11_OK
Definition eeprom11.h:168
err_t eeprom11_generic_read(eeprom11_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
EEPROM 11 I2C reading function.
void application_task(void)
Definition main.c:67
#define MEMORY_ADDRESS
Definition main.c:26
#define TX_DATA
Definition main.c:25
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.EEPROM11
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. UART terminal is available in all MikroElektronika compilers.