All submissions

EEPROM Memory-Map Viewer

Solving Approach

How do you plan to solve it?

 

 

Code

/*Paste your code here*/
#include <EEPROM.h>


// Define the size of EEPROM (varies depending on microcontroller)
const int EEPROM_SIZE = 512; // For Arduino Uno, update based on your board's EEPROM size.
const int BYTES_PER_ROW = 16; // Bytes to display per row


void setup() {
  Serial.begin(9600);
  while (!Serial);


  Serial.println("EEPROM Memory Map:");
  Serial.println("Address   | Data (in Hex)");
  Serial.println("-------------------------");
  printEEPROMMap();
}


void loop() {
  // No operations in the loop.
}


void printEEPROMMap() {
  for (int i = 0; i < EEPROM_SIZE; i += BYTES_PER_ROW) {
    // Print starting address of the row
    Serial.print("0x");
    if (i < 16) Serial.print("0"); // Formatting for single-digit addresses
    Serial.print(i, HEX);
    Serial.print("       | ");


    // Print the data in hexadecimal format
    for (int j = 0; j < BYTES_PER_ROW; j++) {
      if (i + j < EEPROM_SIZE) {
        byte data = EEPROM.read(i + j);
        if (data < 16) Serial.print("0"); // Ensure two digits
        Serial.print(data, HEX);
        Serial.print(" ");
      } else {
        // If out of bounds, print placeholder
        Serial.print("-- ");
      }
    }
    Serial.println();
  }
  }

 

Output

The below output is of the EEPROM (after writing random values)

Video

Add a video of the output (know more)

 

 

 

 

 

Photo of Output

Add a photo of your hardware showing the output.

 

 

 

 

 

Screenshot of serial Terminal 

Add a Screenshot of the serial terminal showing the output.


 

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!