Using the EEPROM on S08DZ60 microcontroller

Some S08 microcontrollers from Freescale have an internal EEPROM which can be used to store some data by the application. This application note deals with the EEPROM and will show you how to read/write/erase the EEPROM on those microcontrollers.

This application note has been developed on TheUno because the S08DZ60 microcontroller is one of the device with an internal EEPROM.

You can download the full article and source codes using the following link:

Using the EEPROM on S08DZ60 microcontroller - Revision 1.1, 2013-12-08

1. Software architecture

The software architecture is shown below.

2. Accessing the EEPROM

The EEPROM header file must be included in the user application:

#include "eeprom.h"

The EEPROM interface contains several functions:

- EEPROM_Init() to initialize the EEPROM;
- EEPROM_Read() to read a single sector of the EEPROM;
- EEPROM_Write() to write a single sector of the EEPROM;
- EEPROM_Erase() to erase all the EEPROM.

The initialization function must be called on startup. Then, the application can read/write/erase the EEPROM when required.

The software attached to this application note proposes several calls to the EEPROM functions to show how it is possible to use them. It also proposes to check the memory step by step in the debugger to see the result of the operations on the microcontroller.


This application note shows how to use the EEPROM on S08 devices. The sample code attached to this document can be used in your own applications.

The complete documentation attached to this article gives some additionnal details and advice regarding to the use of the EEPROM.