Vous êtes sur la page 1sur 6

ALPHA, BETA, GAMMA UNIVERSITY

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

END TERM ASSESSMENT

ANSWER KEY

Year: IV Max.Marks:50

PART A

ANSWER ALL THE QUESTIONS


(5*2=10)

Q1. Combination of Software & Hardware Used to Design to perform a


particular task (Real Time).
(2marks)

Q2. Microcontroller Microprocessor (2 marks)

Special purpose General purpose


processor. Processor.
Dos Specific Task . Dos Multi task.

Software protected. Not Software protected.

Occupies less space. Occupies more space.

Less power More power


consumption. consumption.

Q3. An interrupt handler, also known as an interrupt service routine (ISR),


is a callback subroutine in an operating system or device driver whose
execution is triggered by the reception of an interrupt.
(2 marks)

Q4. The output of the sensor can be measured using Analog to Digital
converter which converts voltage into required binary output.
(2 marks)

Q5. 4- bit adders


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity binary_4_bit_adder_top is
Port ( NUM1 : in STD_LOGIC_VECTOR (4 downto 0) := "00000";
NUM2 : in STD_LOGIC_VECTOR (4 downto 0) := "00000";
SUM : out STD_LOGIC_VECTOR (4 downto 0));
end binary_4_bit_adder_top;

architecture Behavioral of binary_4_bit_adder_top is


begin

SUM <= NUM1 + NUM2;

end Behavioral; (2
When an interrupt
marks) occurs, the following sequence is followed.

a. Execution of main program is suspended by hardware


The current instruction is finished
PART B
Registers are moved to the stack.
Q6. An address
Vector interrupt is a signaland
is retrieved from a device
placed attached to a computer or from
in PC.
a program
b. Interrupt within the computer
Service Routine(ISR) is executedthat causes the main program that
and ISR
operates the computer
Clears the flag. (the operating system ) to stop and figure out
what to do next. (2 marks)
Performs the necessary operations.
Communicates with each other.
c. Main program is resumed(EXC_RETURN)
Hardware pulls the registers from stack including PC.
Program continues where it was interrupted. (4 marks)
(4 marks)

Q7. A microcontroller (or MCU, short for microcontroller unit) is a


small computer (SoC) on a single integrated circuit containing a processor
core, memory, and programmable input/output peripherals.
(2 mark)

Explanations about

a. Central Processor Unit(CPU


b. Interrupts
c. Memory
'ROM'(Read Only Memory).
'RAM'(Random Access Memory)
d. Bus
e. Address Bus
f. Data Bus
g. Oscillator:
h. Input/Output Port:
i. Timers/Counters (4
marks)
Block Diagram (4
marks)

Q8. Any correct block diagram with good explanation


Explanation (5 marks)

Block Diagram (5
marks)

Example

Q9. A Task is an activity that needs to be accomplished within a defined


period of time or by a deadline
(2 marks)

Round-robin algorithm is a pre-emptive algorithm as the scheduler forces the


process out of the CPU once the time quota expires.
(2 marks)

(6 marks)

Q 10. An Analog to Digital Converter (ADC) is a very useful feature that


converts an analog voltage on a pin to a digital number. By converting
from the analog world to the digital world, we can begin to use electronics
to interface to the analog world around us.
(2 marks)
Diagram with Explanation (8
marks)

Q 11. Stepper Motor Controller

This program drives a unipolar or bipolar stepper motor. The motor is


attached to digital pins 8 and 9 of the Arduino. The motor moves 100 steps
in one direction, then 100 in the other.

// define the pins that the motor is attached to. You can use

// any digital I/O pins.

#include <Stepper.h>

#define motorSteps 200 // change this depending on the number of steps

// per revolution of your motor

#define motorPin1 8

#define motorPin2 9

#define ledPin 13

// initialize of the Stepper library:

Stepper myStepper(motorSteps, motorPin1,motorPin2);


void setup() {

// set the motor speed at 60 RPMS:

myStepper.setSpeed(60);

// Initialize the Serial port:

Serial.begin(9600);

// set up the LED pin:

pinMode(ledPin, OUTPUT);

// blink the LED:

blink(3);

} (10
marks)