CMPE 401 - Computer Interfacing
Assignment #1
Due: In the CMPE 401 assignment box at 15:45 on
Friday, Oct. 7, 2005
-
In section 1 of the lecture slides we saw that it is possible to
use Manchester encoding to encode a clock in the same signal as
the data.
This method allows us to send a unidirectional synchronous signal
over a single wire.
Essentially, a logic "0" is encoded as a high signal followed by
a low signal, while a logic "1" is encoded as a low signal
followed by a high signal.
In this way, every bit signal contains one transition, and
these transitions can be exploited at the receiver to allow it to
"lock into" and thus recover the transmitter clock.
The clock recovery process can be accelerated at the start of transition
by sending a training sequence containing strictly alternating 0s and 1s.
Why would this be a good sequence to use for this purpose?
What would be the disadvantage of sending a string of 0s or a string
of 1s?
In practice, how could one lock into the correct timing, and thus
be able to recover the encoded bits, if the encoded data contains
a reasonably random sequence of 0s and 1s?
-
Consult the on-line documentation for the CPU32 (follow the links
on the course homepage) and determine how the LPSTOP instruction works.
How could this instruction be used to implement a microcomputer system that
exists in sleep mode most of the time, conserving power while it is
waiting for work to do?
-
In your own words, briefly explain the difference between time-sliced
multitasking, pre-emptive multitasking, and cooperative multitasking.
MicroC/OS-II is a real-time kernel that provides a pre-emptive
multitasking environment.
How could one implement cooperative multitasking in MicroC/OS-II?
How could one implement time-sliced multitasking in MicroC/OS-II?
You do not have to provide detailed code in your brief explanations.
-
In your own words briefly explain the difference between a kernel
and an operating system.
When can one properly call a kernel a "real-time" kernel?
-
A typical human reaction time is about 150 milliseconds.
The CPU32 inside the MC68332 microcontroller requires 4 clock
cycles to execute the BF instruction (Branch conditional with false
condition).
Assuming that the clock frequency is 16.78 MHz, what is the
number of BF instructions that will be executed within one human
reaction time?
If one could print out the same number of BF instructions on a single
roll of paper, at a line spacing of 4 mm per line of text, for how
much distance would the printed text continue along the paper?
-
MicroC/OS-II is a relatively portable real-time kernel in large part
because it is written in ANSI C, which is one of the most widely
supported programming languages today.
In what ways does the software architecture, and not just the
implementation language, of MicroC/OS-II promote
portability across different microprocessors?
-
Which of the 14 addressing modes in the 68000 architecture cannot be
used to specify destination operands?
For each of these unavailable addressing modes, briefly explain
why this restriction is either required or is probably a good idea.