Question
Q-01 * How many states are defined in the system? 0 1 2 more Q-02 * How long is the LED on? 2 ticks 4
Q-01 *
How many states are defined in the system?
0
1
2
more
Q-02 *
How long is the LED on?
2 ticks
4 ticks
8 ticks
16 ticks
Q-03 *
Which is examined first in the tick function?
Exit actions
Exit transitions
State actions
State increments
Q-04 *
What action occurs in the LEDOff transition?
Turn off LED
increment counter
initialize counter
default condition
Q-05 *
What condition is tested in the LEDOff transition?
Entry condition
State action
Condition increment
Exit condition
Q-06 *
What is the power-up value of the loop counter 'i'
0
8
3
-1
Q-07 *
What data type is the state variable?
SM1_State
SM1_States
SM1_LEDOff
SM1_LEDOn
Q-08 *
How often is the tick function called? (msec)
10
800
100
300
Q-09 *
Where is the timer period set?
Line 6
Line 12
Line 54
Line 51
Q-10 *
Which line is the exit transition for LEDOff state?
12
19
33
41
Q-11
What is the first action in the LEDOn state?
Reset the counter
Increment the counter
Test the counter value
Turn the LED on
Q-12
Which line waits for the SM1_Clk flag to be set by the timer?
Line 11
Line 33
Line 57
Line 59
Binky + State machine Name: linky Prefox: SM1 Period: 100 Variables and functions Define user variables and functions for this static unsigned char i; Inputs: A7-A0 Outputs: 87-80 ms i-0; i#0; LEDO LEDon B0-0 B0-1 i-8/ i 0: SM Code #include "rims "h" switch (SM1_State) 3 Static unsigned char i: case SM1 LEDoff unsigned char SM1_cik; void 35 36 37 38 39 40 41 42 43 B0 : 5 Time rISR ( ) { break: case SM1 LEDon: B0-1 enum SM1_States SM1 LEDOft, SM1 LEDon SM1 State; 10 11 12 13 break: Tickfct-Blinky() { default: break: switch (SM1 State) case-1: 15 16 17 18 19 20 21 45 46 47 48 Eint main) 49 break: case SM1 LEDOfE: i((-)&&AO) SMi State sMi LEDon 51 52 53 const unsigned int periodBlinky-100 TimerSet (periodBlinky) TimerOn break 23 case SM1 LEDon: SM1 State-1: if (1-) M1 State SM1 LEDOfE: 56 26 27 28 29 30 while(1) break default: TickFct inky O while(SM1_Clk) 60 61 62L SM1 State SM1 LEDOff: 32 Binky + State machine Name: linky Prefox: SM1 Period: 100 Variables and functions Define user variables and functions for this static unsigned char i; Inputs: A7-A0 Outputs: 87-80 ms i-0; i#0; LEDO LEDon B0-0 B0-1 i-8/ i 0: SM Code #include "rims "h" switch (SM1_State) 3 Static unsigned char i: case SM1 LEDoff unsigned char SM1_cik; void 35 36 37 38 39 40 41 42 43 B0 : 5 Time rISR ( ) { break: case SM1 LEDon: B0-1 enum SM1_States SM1 LEDOft, SM1 LEDon SM1 State; 10 11 12 13 break: Tickfct-Blinky() { default: break: switch (SM1 State) case-1: 15 16 17 18 19 20 21 45 46 47 48 Eint main) 49 break: case SM1 LEDOfE: i((-)&&AO) SMi State sMi LEDon 51 52 53 const unsigned int periodBlinky-100 TimerSet (periodBlinky) TimerOn break 23 case SM1 LEDon: SM1 State-1: if (1-) M1 State SM1 LEDOfE: 56 26 27 28 29 30 while(1) break default: TickFct inky O while(SM1_Clk) 60 61 62L SM1 State SM1 LEDOff: 32Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started