EEPROM 3 Click Board
EEPROM 3 Click Board
The EEPROM 3 Click Board™ provides 2 Mbit (2,097,152 bits) of Electrically Erasable Programmable Read-Only Memory, organized in bytes. In other words, this Click Board™ is an EEPROM memory medium with a capacity of 256 KB. The used EEPROM module has outstanding endurance, with 1,000,000 write cycles and a data retention period of over 100 years.
The EEPROM device on the EEPROM 3 Click Board™ features Schmitt trigger inputs for better noise protection, self-timed write cycles, it has a dedicated write protect pin for hardware protection of stored data, and an error detection and correction logic scheme that ensures reliable data output, staying transparent to the host controller.
The EEPROM 3 Click Board™ provides 2 Mbit (2,097,152 bits) of Electrically Erasable Programmable Read Only Memory, organized in bytes. In other words, this click board™ is an EEPROM memory medium with the capacity of 256 KB. The used EEPROM module has outstanding endurance, with 1,000,000 write cycles and data retention period of over 100 years. The EEPROM module on this click features Schmitt trigger inputs for better noise protection, self-timed write cycles, it has a dedicated write protect pin for hardware protection of stored data, and error detection and correction logic scheme that ensures reliable data output, staying transparent to the host controller.
The EEPROM 3 Click Board™ is aimed towards industrial and commercial applications, which require low voltage and low power operational capabilities. It can be used for any kind of temporary or permanent data storage for various embedded electronic devices, simple data logging, storing various working parameters of a module or device, safeguarding the sensitive data in case of a power cycle, and other similar applications where reliable EEPROM memory is needed.
How Does The EEPROM 3 Click Board™ Work?
The EEPROM module used on the EEPROM 3 Click Board™ is the AT24CM02, an I2C serial EEPROM from Microchip, with the memory cell density of 2 megabits (Mbit). The EEPROM density is usually expressed in bits, so exactly 2,097,152 bits are organized in units or words of 8 bits, which gives 262,144 bytes of data memory. Furthermore, the EEPROM is organized in so-called pages. One page holds 256 bytes and there are 1024 pages (1024 pages x 256 bytes = 262,144 bytes total). Having insight into how the memory cells are organized, is important for Write and Erase operations. The I2C pins are routed to the mikroBUS™ so the communication is easy and straightforward. Both 100KHz and 400KHz transfer speeds are supported by the AT24CM02 IC, as well as the 1MHz Fast Mode Plus (FM+) I2C communication, for the MCUs with I2C modules that can support that speed.
The EEPROM 3 Click Board™ uses the I2C communication protocol. Therefore, every data transaction event is initiated by the host MCU, transmitting the I2C START condition, followed by the AT24CM02 device ID byte. Upon the receiving of the device ID byte, the AT24CM02 IC expects two more address bytes, completing the 18bit address word.
The AT24CM02 IC supports Byte write instruction, which allows one single byte to be written during the write cycle. After successful write cycle, the AT24CM02 IC sends an I2C Acknowledge signal (ACK) and the master then terminates the I2C communication with the I2C STOP condition.
When using a Page write instruction, 256 bytes will be written during one write cycle. It is possible to write less than 256 bytes, but if there is still incoming data when the end of the page is reached, the write pointer will roll over to the beginning of the same page, overwriting the content there. The special care should be taken to the page alignment.
Data Read is initiated the same way as the Data Write, except that the R/W bit is set to 1. There are several read modes available, including current address read, random address read and sequential address read. These modes are selected by the host MCU action. For example, a sequential read is performed by the ACK condition sent from the MCU after the successful byte read. If the host MCU responds with the NACK condition, the sequence reading will be terminated, the address pointer will not be incremented any further, and the communication can then be terminated with the I2C STOP condition.
Whenever I2C communication is suspended, after receiving the I2C STOP signal, or after receiving the NACK signal, the device reverts to the Standby mode, which minimizes the power consumption of the AT24CM02 IC, making it a good choice for applications that require low power consumption.
One of the key features of the AT24CM02 IC is the Error Detection and Correction scheme (EDC), which allows error correction by utilizing six additional bits, internally assigned to a group of four bytes. This protection scheme is capable of correcting some types of bit errors, staying transparent to the end user. The bit comparison and error correction are done internally.
The EEPROM 3 Click Board™ offers a selection between 3.3V and 5V operation, with the onboard SMD jumper, labeled as PWR SEL. This allows both 3.3V and 5V MCUs to be interfaced with this Click board™.
The attached device datasheet contains an in-depth explanation of all the mentioned functions. However, MikroElektronika provides a library with functions that make the final code clean and readable, simplifying working with this device. These functions internally employ the aforementioned communication mechanism and expose only a simple and clean interface to the user. The provided example code demonstrates the functionality of these functions. It can be used as a reference point for a custom development.
SPECIFICATIONS
Type | EEPROM |
Applications | The EEPROM 3 Click Board™ is an excellent choice for storing initialization and configuration data of your device, when an I2C interface is required |
On-board modules | Atmel's AT24CM02 DIP-8 socket EEPROM chip |
Key Features | 256 KB of memory. I2C interface |
Interface | I2C |
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 the EEPROM 3 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | NC | ||
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | +3V3 | 7 | 3.3V | 5V | 10 | +5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
PWR | PWR | - | Power LED Indicator |
PWR SEL | PWR SEL | Left | Logic voltage level selection: left position 3V3, right position 5V |
ADD | ADD | Up | I2C address bit selection: up position 1, down position 0 |
Software Support
We provide a library for the EEPROM 3 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
This library provides generic functions enough to have complete control over the EEPROM 3 Click Board™.
Key Functions
void eeprom3_writePage( uint16_t address, uint8_t *_data, uint8_t count );
- Writes data to the EEPROM ( maximum 256 Bytes ).void eeprom3_read( uint16_t address, uint8_t *buffer, uint16_t count );
- Reads data from EEPROM.
Example Description
The application is composed of three sections:
- System Initialization - CS GPIO as the output pin, initializes SPI and UART for logging.
- Application Initialization - Initializes EEPROM 3 driver.
- Application Task - writing data to EEPROM, reading that data and displaying it via UART.
void applicationTask() { eeprom3_writePage(0x0423, &text[0], 6); mikrobus_logWrite("Writing Mikroe to EEPROM 3 click", _LOG_LINE); Delay_ms(1000); eeprom3_read(0x0423,&memValue[0],6); mikrobus_logWrite("Data read:", _LOG_LINE); mikrobus_logWrite(memValue, _LOG_LINE); Delay_ms(1000); }
The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
- I2C
- UART
Additional Notes and Information
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
The EEPROM 3 Click Board™ is supported by 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.
Software Support
We provide a library for the EEPROM 3 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
This library provides generic functions enough to have complete control over the EEPROM 3 Click Board™.
Key Functions
void eeprom3_writePage( uint16_t address, uint8_t *_data, uint8_t count );
- Writes data to the EEPROM ( maximum 256 Bytes ).void eeprom3_read( uint16_t address, uint8_t *buffer, uint16_t count );
- Reads data from EEPROM.
Example Description
The application is composed of three sections:
- System Initialization - CS GPIO as the output pin, initializes SPI and UART for logging.
- Application Initialization - Initializes EEPROM 3 driver.
- Application Task - writing data to EEPROM, reading that data and displaying it via UART.
void applicationTask() { eeprom3_writePage(0x0423, &text[0], 6); mikrobus_logWrite("Writing Mikroe to EEPROM 3 click", _LOG_LINE); Delay_ms(1000); eeprom3_read(0x0423,&memValue[0],6); mikrobus_logWrite("Data read:", _LOG_LINE); mikrobus_logWrite(memValue, _LOG_LINE); Delay_ms(1000); }
The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
- I2C
- UART
Additional Notes and Information
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
The EEPROM 3 Click Board™ is supported by 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.
EEPROM 3 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.