Você está na página 1de 13

EE324: Microcontrollers and Interfacing December 20, 2016

Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________

Final Exam

EE324:
Microcontrollers and Interfacing
Roll No. ________________
TIME Allowed: 90 Minutes for Part 2.

Closed Book / Closed Notes

Calculator Allowed

Maximum Marks = 100

Use PENS only.

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.

Q1 Q2 Q3 Q4 T/F ShortQs Total

Page 1 of 13
EE324: Microcontrollers and Interfacing December 20, 2016
Final Exam Instructor: M Jahangir Ikram/ Farasat Munir ROLL No__________________

Q.1 [Timers] 15 marks


In this problem you have to operate a LED connected to any port with the following timings using timer
0. You have 8Mhz Crystal. You cannot use Delay_ms function. You can only use 8-bit mode of timer
0.

1) LED ON for 100 microseconds


2) LED OFF for 20 milliseconds

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__________________

Q.3 Motor Control


(A) Speed measurement using interrupt
(B) Controlling Speed using PWM.

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__________________

Q4. [10] [ADC]

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

Roll No. ________________


TIME Allowed: 60 Minutes for this component.

Closed Book / Closed Notes

Calculator Allowed

Use PENS only.

T/F ShortQs Total

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

2. EEPROM is a type of non-volatile memory. T / F

3. In PWM, Percent duty cannot be greater than 100. T / F

4. Independent clock signal is required to be transmitted for UART communication. T / F

5. Using LCD in 4-bit mode is more efficient than in 8-bit mode in terms of time. T / F

6. Flash ADC conversion time is dependent on the input level. 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

17. AN LDR is not a self-generating transducer. T / F

18. DMA has separate Data Bus and Address Bus to connect to Memory and I/O devices. T / F

19. In a MODEM based system, a computer is called a Data Terminal Equipment. 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

Você também pode gostar