How does it work?
EEPROM 5 Click is based on the M95M04, the electrically erasable programmable memory organized as 524288 x 8 bits accessed through the SPI interface from STMicroelectronics. The M95M04 benefit from a wide power supply range of 1.8V to 5.5V, as well as 40 years of data retention, and combines their unprecedented data storage with excellent energy efficiency. It is characterized by high reliability, lasting one billion full-memory read-write cycles capable of writing 512 Bytes in 5ms. With 4Mbit capacity, it allows the capture and storage of more data through the serial SPI bus that enables equipment such as smart meters to intensify data logging for managing grids more effectively and providing more user-friendly billing. This Click board™ also provides high-density non-volatile storage for persistent data such as application code, calibration tables, and user parameters, as well as for intensive data logging.
EEPROM 5 Click communicates with MCU using the SPI serial interface that supports the two most common modes, SPI Mode 0 and 3, with a maximum SPI frequency of 10 MHz. In addition to the SPI communication, the EEPROM 5 Click also has two additional pins used for Write Protection and HOLD function routed to the PWM and RST pins of the mikroBUS™ socket.
The HOLD pin, labeled as HLD routed to the RST pin of the mikroBUS™ socket, can be used to pause the serial communication with the M95M04 without having to deselect the device. In Normal operation, the M95M04 is kept selected for the whole duration of the Hold condition. Deselecting the device while it is in the HOLD condition has the effect of resetting the device state. On the other side, the configurable Write Protection function, labeled as WP routed to the PWM pin of the mikroBUS™ socket, allows the user to freeze the size of the area of memory that is protected against Write instructions (as specified by the values in the BP1 and BP0 bits of the STATUS register).
This Click board™ is designed to operate with both 3.3V and 5V logic voltage levels selected via the PWR SEL jumper. It allows for both 3.3V and 5V capable MCUs to use the SPI communication lines properly. However, the Click board™ comes equipped with a library that contains easy to use functions and an example code which can be used, as a reference, for further development.
Specifications
Type
EEPROM
Applications
Can be used persistent data such as application code, calibration tables, and user parameters, as well as for intensive data logging.
On-board modules
EEPROM 5 Click is based on the M95M04, the electrically erasable programmable memory organized as 524288 x 8 bits accessed through the SPI interface from STMicroelectronics.
Key Features
4 Mbit (512 Kbytes) of EEPROM, write protection, more than 4 million Write cycles, more than 40-year data retention, high reliability, high density, and more.
Interface
SPI
Feature
No 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 5 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 | PWR SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
EEPROM 5 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 1.8 | – | 5.5 | V |
Maximum Output Current | – | – | 5 | mA |
Memory Size | – | – | 4096 | kbit |
EEPROM Write Endurance | – | – | 4000000 | Write Cycles |
EEPROM Data Retention | 40 | – | – | Years |
Operating Temperature Range | 40 | – | +85 | °C |
Software Support
We provide a library for the EEPROM 5 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
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 :
- System Initialization – Initializes SPI, sets RST, CS and PWM pin as outputs, begins to write log.
- Application Initialization – Initialization driver enables – SPI, also write log.
- Application Task – (code snippet) This is an example that demonstrates the use of the EEPROM 5 Click board™. In this example, we write and then read data from EEPROM memory. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes approximately for every 5 sec.
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 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- UART
- Conversions
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.
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.