18DSB007 Epi&d - DJS RK

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Electronics, Interfacing & Programming for Design

(18DSB007)
June 2019
2 Hours
_____________________________________________
_____________________________________
Answer ALL Four questions
University approved calculators are permitted
Formula Sheet provided
ALL QUESTIONS are worth 25 Marks each
_____________________________________________
____________________________

18DSB007 EPI&D ||DJS RK Page 1


Q1

A non-inverting Schmitt trigger circuit is to be designed to have a lower


trigger voltage VLT of -1.1V and an upper trigger voltage VUT of 2.25V. The
circuit and the expected hysteresis curve for the circuit are shown in
figure 1 below. Assume Saturation voltage Vsat = 10V

Figure 1: Non-inverting Schmitt trigger circuit and its expected Hysteresis curve

(a) Derive an expression that relates voltage at the inverting terminal ‘E’,
values of resistors R1 and R2, input voltage Vin and output voltage Vout
(5)

18DSB007 EPI&D ||DJS RK Page 2


(b). Determine the voltage ‘E’ required (to be applied to the inverting
terminal) for the Schmitt trigger to produce the hysteresis curve. (12)

(c). Back substitute the value of ‘E’ derived from Q2a in equation from
Q1a to determine the values of resistors R1 and R2 (8)

18DSB007 EPI&D ||DJS RK Page 3


Q2

A system is to be designed, using a PIC1845K20 microcontroller, that can


monitor the number of people entering through a door in a museum. The
system is required to sound an alarm if 50 or more people have entered
the museum and trigger a locking mechanism to prevent any more
people from entering the museum. An amber LED is to be flash if more
than 40 but less than 50 people have entered the museum.

(a). Draw a simple block diagram of the system that identifies the inputs
and outputs of the system (4)

(b). Draw a schematic of the system showing how the various input and
output components interface with the microcontroller (6)

(c). Draw a flowchart that demonstrates the system functionality.


Flowchart should be written specific to PIC1845K20. (10)

(d). Write down the lines of code for a PIC18F45K20 in C language that
enables the PIC18F45K20 to monitor the number of people entering the
museum and closing the door when the number is 50 or more. (5)

18DSB007 EPI&D ||DJS RK Page 4


Q3

Fig Q3

a.) Explain how you would physically connect this sensor to an


18F45K20 in order to be able to capture and process its distance
sensing capability (to which pins?) (5 marks)
b.) If the sensor were in 3V operating mode, what 10-bit digital code
would you expect to be stored if the distance measured were
70cm (5 marks)
c.) How could this raw 10-bit number be processed to produce the
70 (cm) distance within the microcontroller? (10 Marks)
d.) List and Describe another analogue sensor and how it might be
incorporated into an 18F45k20 microcontroller system (including
cct diagram) (5 Marks)

18DSB007 EPI&D ||DJS RK Page 5


Q4

Fig Q4

It is intended to design and program an 18F45K20 microcontroller


combined with an alphanumeric LCD such that a series of different
“animations” appear on the LCD when any one of 3 switches are pressed.
Fig Q4 shows an example of such a character:

a) Construct and describe the embedded systems design process for


this system (up to and including initialising C code). (25 Marks)

Fig Q4 LCD Pin Out

18DSB007 EPI&D ||DJS RK Page 6


Fig Q4 18F45K20 Pin Out:

18DSB007 EPI&D ||DJS RK Page 7

You might also like