Documente Academic
Documente Profesional
Documente Cultură
Final Exam
EE324:
Microcontrollers and Interfacing
Roll No. ________________
TIME Allowed: 90 Minutes for Part 2.
Calculator Allowed
NOTES:
1. For True False Question On last Page, you have will 30 minutes to complete once the exam starts.
2. PIC means PIC 16 or PIC 18 that you used in the lab.
3. In a byte, bit numbers are 0 (LSB) to 7 (MSB)
4. Assume Delay_ms(n) function is available through out the paper.
Page 1 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
Page 2 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
Q. 2 (Waveform generator) [15] You have to repeatedly generate an output waveform shown in figure below. Only
the first cycle of the waveform is shown in the figure but this cycle is repeated again on the right continuously. You are to
design an embedded system using a PIC microcontroller and 8-bit DAC. The DAC has an output range of 0-volts to 6.5
volts for 8-bit digital input to DAC. Write C code for PIC microcontroller to generate this waveform. Use timer interrupts
to generate highly accurate output. No software delays (i.e., delay_ms etc.).
PIC µC
Port C
DAC
Page 3 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
Page 4 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
Blank page for question 3.
Page 5 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
Page 6 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
Page 7 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
Final Exam
EE324:
Microcontrollers and Interfacing
Calculator Allowed
Page 8 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
True/False. (20 Marks) Note: PIC means PIC 16 or PIC 18. Please circle your answers with PEN.
1. Stepper motors can rotate in both directions but DC motors cannot. T / F
5. Using LCD in 4-bit mode is more efficient than in 8-bit mode in terms of time. T / F
7. Phase Lock Loop is used in serial communication protocols for error detection T / F
8. The two cold junctions of a thermocouple must be kept at the same temperature. T / F
9. A uP with 20-bit address bus will require 5-input AND gate to interface 32K byte memory. T / F
10. An 8-bit succ. Approximation ADC requires 256 clock cycles for one conversion. T / F
11. A thermo couple has two cold junctions and one hot junction. T / F
12. A transducers output has highest frequency component of 10 KHz. It can be correctly sampled with a sampling rate of
30 KHz. T / F
13. SAR type ADC may generate internal digital guess values using a simple counter. T / F
14. In a Wheatstone bridge configuration employing strain gage, dummy gage is used for temperature compensation.
T / F
15. An optocoupler, a transformer or a capacitor can be used to electrically isolate two circuits. T / F
16. A sample and hold circuit is required in ADCs to buffer the analog input. T / F
18. DMA has separate Data Bus and Address Bus to connect to Memory and I/O devices. T / F
20. DMA is used to transfer data between I/O device and µP. T / F
Page 9 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
21. Short Questions (5 marks each. Do any Four. We may check only the first 4 attempted).
P1. Describe the operation of flash type A/D converter. What are its main advantages and dis-advantages?
P2. A 10-bit ADC has an input voltage range of -3 volt to +7 volts. What is the input voltage if output is 1100110000 2.
Page 10 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
P3. Show with a block diagram the operation of a DMA transfer in a system with different components, buses and signals.
Page 11 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
P4. A terminal is transmitting simple asynchronous serial data at a baud rate of 9600 with a MODEM having 16-point
constellation diagram. How much time is required to transmit 12,000,000 bytes? Assuming 8 data bits, one parity bit, 2
stop bits and 1 start bit.
P5. List the basic components of a UART transmitter and briefly explain their functions.
Page 12 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________
P6. List any 5 transducers that measure different parameters. Also mention one or two of their parameters or features.
Page 13 of 13