CANNY 5.3 Pico. EEPROM Driver

General description

To eliminate loss of critical information (controller’s state, external device status, etc.) in case of a power failure, the CANNY 5.3 Pico controller is equipped with non-volatile memory. The values saved in EEPROM will be available in special registers after the power is restored.

There are 64 16-bit non-volatile memory cells, which are accessed by using the corresponding input and output registers.

Note: Working with non-volatile memory does not require any special pre-configuration. However, in order to avoid loss of information, make sure that in the time period between writing new values, the value in the write register of the used non-volatile memory cell is read from the read register of the same cell. See the example for more detail.

Note: Changing a value in a non-volatile memory cell will increase the execution time of the diagram loop in which the change occurred by several milliseconds.

Note: The number of times you can overwrite information in non-volatile memory is limited. CANNY 5.3 Pico memory driver is organized in a way that substantially increased the longevity of non-volatile memory. However, avoid permanently saving unnecessary data into the NVRAM or storing data on each execution cycle of the diagram. Only preserve information upon meeting certain conditions, see example.

Nonvolatile memory registers

Below is a description of expected values of controller nonvolatile memory setup registers. They are used to write information into the NVRAM cells.

Memory set registers.
Register Expected values
EEPROM Set Cell 00

EEPROM Set Cell 63
0…65535 = value to be set

Below is a description of acceptable values controller non-volatile memory read registers. They are used to read information from the NVRAM cells.

Memory get registers.
Register Return values
EEPROM Get Cell 00

EEPROM Get Cell 63
0…65535 = value to be read


Function diagram with non-volatile memory cells.

Pressing the button connected to controller channel 8 increments the value previously stored in the network named “counter”. The value of the network «counter» is stored in non-volatile memory when the button is released. After the controller is turned off and turned back on, the value stored in non-volatile memory cell is automatically read and transmitted back to the network named “counter”. This avoids loss of information about the number of clicks of the button after controller power loss.

Note: The process of storing data in the NVRAM takes time, i.e. it is not instantaneous.