This documentation is out of date.

The new version of the documentation is here: https://cannylogic.com/docs

Difference between revisions of "CANNY 7, EEPROM Driver"

From CANNY Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Регистры энергонезависимой памяти)
(Nonvolatile memory registers)
Line 12: Line 12:
 
=== Nonvolatile memory registers ===
 
=== Nonvolatile memory registers ===
  
Below is a description of permissible values of controller nonvolatile memory setup registers. They are used to store information in the NVM cells.
+
Below is a description of permissible values of controller nonvolatile memory setup registers. They are used to store information in the NVRAM cells.
  
 
{|border="1" style="border-collapse:collapse;" align="left" width="100%"
 
{|border="1" style="border-collapse:collapse;" align="left" width="100%"
Line 22: Line 22:
 
{|border="0" align="left"
 
{|border="0" align="left"
 
|- valign="top"
 
|- valign="top"
|style="padding-left:0.5em;"|NVM setup register #00
+
|style="padding-left:0.5em;"|EEPROM setup register 00
 
|- valign="top"
 
|- valign="top"
 
|style="padding-left:0.5em;"|...
 
|style="padding-left:0.5em;"|...
 
|- valign="top"
 
|- valign="top"
|style="padding-left:0.5em;"|NVM setup register #63
+
|style="padding-left:0.5em;"|EEPROM setup register 63
 
|}
 
|}
 
|valign="top"|
 
|valign="top"|
Line 37: Line 37:
 
|}
 
|}
  
Ниже приведено описание допустимых значений регистров чтения энергонезависимой памяти контроллера. Они используются для сохранения информации в ячейках ЭНП.
+
Below is a description of acceptable values controller non-volatile memory read registers. They are used to store information in the NVRAM cells.
  
 
{|border="1" style="border-collapse:collapse;" align="left" width="100%"
 
{|border="1" style="border-collapse:collapse;" align="left" width="100%"
 
|- align="center" valign="top"
 
|- align="center" valign="top"
 
!width="250px"|Адрес
 
!width="250px"|Адрес
!Возвоащаемые значения
+
!Return values
 
|- valign="top"
 
|- valign="top"
 
|
 
|
 
{|border="0" align="left"
 
{|border="0" align="left"
 
|- valign="top"
 
|- valign="top"
|style="padding-left:0.5em;"|Регистр чтения энергонезависимой памяти №00
+
|style="padding-left:0.5em;"|EEPROM Get Cell 00
 
|- valign="top"
 
|- valign="top"
 
|style="padding-left:0.5em;"|...
 
|style="padding-left:0.5em;"|...
 
|- valign="top"
 
|- valign="top"
|style="padding-left:0.5em;"|Регистр чтения энергонезависимой памяти №63
+
|style="padding-left:0.5em;"|EEPROM Get Cell 63
 
|}
 
|}
 
|valign="top"|
 
|valign="top"|
Line 58: Line 58:
 
|width="70px" style="padding-left:0.5em;"|0...65535
 
|width="70px" style="padding-left:0.5em;"|0...65535
 
|style="padding-left:0.5em;"|=
 
|style="padding-left:0.5em;"|=
|style="padding-left:0.5em;"|хранимое значение.
+
|style="padding-left:0.5em;"|stored value.
 
|}
 
|}
 
|}
 
|}
  
Пример функциональной диаграммы работы с ячейками энергонезависимой памяти.
+
An example of a functional diagram with non-volatile memory cells.
  
 
[[File:6_15_2_1.png|center|900px]]
 
[[File:6_15_2_1.png|center|900px]]
  
Количество нажатий кнопки, подключенной к каналу №0 контроллера, суммируется с ранее сохраненными в именованной сети «счетчик» значениями. Значение сети «счетчик» сохраняется в энергонезависимой памяти при отпускании кнопки. После выключения и восстановления питания контроллера, сохраненное в ячейке энергонезависимой памяти значение автоматически читается и передается обратно в именованную сеть «счетчик». Таким образом удается избежать потери информации о количестве нажатий на данную кнопку при отключении питания контроллера.
+
The number of a button clicks that is connected to controller's channel #0, is added to the previously stored in the network named "counter" values. The value of the network «counter» are stored in non-volatile memory when the button is released. After turning off and then restoring controller's power, a 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.
  
 
{|
 
{|
|valign="top" style="padding-left:0.5em;"|''Примечание:''
+
|valign="top" style="padding-left:0.5em;"|''Note:''
|valign="top" style="padding-left:0.5em;"|''Процесс сохранения данных в ЭНП требует времени, т. е. не происходит мгновенно.''
+
|valign="top" style="padding-left:0.5em;"|''The process of storing data in the NVRAM takes time, i.e. not instantaneous.''
 
|}
 
|}
  
 
{|
 
{|
|valign="top" style="padding-left:0.5em;"|''Примечание:''
+
|valign="top" style="padding-left:0.5em;"|''Note:''
|valign="top" style="padding-left:0.5em;"|''Количество циклов перезаписи информации в энергонезависимой памяти ограничено. Драйвер работы с памятью CANNY7 организован таким образом, что ее ресурс существенно увеличен. Тем не менее, избегайте постоянного сохранения в ЭНП ненужных данных или сохранения данных на каждом цикле выполнения диаграммы, выполняйте сохранение информации по определенному условию (смотри пример выше).''
+
|valign="top" style="padding-left:0.5em;"|''The number of overwrites information in non-volatile memory is limited. CANNY 7 memory operation driver is organized in such a way that substantially increased its resource. However, avoid permanent unwanted data saving in to the NVRAM or store data on each execution cycle of the diagram. Perform information preservation upon a certain condition (see example above).''
 
|}
 
|}
  

Revision as of 04:05, 31 July 2016

General description

To eliminate loss of critical information (state of the controller, external devices status, and so on..) I case of power reset , CANNY7 controller 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 corresponding read and write registers.

Note: Working with non-volatile memory does not require any special pre-configuration.

Nonvolatile memory registers

Below is a description of permissible values of controller nonvolatile memory setup registers. They are used to store information in the NVRAM cells.

Address Expected values
EEPROM setup register 00
...
EEPROM setup register 63
0...65535 = stored value.

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

Адрес Return values
EEPROM Get Cell 00
...
EEPROM Get Cell 63
0...65535 = stored value.

An example of a functional diagram with non-volatile memory cells.

6 15 2 1.png

The number of a button clicks that is connected to controller's channel #0, is added to the previously stored in the network named "counter" values. The value of the network «counter» are stored in non-volatile memory when the button is released. After turning off and then restoring controller's power, a 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 NVRAM takes time, i.e. not instantaneous.
Note: The number of overwrites information in non-volatile memory is limited. CANNY 7 memory operation driver is organized in such a way that substantially increased its resource. However, avoid permanent unwanted data saving in to the NVRAM or store data on each execution cycle of the diagram. Perform information preservation upon a certain condition (see example above).

Смотри также

CANNY 7

CANNY 7, User Preprogrammed Parameters