


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The questions and instructions for exam 1 of the embedded microcomputer systems course held in spring 2003. The exam covers topics such as finite state machines (fsms), interrupts, and debugging techniques. Students are required to write answers on the exam pages and show their calculations.
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Exam 1 – Spring 2003
Do NOT write your name on this page. Write your name on the back of the last page of this exam.
Open book and open notes. Answer on these pages only, using the back of the page if necessary. Show all of your calculations; don’t make me guess how you arrived at your answer. Read the entire exam before proceeding.
const struct State { unsigned char Out; /* Output to Port B / unsigned short Time; / Time in sec to wait */ const struct State Next[4]; / Next if input=00,01,10,11 / }; typedef const struct State StateType; #define goN &fsm[0] #define waitN &fsm[1] #define goE &fsm[2] #define waitE &fsm[3] StateType fsm[4] = { {0x21, 30, {goN,waitN,goN,waitN}}, / goN state / {0x22, 5, {goE,goE,goE,goE}}, / waitN state / {0x0C, 30, {goE,goE,waitE,waitE}}, / goE state / {0x14, 5, {goN,goN,goN,goN}} / waitE state */ };
Write your answers on the next page ->
Exam 1 – Spring 2003
The FSM controller must run in the background using output compare, RTI, or TOF interrupts. Part a) Show the ritual that initializes the traffic light system. The initial state is goN. The main program, which you do not write, will call the ritual, and then perform other unrelated tasks.
Part b) Show the ISR that runs the controller in the background.
Exam 1 – Spring 2003
6812
PJ
R