Professional Documents
Culture Documents
Review Questions
Revised 2014-05-15
1.
2.
3.
4.
5.
For any microprocessor other than the 68HC12 describe the basic
processor configuration and give one example of a facility which
distinguishes this processor from its competition.
6.
7.
(i)
Describe the Finite State Machine approach to software
structuring.
(ii)
A system represented by the following state table is to be
implemented by software within an embedded system.
Using your preferred high level language show a corresponding
software implementation.
If appropriate use variables: Input, Output and State.
00
Coding
Inpu
t
State
00
01
11
10
s1
s2
s3
s4
s1
s3
s1
s3
01
s2
s2
s2
s1
11
s2
s3
s2
10
00
01
11
10
s3
s3
s4
s4
Outpu
t
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8.
9.
A variable should be declared volatile whenever its value could change unexpectedly. In
practice, only three types of variables could change:
1. Memory-mapped peripheral registers 2. Global variables modified by an interrupt
service routine 3. Global variables accessed by multiple tasks within a multi-threaded
application
2.
Static variables are given space in memory at some fixed location within the
program. They exist when the program starts to execute and continue to
exist throughout the program's entire lifetime. The value of a static variable
is faithfully maintained until we change it deliberately (or remove power
from the memory).
10.
The CLIC2.h file is used in the lab. Determine how to express the
addresses of the peripheral subsystems in C. NOTE: IAR provides a
simple interface device address definition.
11.
12.
13.
Second Set:
1. Describe the Analogue to Digital Converter on a microcontroller which
you have used and what advantages there are to averaging results in
multiple result registers when only one input is being monitored.
Why is the default result alignment for 10 bit conversions in the
68HC12 left justified in a 16bit unsigned integer?
2. The use of lookup tables for standard functions like square root is
generally based on normalised values. Why? In particular discuss the
differences between the possible values of an 8bit integer square root
and an 8bit normalised lookup table for square roots.
2.
3.
4.
5.
6.
7.
8.
9.
#define
Keypad