Sunday, April 24, 2011

Microcontroller Viva Questions for 4th Semester

MICROCONTROLLER VIVA QUESTIONS SET-1





Q1. What is difference between microcontroller and microproccessor?

Ans:

Microproccessor Microcontroller
Memory, ports, timers, interrupts and controllers are external to the chip. Memory, ports, interrupts and controllers are internal to the chip.
Based on Von-Neumann architecture. Based on Harvard architecture.
Have many instructions for data transfer b/w the microprocessor and external memory. Have limited instructions for data transfer b/w the microcontroller and external memory.
The instruction sets contains limited number of instructions for bit operation. It performs large number of bit level operation.




ANSWER

Q2. What are flags and Program status word (PSW)?

Ans: Flags are 1-bit registers provided to store the result of certain program instructions.
PSW: The PSW contains the math flags, user program flag F0, and the register select bits that identify which of the four general purpose register banks is currently in use by the program.
CY AC F0RS1RS0OV--P




ANSWER

Q3. What is stack?

Ans: The stack refers to an area of internal RAM that is used in conjugation with certain opcodes to store and retrieve data quickly.



ANSWER

Q4. What is counter and timer?

Ans; Counter is the process of counting the pulses generated by any system.



ANSWER

Q5. Explain the TCON special function register?

Ans: TCON special function register
TF1 TR1 TF0TR0IE1IT1IE0IT0
Explain the above table based on your microcontroller knowledge of flags1 and 0’s and others.



ANSWER

Q6. Explain TMOD special function register.

Ans: TMOD special function register
Gate C/Tbar M1M0GateC/TbarM1M0





ANSWER

Q7. Draw the special function register for SCON and PCON.

Ans: SCON
SM0 SM1 SM2RENTB8RB8TIRI
PCON:
SM0D -- ----GF1GF0PDIDL





ANSWER

Q8. What do you mean by timer flag interrupt?

Ans: When a timer/counter overflows, the corresponding timer flag, TF0 or TF1, is set to 1. The flag is cleared to 0 when the resulting interrupt generates a program call to the appropriate timer subroutine in memory.



ANSWER

Q9. Draw and explain the Interrupt enable (IE) and Interrupt Priority (IP) special function register.

Ans: IE special function register:
EA -- ET2ESET1EX1ET0EX0
IP special function registers:
-- -- PT2PSPT1PX1PT0PX0
- not implemented
PT2: Reserved for future use.
PS: Priority of serial port interrupt.
PT1: Priority of timer of 1 overflow interrupt. Set cleared by program.
PX1: Priority of external int 1.
PT0: Priority of timer 0 overflow interrupt.
PX0: Priority of external int 0.





ANSWER

Q10. What are different addressing modes in microcontroller? Give one example for each.

Ans: 1. Immediate addressing mode. (ADD A, #77)
2. Register addressing mode. (ADD A, R0)
3. Direct addressing mode. (MOV A, 088H)
4. Indirect addressing mode. (MOV A,@R0)





ANSWER

Q11. What are different instruction sets?

Ans: 1. Data transfer instruction.
2. Arithmetic instruction.
3. Logical Instruction.
4. Boolean variable manipulation instruction.
5. Program branching instructions.



ANSWER

Q12. For the given set of instruction name the operation and addressing modes.
i) MOV A,#n
ii) MOV A, addr
iii) MOVX A,@DPTR
iv) MOVC A,@A+DPTR
v) XCH A,Rn


Ans: i) Opeartion: Copy the immediate 8 bit data into the accumulator.
Addressing mode: Immediate add mode.
It is a 2 byte instruction.
ii) Opeartion: Copy the contents of the internal RAM address (addr) into the accumulator.
Addressing mode: Direct addressing mode.
It is a 2 byte instruction.
iii) Opeartion: Copy the contents of the external RAM address stored in DPTR into the accumulator.
Addressing mode: Indirect addressing mode.
It is a 1 byte instruction.
iv) Operation: Copy the code byte, found at the ROM address formed by adding A and the DPTR, into the accumulator.
It is a 1 byte instruction.
v) Operation: Exchange data bytes between the accumulator and the register Rn.
Addressing: Register Addressing mode.
It is a 1 byte instruction.



ANSWER

Q13. What are the various jump instructions in microcontroller?

Ans: It is of two types- conditional jump and unconditional jump. Conditional jump is of two types byte level instruction an bit level instruction. Similarly unconditional jump is also divided into 3 sub-jump and these are- Short jump, Absolute jump, Long jump.



ANSWER

Q14. What do you mean by subroutine?

Ans: A subroutine is a program that may be used many times in the execution of a larger program.



ANSWER

Note: For more questions on Microcontroller go through your books. And analyze your lab programs well cause maximum questions will be asked from there only.

6 comments:

  1. nice.... but these questions are never asked... atmost 1 may come in viva..... :(

    some questions about architecture are also required....

    ReplyDelete
  2. u plz put up here if u can v knw our 2 do our job if u dnt put

    ReplyDelete
  3. Whatever you've given is helpful. Keep up the good work. :)

    ReplyDelete
  4. Whatever you've given is helpful. Keep up the good work. :)

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...

Search On Flipkart

Facebook Connect