This documentation is out of date.
The new version of the documentation is here: https://cannylogic.com/docs |
Difference between revisions of "CANNY 5.2 duo, System Registers"
(→Reset controller) |
(→Built-in LED) |
||
Line 92: | Line 92: | ||
A functional diagram fragment, which turns on built-in Red LED for one second after each controller reset. | A functional diagram fragment, which turns on built-in Red LED for one second after each controller reset. | ||
− | [[File:14_5_3_1.png | + | [[File:14_5_3_1.png]] |
<br clear="all"> | <br clear="all"> |
Revision as of 11:50, 19 December 2016
General description
System resources are divided into an address group of read registers and an address group of write registers. Referring to the given registers from the functional diagram, you can get demanding information for practical application about the current status of the controller, and control its operation mode. The set of system registers located in the "System Registers" directory of CannyLab IDE registers list, which is available via "Input Register" and "Output Register" context menu.
Reset controller
Controller reset occurs as a result of any of the three events: when power up the controller, soft reset from the functional diagram. The controller is initialized after reset: the entire memory contents is cleared, input-output channels are reset to a neutral state, system software drivers are transferred to the initial state, power consumption is set to normal, a functional diagram execution starts from the beginning. The non-volatile memory content does not change at reset.
Information about the reset is available by accessing the address "Power On Detect Register"
Address | Return Values | ||||||
---|---|---|---|---|---|---|---|
Power On Detect Register |
|
Forced reset of the controller is performed by writing a nonzero value to "Reset Register" address. In this case, the controller reset takes place immediately after the end of the execution cycle of functional diagram, in which there was such a record.
Address | Expected values | ||||||
---|---|---|---|---|---|---|---|
Reset Register |
|
Built-in LED
The controller has a built-in bi-color (green/red) LED. The functional diagram controls switching-on of each color by writing specific values into the appropriate registers.
Address | Expected values | ||||||
---|---|---|---|---|---|---|---|
Green LED On/Off Register |
| ||||||
Red LED On/Off Register |
|
Note: | Turning the LED simultaneously in both colors is unavailable, so if functional diagram set simultaneous switching on of Red and Green LEDs, the LED turns green only (green priority). |
A functional diagram fragment, which turns on built-in Red LED for one second after each controller reset.