You are on page 1of 9

GOVERNMENT ENGINEERING COLLEGE, RAJKOT

ELECTRONICS AND COMMUNICATION DEPARTMENT


Online Continuous Assessment Test (CO3)
Sub : Micoprocessor & Microcontroller (3141008)

1. Find a TCNT0 value needed to generate 125Hz of frequency on PB3. Use Timer0, Normal Mode,
Prescaler 256. XTAL=8MHz.
a) 80H
b) 85H
c) 83H
d) 88H
2. A LED is connected to PC4. Find the value of suitable prescaler required to generate a delay of 1
second for blinking that LED. Use Timer1, CTCl Mode, XTAL = 8MHz.
a) 8
b) 64
c) 256
d) 1024

3. For given Timer0 delay program, find after how many clock cycles TOV0 flag will set ?

a) 256
b) 13
c) 15
d) 242

4. Find the amount of Time delay generated by following Timer delay program. XTAL=8MHz.
a) 12.5 µs
b) 0.125 µs
c) 25.75 µs
d) 6.25 µs
5. Find the value of TCCR2 if we want to program Timer2 in Normal Mode with prescaler of 64 using
internal clock source
a) 02H
b) 04H
c) 01H
d) 03H
6. What is the output of following program for interrupt programming ?

a) Disable all the interrupt


b) Enable Timer0 overflow interrupt
c) Enable Timer 2 Compare match interrupt
d) Disable Timer0 overflow interrupt
7. In AVR what is the ISR address for an external hardware interrupt2?
a) 0002h
b) 0004h
c) 0006h
d) 0000h
8. Choose an appropriate from following to enableINT0 falling edge triggered
interrupt. LDI R20,____?
OUT MCUCR,R20
a) 0AH
b)01H
c)02H
d)80H
9. What is output of following set of instructions?

a) Clears the INT1 flag


b) Sets the INT1 flag

10. Which register is responsible for handling all the external hardware interrupts?
a) TIMSK
b) GICR
c) MCUCR
d) IVCE

11. With fosc=8 MHz, what will the count that has to filled in the UBRR register to
account for the 9600 baud rate?
a) 67H
b) CEH
c) 33H
d) 34H

12. What is the value of UCSRB & UCSRC registers to configure USART for
asynchronous mode, 8 data bit, no parity and 1 stop bit.
a) 04H & 18H
b) 14H & 08H
c) 18H & 04H
d) 08H & 14H

13. Which bit of the UCSRA is used for doubling the baud rate of the
transmission?
a) DOR
b) PE
c) U2X
d) MPCM

14. What is the main function of the LPM instruction used in LCD?
a) for initializing the LCD in the read mode
b) for initializing the LCD in the write mode
c) for sending a long string of characters to the LCD
d) all of the mentioned

15.To latch in information at the data pins of the LCD, we send


a) H-L pulse at the E pin
b) L-H pulse at the E pin
c) A constant H pulse at the E pin
d) A constant L pulse at the E pin
16. What is the address of the second column and the second row of the 2*20
LCD?
a) 0x80
b) 0x81
c) 0xc0
d) 0xc1

17. Which of the following commands takes more than 100 microseconds to run?
a) shift cursor left
b) shift cursor right
c) set address location of the DDRAM
d) clear screen

18. In 4X4 keyboard interfacing , to detect key press which of the following is
grounded ?

a) all rows

b) one row at a time

c) both a) & b)

19. For 8 bit ADC Vref= 2.56V. Calculate digital output D7-D0 if analog input is
2.1V.

a) 10101010

b) 11010010

c) 01010101

d) 01110110

20. AVR is connected to 1MHz crystal. Calculate ADC clock frequency for
ADPS2:0 = 001 of ADCSRA register.
a) 2MHz
b) 0.5MHz
c) 8MHz
d) 4MHz
21. LM35 provides _______ V for each degree count?
a) 1
b) 0.1
c) 0.001
d) 10

22. Calculate the output voltage of 8 bit DAC converter if digital input is
10000000. Given R=5KΩ, Iref=5mA.
a) 1v
b) 1.5v
c) 5v
d) 2.5v

23. Which of the following is a type of an electromagnetic relay?


