Question: 1. Before TxData can be written TxReady has to be checked how often to see if data can be accepted. a. Before starting sequence b.

 1. Before TxData can be written TxReady has to be checked

how often to see if data can be accepted. a. Before starting

1. Before TxData can be written TxReady has to be checked how often to see if data can be accepted.

a. Before starting sequence

b. Every line

c. Every char

d. Not necessary because of interrupt

2. For both synchSMs in Text 1, what is the hyperperiod of the tasks?

a. 100

b. 500

c. 1000

d. 1500

3. If an oscilloscope is used to measure the lumped utilization of processing tasks, which line in Text 1 would have code inserted to turn on and off a parallel port bit?

a. Before lines 30

b. Before lines 66

c. Before lines 104

d. Before lines 45

4. In illustration 2 which signal represents TxReady?

a. A

b. B

c. C

d. D

5. In illustration 7 a fundamental concept in the mapping process with an ADC is the loss in precision when mapping analog values to digital numbers is referred to as what?

a. Floating point error

b. Rounding error

c. Frequency truncation

d. Quantization error

6. In illustration 7 the Nyquist frequency determines the maximum frequency component that can be detected with sampling. What is the maximum input frequency that can be detected?

a. One sample per cycle

b. Two samples per cycle

c. Four samples per cycle

d. Half a sample per cycle

7. In Text 1 Which line would have one task in the Executing Status from illustration 6?

a. 34

b. 37

c. 35

d. 42

8. In Text 1 Which line would have all tasks in the Ready Status from illustration 6?

a. 34

b. 42

c. 36

d. 40

2. This code was aut onat ically generated using the Riverside-Irvine State machine BuiIder tool 3. Version 2.5-10/18/2012 10:2:14 PST 67. int TickFct BlinkLed(int state) 68. /VARIABLES MUST BE DECLARED STATIC/ 69. Ie., static int x 0/ 70. /Oefine user variables for this state wachine here 7 sitch(state) I 6,#include "rimsh" state = BLLed0ff; break: 9. /This code will be shared betseen state nachines. 10. typedef struct task I 11 int state 12. unsimed long period 13. unsined long elapsedTine; 14. int (TickFct)(int) 15. 1 task: 75 76 case BL Ledoff: if (1) state BL LedOn break; if (1) I 17. task tasks[2]; 18 19. const unsigned char tasksNu2 20. const unsigned long periodBl inkLed 1500; 21. const unsigned long period ThreeLeds 500; state BL Ledoff: break: state -1: default: l II Transitions 23. const unsigned long tasksPeriodCD500; 89. svitch(state) II case BL Ledoff: 25. int TickFct BlinkLed (int state); 26. int TickFct ThreeLeds (int state) 27 28. unsigned char process insRdyTasks 29. void TinerISRO 30 unsined char ; 31. if ( ) I B0-0 break: 0; case BL Ledon 95 break; processingRdy Tasks printf ( Period too short to complete tasksYn) default: I1 break; 98. /I State actions 99. BL State state: 100 return state; 101.1 102 103 104. enum TL States TL TO, TLT, TL T2 TL State; 105. int TickFct Threeleds (int state) I 106 VARIABLES MUST BE DECLARED STATIC/ 107. e-z, static int x0;/ 108. /Define user variab les for this state achine here.s/ 109 s itch(state) /I 34. processinRdy Tasks1; 35 for i0; itasksNum; i) 36 37 if (tasksi.elapsedTine tasksi.period tasksi.state tasks[i].TickFct (t asksi.state); tasksi.elapsedT ine 0 40 tasks [i.elapsedTine tasksPeriodGCD 42. processingRdy Tasks 0 44. int nain I 45. II Priority assined to lover position tasks in array 46. unsigned char i0; 47 asksi.state -1 48. tasks[i].period periodBl inkLed; 49 tasksi elapsedTine tasks i].period; 50. tasks[i.TickFct&TickFct BlinkLed; case-1: state TL TO; break; 113 case TL TO: state TLTI break; case TL T1: if (I) 53. tasksi].state 54. tasks[i],period = periodThreeLeds ; 55 tasks i].elapsedTinetasks [i.period; 56. tasks[i].TickFet=&TickFet_ThreeLeds; TL-T2 ; 120 121 122 state break; case TL T2: 124 59. TinerSet (tasksPeri odGCD); 60. TinerOn); 61-h 62 while(1) {Sleep();} 63 64. return 0 Text 1: Program Listing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!