How does it work?
EEPROM 12 Click is based on the M24256E, an EEPROM from STMicroelectronics. The protections include write protection of the whole memory array, enhanced ESD/latch-up protection, and more. It can withstand over 4 million write cycles and has over 200 years of data retention. It has a write time both for byte or page within 5ms and supports random and sequential read modes. The write page mode allows up to 64 bytes to be written in a single write cycle. The error correction code (ECC) is implemented on each group of four EEPROM bytes, which improves the read reliability. During the internal write cycle, the device disconnects itself from the bus and writes a copy of the data from its internal latches to the memory cells. This, in turn, minimizes write delays.
EEPROM 12 Click uses a standard 2-Wire interface to communicate with the host MCU, supporting a clock frequency of up to 1MHz. The EEPROM supports a configurable device address register (CDA), which allows the user to define the device address and a device address lock (DAL) to freeze the configurable device address register. The EEPROM also supports a write control protection, which can be accessed over the WC pin.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Specifications
Type
EEPROM
Applications
Can be used for the development of the development of consumer electronics, office equipment, communication devices, medical equipment, automobile equipment, and more
On-board modules
M24256E – 256-Kbit serial I2C bus EEPROM from STMicroelectronics
Key Features
Supports standard, fast, and fast mode plus I2C interface, 256-Kbit of EEPROM in 64 bytes of page sizes, random and sequential read modes, write protection of the whole memory array, enhanced ESD/ latch-up protection, long data retention and data write cycles, and more
Interface
I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on EEPROM 12 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power/Logic Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
EEPROM 12 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Memory Size | – | – | 256 | Kbit |
Data Retention | 200 | – | – | Years |
Endurance | 4.000.000 | – | – | Cycles |
Software Support
We provide a library for the EEPROM 12 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), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for EEPROM 12 Click driver.
Key functions
-
eeprom12_memory_write
EEPROM 12 memory write function. -
eeprom12_memory_read
EEPROM 12 memory read function.
Example Description
This example demonstrates the use of EEPROM 12 Click board™. The demo app writes specified data to the memory and reads it back.
void application_task ( void )
{
uint8_t data_buf[ 128 ] = { 0 };
memcpy( data_buf, DEMO_TEXT_MESSAGE_1, strlen( DEMO_TEXT_MESSAGE_1 ) );
if ( EEPROM12_OK == eeprom12_memory_write( &eeprom12, STARTING_ADDRESS_1,
data_buf,
strlen( DEMO_TEXT_MESSAGE_1 ) ) )
{
log_printf( &logger, " Write data: %srn", data_buf );
Delay_ms( 100 );
}
memset( data_buf, 0, sizeof( data_buf ) );
Delay_ms( 100 );
if ( EEPROM12_OK == eeprom12_memory_read( &eeprom12, STARTING_ADDRESS_1,
data_buf,
strlen( DEMO_TEXT_MESSAGE_1 ) ) )
{
Delay_ms( 100 );
log_printf( &logger, " Read data: %srnn", data_buf );
Delay_ms( 3000 );
}
memcpy( data_buf, DEMO_TEXT_MESSAGE_2, strlen( DEMO_TEXT_MESSAGE_2 ) );
if ( EEPROM12_OK == eeprom12_memory_write( &eeprom12, STARTING_ADDRESS_2,
data_buf,
strlen( DEMO_TEXT_MESSAGE_2 ) ) )
{
log_printf( &logger, " Write data: %srn", data_buf );
Delay_ms( 100 );
}
memset( data_buf, 0, sizeof( data_buf ) );
Delay_ms( 100 );
if ( EEPROM12_OK == eeprom12_memory_read( &eeprom12, STARTING_ADDRESS_2,
data_buf,
strlen( DEMO_TEXT_MESSAGE_2 ) ) )
{
Delay_ms( 100 );
log_printf( &logger, " Read data: %srnn", data_buf );
Delay_ms( 3000 );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.EEPROM12
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.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.