A24940 Any calculator
Calculators may be used in this examination but must not be used to store text. Calculators with the ability to store text should have their memories deleted prior to the start of the examination.
Special Requirements: None
School of Engineering
Department of Electronic, Electrical and Systems Engineering
Level M
04 21479
Small Embedded Systems January Examinations 2020 Time Allowed: 2 hours Answer any THREE questions
The allocation of marks within each question is stated in the right-hand margin.
Page 1 of 8 TURN OVER
1.
(a)
(b)
(c)
It is essential that embedded systems are highly dependable when they are used in safety critical environments.
Explain the meaning of the terms reliability, maintainability and availability. Explain how they relate to Safety Integrity Levels (SIL) for embedded system design. [4]
For each of the Safety Integrity Levels (0 to 4), provide an example of a real- world system that may include an embedded system. For each example, explain why the SIL is appropriate. [3]
A steer-by-wire system is to be designed using a distributed embedded system. Figure 1 shows a simple block diagram for the system, where each block represents a separate function to be performed by a microcontroller.
Figure 1
What is the overall availability of the system? [1]
The system should be designed to SIL 4 (availability > 99.99%). Draw a revised block diagram to show how the system could be redesigned to meet SIL 4. Verify that the new design meets SIL 4. [3]
Explain the key distinction between the analogRead() and analogWrite() functions in the Arduino IDE [2]
Explain the principles and purpose of pulse width modulation in embedded systems. Illustrate your answer with an appropriate diagram. [4]
Explain where and why an H-bridge might be used in an embedded system [3]
Any calculator
(i) (ii)
(d) (i) (ii) (iii)
Steering wheel sensor (A/D and CAN slave) A=99.999%
Controller (Processing and CAN master) A=99.7%
A24920 Page 2 of 8 TURN OVER
Left and right wheel actuators (D/A) A=99.999%
2.
(a)
(b)
A linear accelerometer outputs data using RS232 at a baud rate of 19,200 baud. Data from the transducer is to be acquired by an embedded system based on an ATmega 328 microcontroller with a clock frequency of FOSC = 8 MHz.
Draw a block diagram of the system, including all necessary components to interface the transducer device to the embedded system. Explain the key features and principles of operation of RS232. What are its strengths and weaknesses? [5]
Figure 2 shows the special function registers associated with baud rate generation:
(i)
(ii)
Figure 2
U2X0=0
what hexadecimal values should be stored in UBRR0H and UBRR0L to give
If the following setting is applied:
the required baud rate?
The actual baud rate that is set will be different from that required. Calculate
[3] the baud rate error. Comment on the significance of your answer. [3]
A24920 Page 3 of 8 TURN OVER
Any calculator
(c)
(i) (ii) (iii)
(iv)
A simple condition monitoring system based around the ATmega 328 microcontroller draws the following typical currents:
95 nA in sleep mode (90% of the time)
5.6 μA in idle mode (9% of the time)
22 mA in active mode (1% of the time)
Explain what is meant by sleep mode, idle mode and active mode [3]
What charge is required to operate the system for 1 hour? [2]
The ATmega 328 will be powered by a 3 V battery is used that is made up of
two AA cells, each with a capacity of 3 Ah. For how long will the microcontroller operate? Assume that the battery capacity does not degrade over this time. [2]
If the system is only required to operate for 1 year, what is the required capacity
of the battery? Assume that the battery capacity does not degrade over this time. [2]
A24920 Page 4 of 8 TURN OVER
Any calculator
3. (a)
(i) (ii) (iii) (iv)
(v) (b)
(c) (i) (ii)
(d)
Consider the following 8-bit addition carried out by an arithmetic logic unit (ALU). The registers are 8 bits wide:
Load 0x43 into R1
Load 0x4A into R2
Add R3 = R1+R2
What will be the 8-bit result in register R3 (in hex)? [1] What is the 8-bit value in registers R1, R2, R3 interpreted as unsigned decimal? [1] What is the 8-bit value in register R1, R2, R3 interpreted as signed decimal? [1] What will be the resulting value of the carry (C) status flag?
Explain the significance of your result. [2] What will be the resulting value of the overflow (V) status flag?
Explain the significance of your result. [2] What is the smallest number of bits required to represent the number of days
in a year? What is the smallest C datatype that can be used to store this value? [2] Explain the basic principles of SPI and I2C. [4]
Illustrate your answer with a diagram of each. [2] Explain they key similarities and differences between the two protocols [2]
An angular displacement transducer performs measurements in the range 0-90° and outputs a voltage in the range 0-5V. A 12 bit ADC is used to convert this voltage.
What is the resolution of the read value? What is the maximum error of the read values? Express your results both in volts and in degrees. [3]
A24920 Page 5 of 8 TURN OVER
Any calculator
4. (a) (b)
(c)
(d)
Any calculator Real time systems are classified as hard, firm or soft. Explain the distinction
between these three and give an example of each. [6]
Explain the basic principles of rate monotone scheduling. [3]
State the requirement for a set of n tasks to be guaranteed schedulable. If
a set of tasks fails to meet this criterion, does that mean it cannot be scheduled? [3]
Figure 3 shows a set of three tasks that are to be scheduled using a rate monotone scheduler.
Figure 3
Complete the table showing priority P and utilisation U for each process. [3]
Use your answer to deduce whether or not the set should be regarded as schedulable. [3]
Explain why the use of a cache memory hierarchy can be problematic in
real time embedded systems. [2]
Period T
Computation time C
Priority P
Utilisation U
A
50
11
B
40
9
C
30
7
(e)
(i) (ii)
A24920 Page 6 of 8 END OF PAPER
This page is intentionally blank
Page 7 of 8
A24940 LM Small Embedded Systems Any calculator
Do not complete the attendance slip, fill in the front of the answer book or turn over the question paper until you are told to do so
Important Reminders
Coats/outwear should be placed in the designated area.
Unauthorised materials (e.g. notes or Tippex) must be placed in
the designated area.
Check that you do not have any unauthorised materials with you (e.g. in your pockets, pencil case).
Mobile phones and smart watches must be switched off and placed in the designated area or under your desk. They must not be left on your person or in your pockets.
You are not permitted to use a mobile phone as a clock. If you have difficulty seeing a clock, please alert an Invigilator.
You are not permitted to have writing on your hand, arm or other body part.
Check that you do not have writing on your hand, arm or other body part – if you do, you must inform an Invigilator immediately
Alert an Invigilator immediately if you find any unauthorised item upon you during the examination.
Any students found with non-permitted items upon their person during the examination, or who fail to comply with Examination rules may be subject to Student Conduct procedures.
Page 8 of 8