|
ECEN 3213 Spring 2001 Exam 1 |
SOLUTION
|
The questions in this exam refer to the 68HC11A8 single chip, unless otherwise noted in the question. Read the instructions carefully before completing the exam. All answers must be shown on these pages – no attached pages will be graded.

2b Bus name:__DATA____ has #bits = ___8___
- Input a Byte on PORT E
- Output the lower 4 bits of the Byte on PORT B
- Continue reading and outputting until the input is $AA.

Consider the following Flow chart for Questions 4.
4 (4pts) What does the program do, that is describe the problem it solves?
In general, this program is busy
waiting for the input to change, and outputs its status, continuing to run
until a terminating condition ($FF) is met.
Specifically, this program:
- Keeps the output on Port B zero
until the input on Port E changes.
- After a change on Port E, output
$0F on Port B, until the value $FF is read, then output the value $F0 and
stops.
5. (5 Pts) Draw a state Diagram that:
- has 4 states;
- has 1 binary input value;
- has 1 binary output value;
- stays in the initial state while the input is 0;
- returns to the initial state whenever the input is 0 twice in a row;
- outputs a 0, except when the input is 1 two or more times in a row.

The following True / False questions are worth 2 points each. Circle T for True or F for False for your answer.
True 6. There is an assembly code instruction for each machine code instruction.
False 7. There is a machine code instruction for each assembly level instruction.
False 8. Flowcharts and State diagrams are to be discarded as soon as the program is running correctly.
True 9. A byte of RAM holds exactly the same amount of information that a byte of ROM holds.
False 10. Extended addressing requires external memory for correct operation.
False 11. Indexed Addressing can use any of the 16 bit registers for the index.
False 12. Every Assembly instruction must have a label field.
False 13. No Assembly instruction requires a label filed.
True 14. An entire Assembly program could be written without using any label fields.
False 15. The latency to process any 8 bit value is always less than the latency to any 16 bit value.
16. (16 pts) fill in the missing values for the following table (0.5 pt each):
|
Decimal |
Hexadecimal |
Binary |
||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
$ 0 |
0 |
F |
F |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65534 |
$F |
F |
F |
E |
1 |
1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|
|
|
|
|
|
|
|
|
|
|
47103 |
$B |
7 |
F |
F |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
The following multiple-choice questions will be scored as
2 pts for each correct answer, -1 for an incorrect answer and 0 for unanswered questions.
17. For problem 3, what is the minimum latency to process a single byte? __c___
a. 2 cycles b. 4 cycles c. 6 cycles d. 8 cycles e. 10 cycles
18. For a state diagram such as the one in question 9, how many edges exit each state for a diagram with 1 binary input? __c___
a. 0 b. 1 c. 2 d. 3 e. 4 f. 8 g. None of these choices
19. How many edges exit each state for a state diagram with 2 binary inputs?__e__
a. 0 b. 1 c. 2 d. 3 e. 4 f. 8 g. None of these choices
20. What does PC stand for in the PC register? ___d___
a. Politically Correct
b. Personal Computer
c. Program Code
d. Program Counter
e. Progress Counter
f. None of these choices
21. The type of I/O we have studied and used the most in this class is:B
a Fixed Time b. Busy Waiting c. Interrupt d. DMA e. None of these
22. Also Characteristic of the type of I/O we have studied and used the most in this class: __D__
a. It is Memory Mapped.
b. It is Un-Buffered
c. It is Parallel
d. All three of a, b, and c
e. None of these
23. How many input pins does the 68HC11A8 have?_g______
a. 0 b. 1 c. 2 d. 3 e. 4 f. 8 g. None of these choices
24. What does it mean when the PC register has the value 65721? __f__
a. The next instruction to be fetched is in memory location 65721.
b. The value of the operand of the next instruction is 65721.
c. The current instruction being fetched is at memory location 65721.
d. The last instruction fetched was from memory location 65721.
e. It could be any of a, c, or d (but not b) depending upon what phase of the instruction is occurring(fetch, decode, execute, load/store).
f. This is a trick question because a 16 bit PC register cannot hold a value of 65721.
25. How much RAM does the 68HC11a8 have?__d___
a. less than 250 bytes
b. more than 1000 bytes
c. 4096 bytes
d. 2048 bits
e. None of the above.
26. What input value on PORT E causes the output on PORT B to be $0F?__e__
a. only $00 b. only $0F c. only $F0 d. only $FF e. any value except $FF
27. Under what conditions does the output on PORT B stay
$00? e
a. Register D overflows
b. Register B gets a value of $FF
c. Register A equals Register B
d. The value on input PORT E exceeds $FF
e. The value on input PORT E never changes
28 How many LEDs (Light Emitting Diodes) does the 68HC11A8 have?_a__
a. 0 b. 1 c. 2 d. 3 e. 4 f. 8 g. None of these choices
29. How many cycles does it take to fetch the operand of an instruction?_d__
30 The logical AND of $F2 with Reg A (containing $0A) is ?__c__
a. 0 b. 1 c. 2 d. 3 e. 4 f. 8 g. None of these choices
31. How many bytes of memory are required to store the contents of Registers A, B, D, and X?__e___
a. 0 b. 1 c. 2 d. 3 e. 4 f. 8 g. None of these choices
32. How does the 68HC11A8 determine whether a binary value is numerical data, ASCII character data, a memory address, or a machine code instruction?__e__
33. How much EEPROM does the 68HC11A8 have?__c_
33. How much ROM does the 68HC11A8 have?__d_
34. Register B contains $0B. A logical OR is performed with Register B and the value $01. What is the result in Register B?___g_
a. 0 b. 1 c. 2 d. 3 e. 4 f. 8 g. None of these choices
35. What does Memory Mapped I/O mean?___c___
36. How many cycles would it take (minimum) to output 3 bytes on PORT B?_d___
a. 2 cycles b. 3 cycles c. 4 cycles d. 6 cycles e. 8 cycles f.16 cycles