How does it work?
EEPROM 7 Click is based on the 25CSM04, a 4 Mb Serial EEPROM with a Serial Peripheral Interface (SPI), a 128-bit serial number, and enhanced Write Protection Mode from Microchip. The 25CSM04 is organized as 524,288 bytes of 8 bits each (512 Kbyte) and features a nonvolatile Security register independent of the 4 Mb main memory array. The first half of the Security register is read-only and contains a factory-programmed, globally unique 128-bit serial number in the first 16 bytes. It also includes a Software Device Reset function that allows the user to reset the device to its power-on default behavior without the need to power cycle the device.
Some other advantages of this Click board™ include a lower standby current, the ability to perform single-byte, multi-byte, and full-page writes, shorter erase/rewrite times, and more erase/rewrite cycles. Besides, it includes a user-programmable lockable ID page, built-in ECC, and a configurable write protection scheme for all bytes.
EEPROM 7 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 8 MHz. In addition to the SPI communication, the EEPROM 7 Click also has two additional pins used for Write Protection and HOLD function routed to the RST and PWM pins of the mikroBUS™ socket.
When a serial communication sequence is underway, a HOLD pin, labeled as HLD, can be used to pause the serial communication with the device without having to stop or reset the clock sequence. The Hold Mode, however, does not affect the internal write cycle. Therefore, if a write cycle is in progress, asserting the HLD pin will not pause the sequence, and the write cycle will continue until its completion.
On the other side, the configurable Write Protection function labeled as WP allows the user to select Legacy Write Protection Mode or Enhanced Write Protection Mode. This pin serves to protect the STATUS register and memory array contents via the Block Protection Modes when Legacy Write Protection mode is enabled. When Enhanced Write Protection mode is enabled, a WP pin protects any memory zone according to how its corresponding Memory Partition registers are programmed.
This Click board™ is designed to operate with both 3.3V and 5V logic voltage levels selected via the VCC 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 for consumer and industrial applications where reliable and dependable nonvolatile memory storage is essential.
On-board modules
EEPROM 7 Click is based on the 25CSM04, a 4 Mb Serial EEPROM with a Serial Peripheral Interface (SPI), a 128-bit serial number, and enhanced Write Protection Mode from Microchip.
Key Features
4-Mbit serial EEPROM, security register, high-speed clock frequency, enhanced write protection mode, high reliability, 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 7 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 Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
EEPROM 7 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 2.5 | – | 5.5 | V |
Memory Size | – | 4 | – | Mbit |
EEPROM Write Endurance | 1.000.000 | – | – | Write Cycles |
EEPROM Data Retention | 100 | – | – | Years |
Operating Temperature Range | -40 | – | +85 | °C |
Software Support
We provide a library for the EEPROM 7 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 7 Click board™. Library performs a standard SPI interface communication.
Key functions:
(uint8_t *p_tx_data, uint8_t n_bytes)
– Write EEPROM memory function.( uint8_t *p_rx_data, uint8_t n_bytes)
– Read EEPROM memory function.uint8_t eeprom7_is_device_ready ( void )
– Check the device is ready 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 7 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 3 sec.
void application_task ( ) { eeprom7_send_cmd( EEPROM7_OPCODE_STATUS_WREN ); Delay_ms( 100 ); eeprom7_write_memory( 0x00001234, &demo_data[ 0 ], 9 ); Delay_ms( 100 ); 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 ); while ( eeprom7_is_device_ready( ) == EEPROM7_DEVICE_IS_READY ) { check_status = eeprom7_send_cmd( EEPROM7_OPCODE_STATUS_WRBP ); Delay_ms( 1 ); } eeprom7_read_memory( 0x00001234, &read_data[ 0 ], 9 ); Delay_ms( 100 ); mikrobus_logWrite( " Read data : ", _LOG_TEXT ); for ( n_cnt = 0; n_cnt < 9; n_cnt++ ) { mikrobus_logWrite( &read_data[ n_cnt ], _LOG_BYTE ); } mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_ms( 3000 ); }
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.