Using the EEPROM Panel

In this example, you will see how to view and manage the content of your EEPROM.

Refer to section Eeprom Management to learn how to manage the EEPROM content with our library.


1) Sketch: 4_EEPROM \ 1_DefaultSpaceConfig

In this program, we only need to add the required minimum code to establish communication between your Arduino and HITIPanel. This code manages the EEPROM access as well.

#include <HITIComm.h>

// run once at power on
void setup()
    // initialize library

// run repeatedly after setup() 
void loop()
    // communicate with HITIPanel


2) EEPROM Panel (Global Space)

The memory space contains memory cells. Each cell is located with an address and has a size of 1 byte.

  1. Open the EEPROM Panel (CTRL+E or Tools\EEPROM).

  2. The Content Panel initially displays the Memory Space. At communication start-up with your Arduino, HITIPanel automatically reads all the cells values. You can also do this reading manually by clicking on the “Read ALL” button.


  3. If this is the first time you access and see the content of your EEPROM, you may be surprised to find out that all the cells have their bits set to 1 instead of 0. This is absolutely normal, EEPROMs are produced and shipped in this state. However, you surely prefer to work with all the bits set to 0. To do that, click on button “Clear ALL to 0” to set all the bits to 0. You should notice that the writing process takes few seconds. Again, this is normal as writing to a cell is extremely slow. Also, note that in order to save EEPROM lifetime, writing to a cell is only performed if the data inside this cell needs being updated. Which means that if you click a second time on button “Clear ALL to 0”, no writing will be performed.

  4. Go to address 122 by using either the address selector or the navigation arrows.

  5. Change the cell value at address 122 to A2.

  6. Then change the value of bit 5 inside the same cell (bit 0 is on the far right)


 3) EEPROM Panel (User Space)

In order to simplify access and storage to your data, our EEPROM library stores your data in an area of the Memory Space called the User Space.

The User Space is organized by data type and is split into 6 sub-spaces (Boolean, Byte, Integer, Long, Float, String). Each sub-space is used to store a specific data type and then only contains elements of this specific data type. Each element is located with an index and its size depends on the data type. Thus, each element may use one or more memory cells to store its value:

The sizes of the sub-spaces can be configured. In the current example, we are using their default sizes (see default configuration for details).

Byte Space

  1. Each specialized space is associated to a color. All these spaces and their colors are displayed in the Space Selection Panel. The color of cell 122 is green which means this cell belongs to the Byte Space.

  2. As we are using the default space configuration, the Byte Space has a size of 100 bytes and contains 100 elements of type byte (index 0 to 99). A Byte element uses 1 memory cell to store its value. Put your mouse cursor over the address of cell 122. A tooltip then appears and shows that this cell holds the value of Byte 72 and this value is 178.

  3. Now, display all the elements of the Byte Space (“Byte” button in the Space Selection Panel). As expected, the value of Byte 72 is 178.

  4. Put your mouse cursor over the index of Byte 72. A tooltip appears and shows that this element value is stored in cell 122.

  5. Set the value of Byte 25 to 96. Then use your mouse to check which cell stores its value. You should find cell 75.


  6. Go back to the Memory Space (“Cell” button) and go to address 75. Then check the content of cell 75.

Float Space

  1. Display all the elements of the Float Space (“Float” button in the Space Selection Panel).
  2. Enter value -43.189 for Float 14.

  3. A Float requires 4 cells to store its value. Put your mouse cursor over the index of Float 14 to find these cells addresses. The tooltip indicates address 656 which is the main cell address. The main cell is the cell which holds the Least Significant Bits of Float 14.

  4. Go back to the Memory Space and find cell 656 using the address selector. The main cell is in Red and the 3 others are in Black.


Was this article helpful?
0 out of 0 found this helpful