a) SPST
b) SPDT
c) DPDT
d) All of the mentioned

24. Why are opto isolators normally used between the microcontrollers and the
ULN2803?
a) to optimize the current
b) to reduce the back emf
c) to increase the current
d) to increase the voltage

25. Why are ULN2803 normally used between the microcontrollers and the
relays?
a) for switching purposes
b) for increasing the current capability required by a relay
c) for increasing the voltage capability required by a relay
d) all of the mentioned

26. What is the meaning of a step angle?


a) angle which a stepper motor has
b) angle between the two windings of the stator in a stepper motor
c) minimum degree of rotation associated with a step angle
d) angle between the stator and the rotor

27. For a normal 4 step sequence, what are the number of teeth required to
accomplish a 2 degree step angle?
a) 180
b) 90
c) 360
d) 45

28. What are normal 4 step sequence of a stepper motor if we start to move in
clockwise direction with 0110 value?
a) 1100,1001,0011,0110
b) 0011,1001,1100,0110
c) 1001,1100,0110,0011
d) 0101,1010,0101,1010

29. if a stepper motor takes 90 steps to complete one revolution, what is the step
angle for this motor?
a) 2°
b) 4°
c) 3°
d) 6°

30. For SPI Port if CPHA= 0 and CPOL=1, then which of the following is true?
a) read on rising edge, changed on a falling edge
b) read on falling edge, changed on a rising edge
c) write on rising edge, changed on a falling edge
d) write on rising edge, changed on a falling edge

31. How do we set the SPI, to operate in the master mode 1?


a) We set the MSTR bit, and make the CPOL= 1 and CPHA=0
b) We set the MSTR bit, and make the CPOL= 0 and CPHA=1
c) We reset the MSTR bit, and make the CPOL= 1 and CPHA=0
d) We reset the MSTR bit, and make the CPOL= 0 and CPHA=1
32. Which frequency is not recommended for SPI clock?
a) fosc/4
b) fosc/64
c) fosc/16
d) fosc/2

33. To select the value of the clock to be fosc/16, what are the appropriate
values?
a) SPI2X= 0, SPR1= 0, SPR0=1
b) SPI2X= 0, SPR1= 1, SPR0=0
c) SPI2X= 1, SPR1= 1, SPR0=0
d) SPI2X= 0, SPR1= 1, SPR0=1

34. For given Assembly code determine the operating mode & Operating Clock
of SPI port.

LDI R16, (1<<MOSI)| (1<<SCK) | (1<<SS)


OUT DDRB, R16
LDI R17, (1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<6)
OUT SPCR, R17
a) Mode0, Fosc/ 4
b) Mode1, Fosc/16
c) Mode2, Fosc/64
d) Mode3, Fosc/128

35. Which of the following is correct for I2C port interfacing?


a) I2C is a technique by which data is transmitted with the help of only eight pins
b) SDA is used to synchronize data transfer between two chips
c) TWI is another name for I2C
d) All of the mentioned

36. Which of the following is true about the I2C protocols?


a) the data line cannot change when the clock line is high
b) the data line can change when the clock line is high
c) the clock line cannot change when the data line is high
d) the clock line can change when the data line is high
37. For receiving the acknowledgment in I2C port interfacing………
a) SDA from the transmitter should be high
b) SDA from the transmitter should be low
c) SDA from receiver should be high
d) SDA from receiver should be low

38. Which bit is polled to know that whether the TWI is ready or not?
a) TWWC
b) TWINT
c) TWEA
d) All of the mentioned

39. The STOP condition in I2C Port Interfacing is generated by a


a) high to low change in the SDA line when the SCL is low
b) high to low change in the SDA line when the SCL is high
c) low to high change in the SDA line when the SCL is low
d) low to high change in the SDA line when the SCL is high

40. For I2C Port interfacing observing following waveform identify the slave
address sent from Master.

a) 1001101

b) 0010110

c) 1011001

d) 0011010

41. Calculate the Serial clock frequency(SCL) of I2C port, given TWPS bit in
TWSR is 01and value of TWBR is 80H.

a) 10.30kHz
b) 25.15kHz
c) 7.69kHz
d) 8kHz

42.

You might also like