MICROCONTROLLER VIVA QUESTIONS SET-1
Q1. What is difference between microcontroller and microproccessor?
Ans:
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.
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
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
ANSWER
Q7. Draw the special function register for SCON and PCON.
Ans: SCON
PCON:
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:
IP special function registers:
- 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.
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
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 | F0 | RS1 | RS0 | OV | -- | P |
ANSWER
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
Ans; Counter is the process of counting the pulses generated by any system.
ANSWER
Ans: TCON special function register
TF1 | TR1 | TF0 | TR0 | IE1 | IT1 | IE0 | IT0 |
ANSWER
Ans: TMOD special function register
Gate | C/Tbar | M1 | M0 | Gate | C/Tbar | M1 | M0 |
ANSWER
Ans: SCON
SM0 | SM1 | SM2 | REN | TB8 | RB8 | TI | RI |
SM0D | -- | -- | -- | GF1 | GF0 | PD | IDL |
ANSWER
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
Ans: IE special function register:
EA | -- | ET2 | ES | ET1 | EX1 | ET0 | EX0 |
-- | -- | PT2 | PS | PT1 | PX1 | PT0 | PX0 |
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
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
Ans: 1. Data transfer instruction.
2. Arithmetic instruction.
3. Logical Instruction.
4. Boolean variable manipulation instruction.
5. Program branching instructions.
ANSWER
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
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
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.
nice.... but these questions are never asked... atmost 1 may come in viva..... :(
ReplyDeletesome questions about architecture are also required....
u plz put up here if u can v knw our 2 do our job if u dnt put
ReplyDeletemore ques r required
ReplyDeletemore ques r required
ReplyDeleteWhatever you've given is helpful. Keep up the good work. :)
ReplyDeleteWhatever you've given is helpful. Keep up the good work. :)
ReplyDelete