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

Ministry of Higher Education ‫وزارة التعليم العالي‬

Higher Institute of Engineering and ‫المعهد العالي للهندسة والتكنولوجيا‬


Technology, Kafrelsheikh ‫بكفر الشيخ‬

Final Examination of Academic Year 2020 / 2021


Department: Electronics engineering Year: 4th Year (Computer Total Marks: 70
and electrical communication Engineering and Control) Examiner: Dr.Refaat Mohamed Fikry
Course Title: Computer Engineering (2) Corse Code: EEC 4007 Term: second term
Date: 5-6-2021 4 papers Allowed Time: 3 Hours

1) Answer briefly on the following questions (25 Points):


1. What are the advantages and disadvantages of embedded system?
2. What is the advantage of the interrupt in microcontroller programming?
3. Explain difference between signal and variable in VHDL.
4. Explain FPGA internal Architecture.
5. Distinguish between FPGA and Microcontroller.
2) Answer on the following questions (20 Points):
1. Write a C program, utilizing timer interrupt and external interrupt of the
ATMega328P, that when download to it in the figure below will display
continuously the sequence 0, 2, 4, 6, 8 on seven-segment display (which connected
from PC0 to PC6) after 2 sec between each displayed number.
And when the push-button switch (which is connected to PD2) is pressed on falling
edge "any time", the counter is resettled to Zero and displayed on seven-segment the
number 0 . After that it continue to repeat to display the sequence again .
2. Write a VHDL code for 8 to 3 encoder
3. Develop VHDL Code for following logic.

A B C X
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1

3) Choose between the multiple choices for the following (20 points):
1- Which of the following is a computer language used to model digital circuits
and produce programming data for PLDs?
A) VHSIC. B) VHDL.
C) ASIC. D) C Language.
2- The block of code which defines the relationship between input, output and
internal signals or variables in a VHDL design is the ____.
A) Architecture. B) Entity.
C) Package. D) Library.
3- What is the symbol used for signal assignment in VHDL?
A) == . B) =
C) := D) <=
4- The complex programmable logic device contains several PLD blocks and
__________
A) A language compiler. B) AND/OR arrays.
C) Global interconnection matrix. D) Field-programmable switches.
5- Which among the following is pre-defined in the standard package as one-
dimensional array type comprising each element of BIT type?
A) Bit type. B) Bit_vector type.
C) Boolean type. D) All of the above.
6- What kind of statement is IF statement?
A) Concurrent. B) Sequential.
C) Assignment. D) Selected assignment.
7- It is possible to use nested IF in VHDL.
A) True. B) False.

- 2/4 –
8- WAIT statement can’t appear under _______ directly.
A) Architecture. B) Process.
C) Package. D) Entity.
9- Which of the following is not the correct WAIT statement?
A) WAIT ON. B) WAIT WHILE.
C) WAIT FOR. D) WAIT UNTIL.
10- What is the file extension that is loaded in FPGA for describing any
component?
A) .vhd. B) .obj.
C) .c. D) .bit.
11- Which VHDL data type can only have a value of '1' or '0' or 'X' or 'U'?
A) Signal. B) Std_logic.
C) Bit. D) Integer.
12- If Timer1 interrupt is assigned to interrupt every 6 ms, and TCCR1B register
is set to 0x02 for Atmega328P, the number of overflow counts is:
A) 47. B) 375.
C) 12000. D) 0.
E) none of the mentioned.
13- Which of the following is a single bit in AVR?
A) TOIE0. B) WGM02.
C) OCIE1A. D) All of the mentioned.
14- If Timer0 is operated in normal mode as Clear Timer on Compare Match,
TCCR0A will be:
A) 0x01. B) 0x02.
C) 0x03. D) None of the mentioned.
15- If we used external interrupt, we can count the pulses on the positive or the
negative edge triggered pulse of the clock?
A) True. B) False.
C) Can’t be determined. D) Depends on the circumstances.
16- What is the file extension that is loaded in a micro controller for executing
any instruction?
A) .doc. B) .c.
C) .txt. D) .hex.
17- What is the use of the prescalar in the operation of the timer?
A) For fast calculations.
B) For increasing the time delay given by the timer by decreasing its frequency of
operation.
C) For removing the concept the reloading of count.
D) For easy counter operations.

- 3/4 –
18- The Timer/Counter can be clocked by an_______
A) Internal clock. B) External clock.
C) Internal and External clock. D) None of above.
19- Atmega 328P has a channel _______________ bit ADC.
A) 2. B) 5.
C) 10. D) 15.
20- What is the address in the interrupt service routine assigned for the timer2
overflow flag?
A) 0012h. B) 000Ah.
C) 0016h. D) all of the mentioned

GOOD LUCK

- 4/4 –

You might also like