We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: v.savic
Last Updated: 2013-07-14
Package Version: 1.0.0.1
Example: 1.0.0.0
Category: Other Codes
Downloaded: 893 times
Not followed.
License: MIT license
This example present ability of the system modeled by SM to easily execute different tasks by injecting behavior. It is based on BYTE field transition matrix (TM) which stores information about system behavior. If we change and inject TM into the SM, system behavior is changed. This example present generic solution for state machine based systems.
Do you want to subscribe in order to receive notifications regarding "Injection System Behavior - State Machine (SM)" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Injection System Behavior - State Machine (SM)" changes.
Do you want to report abuse regarding "Injection System Behavior - State Machine (SM)".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1373756542_injection_system_mikroc_8051.zip [10.06KB] | mikroC PRO for 8051 |
|
This simple example present ability of the system modeled by state machine to execute different tasks by injecting behavior. It is based on 8 bits field transition matrix which stores information about system behavior. If we change transition matrix, system behavior will be changed also. Current example provides only 4 states (A, B, C and D) and 4 external commands (interrupts, events or signals). This example present generic solution for all systems modeled by state machine.
Usage examples:
1) Embedded Robotics: external commands are signals from sensors: IR sensors, mechanical sensors, ultrasonic sensors and so on.
2) Human - Machine games.
3) Low level printer drivers (external commands could be sent over communication protocols: RS232, USB ...) etc.
Generally, this idea could be used for each system which includes component able to store information about states (like micro-controller unit).
This example is written in ANSI C programming language and supports all hardware platforms powered by MikroElektronika. Unit test are written in Microsoft Visual C++ x86 compiler.
For more details pleas look at transition matrix documentation and available download links.
--------------------------------------------------------------------------------------------------------------------------------------------------
Version: 1.0.0.1
Archive available for download contains two files: Behavior1.bin and Behavior2.bin
Both files are 29 bytes long and contains transition matrix - system behavior.
To inject transition matrix into system please use USART Terminal as integral part of 8051 IDE environment. Communication is done over UART lib - RS232.
Responsibility of priority encoder (CD4532) is to encode external signals regarding transition matrix encoding rules. Below scheme is related to mechanical sensor (micro switches). For analog sensors (like IR) analog to digital converter outputs should be connected to priority encoder inputs (D0...D7).