Você está na página 1de 5

00105

=~==

1II1r

"'Ill~~

Sri Lanka Institute of Information Technology

B. Sc. Engineering Honours Degree

Final Examination
Year 2, Semester II (20 14)
..

EC213 - Microcomputers
Duration: 2 Hours
September 2014
Instructions to Candidates:

+ This paper has 4 questions. Answer All Questions.


+ All questions carry equal marks (25 marks).
+ Total Marks 100.
+ This paper contains 5 pages with Cover Page.
+ Calculators are ALLOWED.
+ Excerpts of the datasheet are attached at the end of the paper.

03/09/2014

--~----

00105
1.

QUESTION 1

[TOTAL: 25 MARKS)

a. Draw the typical memory hierarchy of a computer system. Show how the
following parameters vary along the hierarchy.
i. Speed
ii. Capacity
iii. Cost per unit memory

b. What is known as Datapath in a computer?

[ 7 Marks)

[ 2 Marks]

c. What is a non-volatile memory? Give one example use of non-volatile


memory in computers.

[ 3 Marks]

d. Write three differences between a general purpose computer and a special


purpose computer.

[ 3 Marks]

e. What is the capacity of the memory chip in which configuration is 2048 x 32?
[ 3 Marks]

f.

What is the width of the data bus required for the memory chip mentioned in
part 'd'?

[ 2 Marks]

g. What is width of the address bus required to access the memory chip
mentioned in part 'd'?

[ 2 Marks]

h. Explain the difference between a Von-Neumann computer and a Harvard


Computer.

[ 3 Marks]

Page 1 of 4

03/09/2014

00105
2. QUESTION 2

[TOTAL: 25 MARKS]

a. What is the difference between polling and interrupts?

[ 2 Marks]

b. What is meant by an interrupt vector?

[ 2 Marks]

c. Explain how an interrupt can be promoted in HCS12.

[ 4 Marks]

d. Explain the role of each bit of Condition Code Register of HCS12 given
below.
i. I bit

[ 2 Marks]

ii. X bit

[ 2 Marks]

e. "Interrupt service routines usually do not return values. They do not take
arguments either." Do you accept this statement? Justify.

f.

[ 4 Marks]

Give an examPle for an application of a non-maskable interrupt in an


embedded system.

[ 3 Marks]

g. Show how you write an interrupt service routing to complement PORT U


when real time interrupt trigger in HCS12.

3. QUESTION 3

[ 6 Marks]

[TOTAL: 25 MARKS]

a. Explain why digital signals can be handier for data transmission than analog
signals.

[ 4 Marks]

b. Give an example to a scenario where a microcontroller has to process an


analog signal.

[ 3 Marks]

c. What is quantization error in analog to digital conversion? Explain briefly.


[ 3 Marks]

Page 2 of 4

03/09/2014

00105
d. An ECG signal is to be sampled by an ADC with VRH = 5V and VRL = 0 for
some requirement. Using a clearly labeled block diagram illustrate how you
connect the ECG signal to the analog input pin.

[ 4 Marks]

e. Sketch one cycle each of the PWM signals described below.


i. Left aligned, positive polarity, 30% duty cycle, 100Hz
ii. Center aligned, negative polarity, 30% duty cycle, 100Hz

f.

[ 2 Marks]
[ 2 Marks]

A PWM signal with a frequency of 1OOHz is to be generated from 4th channel


in HCS12 PWM subsystem. Signal should be left aligned with positive
polarity and duty cycle is 60%. Assume the Bus Clock is 4MHz. It is decided
to use a channel clock signal of 10 kHz for this requirement.
i. What is the smallest time measurement possible for this channel
according to above specifications?

[ 1 Mark]

ii. What is the value you should write to period register?

[ 2 Marks]

iii. What is the value you should write to duty register?

[ 2 Marks]

iv. If the polarity is changed to negative what is the value to be written to


duty register for the same duty cycle of 60%?

4.

QUESTION 4

[ 2 Marks]

[TOTAL: 25 MARKS)

a. What is a microcontroller?

[ 2 Marks]

b. State three subsystems you may find in a microcontroller.

[ 3 Marks]

c. Show how you configure PORT T ofHCS12 to output direction.

[ 2 Marks]

d. Condition code register ofHCS12 has a bit for arithmetic overflow. What does
it represent? Explain using a suitable example.

[ 4 Marks]

e. Write one example each for the addressing modes mentioned below using
HCS12 assembly instructions.

[ 5 Marks]

i. Immediate
ii. Direct
Page 3 of 4

03/09/2014

00105
m. Extended
iv. Inerrant
v. Relative

f.

What is the content of accumulator D if following assembly program is


executed in an HCS12 microcontroller?

[ 5 Marks]

LDAA#$AA
EORA#$55
LDAB#$BB
EORB#$AA
g. Suppose Arithmetic Shift Right and Logical Shift Right operations are applied
to decimal value 100 independently. What are the results that can be expected
for each operation?

[ 4 Marks]

***End of Question Paper***

Page 4 of 4

03/09/2014

Você também pode gostar