CANNY 7.2 Duo, 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 7.2 Duo 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 7.2 Duo memory driver is organized in a way that substantially increased the longevity of non-volatile memory. However, avoid permanently saving unnecessary data into the EEPROM or storing data on each execution cycle of the diagram. Only preserve information upon meeting certain conditions, see example.

Non-volatile memory registers

Below is a description of expected values of controller non-volatile memory setup registers. They are used to write information into the EEPROM cells.

Memory set registers.
Register Expected values
EEPROM Set Cell 00 …
EEPROM Set Cell 63
0xFFFF = value to be set
Non-volatile memory reset register ≥ 1 = clear the contents of all user-accessible ENP cells (write zeroes into all of them);
0 = save the current state of the ENP cells.

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

Memory get registers.
Register Return Values
EEPROM Get Cell 00 …
EEPROM Get Cell 63
0…0xFFFF = value to be read.


Function diagram with non-volatile memory cells.

A button is connected to the controller’s channel 8. The number of times the button is pressed is added to the previously stored value in the network named “counter”. The value of the network «counter» is stored in non-volatile memory when the button is released. After turning off and then restoring controller’s power, the value stored in non-volatile memory cell is automatically read and transmitted back to the network named “counter”. This avoids loss of information on the number of clicks on this button after controller power loss.

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