Real Time 8051 Micro Controller Interview Questions and Answers for freshers and experienced pdf .
• Introduction Of 8051 Microcontroller Architecture?In 1981, Intel Corporation introduced an 8-bit microcontroller called the 8051. The 8051 became widely popular after Intel allowed other manufacturers to make and market any flavors of the 8051. They please with the condition that they remain code-compatible with the 8051. This has led to many, versions of the 8051 with different speeds and amounts of on-chip ROM marketed by more than half a dozen manufacturers. It is important to note that although there are different flavors of the 8051 in terms of speed and amount of on-chip ROM, they are all compatible with the original 8051 as far as the instructions are concerned. This means that if you write your program for one, it will run on any of them regardless of the manufacturer.
• Intel 8051 Follows Which Architecture?
Intel 8051 is Harvard Architecture.
• What Is The Difference Between Harvard Architecture And Von Neumann Architecture?
The name Harvard Architecture comes from the Harvard Mark. The most obvious characteristic of the Harvard Architecture is that it has physically separate signals and storage for code and data memory. It is possible to access program memory and data memory simultaneously. Typically, code (or program) memory is read-only and data memory is read-write. Therefore, it is impossible for program contents to be modified by the program itself.
The von Neumann Architecture is named after the mathematician and early computer scientist John von Neumann. Von Neumann machines have shared signals and memory for code and data. Thus, the program can be easily modified by itself since it is stored in read-write memory.
• 8051 Was Developed Using Which Technology?
Intel’s original MCS-51 family was developed using NMOS technology, but later versions, identified by a letter C in their name (e.g., 80C51) used CMOS technology and consume less power than their NMOS predecessors. This made them more suitable for battery-powered devices.
• Why 8051 Is Called 8 Bit Microcontroller?
The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits.
• What Is The Width Of Data Bus?
8-bit data bus
• What Is The Width Of Address Bus?
16-bit address bus
• List Out The Features Of 8051 Microcontroller?
o 40 Pin IC.
o 128 bytes of RAM.
o 4K ROM.
o 2 Timers (Timer 0 and Timer 1).
o 32 Input/ Output pins.
o 1 serial port.
o 6 Interrupts (Including Reset).
• On-chip Ram Is Also Called _____ Memory?
Direct memory
• What Location Code Memory Space And Data Memory Space Begins?
At location 0x00 for internal or external memory
• How Much On Chip Ram Is Available?
128 bytes of RAM (from 0x00 to 0x7F) and can be used to store data.
• List Out Addressing Modes In Mcs-51............
o Direct Addressing
o Register Addressing
o Register Indirect Addressing
o Implicit Addressing
o Immediate Addressing
o Index Addressing
• How Much Total External Data Memory That Can Be Interfaced To The 8051?
64K data memory
• What Is Special Function Registers (sfr)?
The memory addresses from 80H to 0FFH are called SFR. These are 128 bytes registers specially designed for interrupts and few other operations.
• Give Example Of Bit Address And Byte Address?
Example: bit address 87h –> byte address 80h, bit #7
• What Are The Types Of Interrupts In 8051?
o External interrupt 0 (IE0) has highest priority among interrupts.
o Timer interrupt 0 (TF0)
o External interrupt 1 (IE1)
o Timer interrupt 1 (TF1) has lowest priority among other interrupts.
o Serial port Interrupt
o Reset.
• What Are The Four Distinct Types Of Memory In 8051?
o Internal RAM
o Special function registers
o Program memory
o External data memory
• Internal Ram Is Located From Address 0x00 To ___?
Internal RAM in 8051 is located from address 0 to address 0xFF. IRAM from 0x00 to 0x7F can be accessed directly. IRAM from 0x80 to 0xFF must be accessed indirectly.
• Tell The Addresses Which Are Bit Addressable?
The bit addressable memory in 8051 is compose from 210 bits: bit address space: 20H – 2FH bytes RAM = 00H – 7FH bits address, SFR registers.
• What Is Lst File?
o This file is also called as list file.
o It lists the opcodes, addresses and errors detected by the assembler.
o List file is produced only when indicated by the user.
o It can be accessed by an editor and displayed on monitor screen or printed.
Programmer uses this file to find the syntax errors and later fix them.
• Explain Db.?
o DB is called as define byte used as a directive in the assembler.
o It is used to define the 8 bit data in binary, hexadecimal or decimal formats.
o It is the only directive that can be used to define ASCII strings larger than two characters.
o DB is also used to allocate memory in byte sized chunks.
o The assembler always converts the numbers into hexadecimal.
• What Is Equ?
o EQU is the equate assembler directive used to define a constant without occupying a memory location.
o It associates a constant value with data label.
o Whenever the label appears in the program, constant value is substituted for label.
o Advantage: The constant value occurring at various positions in a program can be changed at once using this directive.
o Syntax: label EQU constant value
• How Are Labels Named In Assembly Language?
o Label name should be unique and must contain alphabetic letters in both uppercase and lowercase.
o 1st letter should always be an alphabetic letter.
o It can also use digits and special characters?,.,@,_,$.
o Label should not be one of the reserved words in assembly language.
o These labels make the program much easier to read and maintain.
• Are All The Bits Of Flag Register Used In 8051?
o The flag register also called as the program status word uses only 6 bits.
o The two unused bits are user definable flags.
o Carry, auxiliary carry, parity and overflow flags are the conditional flags used in it.
o 1 is a user definable bit and PSW.5 can be used as general purpose bit.
o Rest all flags indicate some or the other condition of an arithmetic operation.
• Which Bit Of The Flag Register Is Set When Output Overflows To The Sign Bit?
The 2nd bit of the flag register is set when output flows to the sign bit. This flag is also called as the overflow flag. Here the output of the signed number operation is too large to be accommodated in 7 bits. For signed numbers the MSB is used to indicate the whether the number is positive or negative. It is only used to detect errors in signed number operations.
• What Are Issues Related To Stack And Bank 1.?
o Bank 1 uses the same RAM space as the stack.
o Stack pointer is incremented or decremented according to the push or pop instruction.
o If the stack pointer is decremented it uses locations 7, 6, 5… which belong to register bank 0.
o If a given program uses R1 then stack is provided new memory location.
o The push instruction may also take stack to location 0 i.e.it will run out of space.
• Explain Jnc.?
It is a command used to jump if no carry occurs after an arithmetic operation. It is called as jump if no carry (conditional jump instruction). Here the carry flag bit in PSW register is used to make decision. The processor looks at the carry flag to see if it is raised or not.
If carry flag is 0, CPU fetches instructions from the address of the label.
• Can Port 0 Be Used As Input Output Port?
Yes, port 0 can be used as input output port. Port 0 is an open drain unlike ports 2, 3, 4. To use it as input or output the 10k ohm pull-up resisters are connected to it externally. To make port 0 as input port it must be programmed by writing 1 to all bits. Example:
1. MOV A,#0FFH
2. MOV P0,A
• Which 2 Ports Combine To Form The 16 Bit Address For External Memory Access?
o Port0 and port2 together form the 16 bit address for external memory.
o Port0 uses pins 32 to 39 of 8051 to give the lower address bits(AD0-AD7)
o Port2 uses pins 21 to 28 of 8051 to give the higher address bits(A8-A15)
o This 16 bit address is used to access external memory if attached.
o When connected to external memory they cannot be used as input output ports.
• Can Single Bit Of A Port Be Accessed In 8051?
o Yes, 8051 has the capability of accessing only single bit of a port.
o Here only single bit is accessed and rest is unaltered.
o SYNTAX: “SETB X. Y”.
o Here X is the port number and y is the desired bit.
o Example: SETB P1.2
Here the second bit of port 1 is set to 1.
• Other Than Setb, Clr Are There Any Single Bit Instructions?
o There are in total 6 single-bit instructions.
o CPL bit: complement the bit (bit= NOT bit).
o JB bit, target: Jump to target if bit equal to 1.
o JNB bit, target: Jump to target if bit is equal to 0.
o JCB bit, target: Jump to target if bit is equal to 1 and then clear bit.
Latest 8051 Micro Controller Interview Questions and Answers pdf
• Intel 8051 Follows Which Architecture?
Intel 8051 is Harvard Architecture.
• What Is The Difference Between Harvard Architecture And Von Neumann Architecture?
The name Harvard Architecture comes from the Harvard Mark. The most obvious characteristic of the Harvard Architecture is that it has physically separate signals and storage for code and data memory. It is possible to access program memory and data memory simultaneously. Typically, code (or program) memory is read-only and data memory is read-write. Therefore, it is impossible for program contents to be modified by the program itself.
The von Neumann Architecture is named after the mathematician and early computer scientist John von Neumann. Von Neumann machines have shared signals and memory for code and data. Thus, the program can be easily modified by itself since it is stored in read-write memory.
• 8051 Was Developed Using Which Technology?
Intel’s original MCS-51 family was developed using NMOS technology, but later versions, identified by a letter C in their name (e.g., 80C51) used CMOS technology and consume less power than their NMOS predecessors. This made them more suitable for battery-powered devices.
• Why 8051 Is Called 8 Bit Microcontroller?
The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits.
• What Is The Width Of Data Bus?
8-bit data bus
• What Is The Width Of Address Bus?
16-bit address bus
• List Out The Features Of 8051 Microcontroller?
o 40 Pin IC.
o 128 bytes of RAM.
o 4K ROM.
o 2 Timers (Timer 0 and Timer 1).
o 32 Input/ Output pins.
o 1 serial port.
o 6 Interrupts (Including Reset).
• On-chip Ram Is Also Called _____ Memory?
Direct memory
• What Location Code Memory Space And Data Memory Space Begins?
At location 0x00 for internal or external memory
• How Much On Chip Ram Is Available?
128 bytes of RAM (from 0x00 to 0x7F) and can be used to store data.
• List Out Addressing Modes In Mcs-51............
o Direct Addressing
o Register Addressing
o Register Indirect Addressing
o Implicit Addressing
o Immediate Addressing
o Index Addressing
• How Much Total External Data Memory That Can Be Interfaced To The 8051?
64K data memory
• What Is Special Function Registers (sfr)?
The memory addresses from 80H to 0FFH are called SFR. These are 128 bytes registers specially designed for interrupts and few other operations.
• Give Example Of Bit Address And Byte Address?
Example: bit address 87h –> byte address 80h, bit #7
• What Are The Types Of Interrupts In 8051?
o External interrupt 0 (IE0) has highest priority among interrupts.
o Timer interrupt 0 (TF0)
o External interrupt 1 (IE1)
o Timer interrupt 1 (TF1) has lowest priority among other interrupts.
o Serial port Interrupt
o Reset.
• What Are The Four Distinct Types Of Memory In 8051?
o Internal RAM
o Special function registers
o Program memory
o External data memory
• Internal Ram Is Located From Address 0x00 To ___?
Internal RAM in 8051 is located from address 0 to address 0xFF. IRAM from 0x00 to 0x7F can be accessed directly. IRAM from 0x80 to 0xFF must be accessed indirectly.
• Tell The Addresses Which Are Bit Addressable?
The bit addressable memory in 8051 is compose from 210 bits: bit address space: 20H – 2FH bytes RAM = 00H – 7FH bits address, SFR registers.
• What Is Lst File?
o This file is also called as list file.
o It lists the opcodes, addresses and errors detected by the assembler.
o List file is produced only when indicated by the user.
o It can be accessed by an editor and displayed on monitor screen or printed.
Programmer uses this file to find the syntax errors and later fix them.
• Explain Db.?
o DB is called as define byte used as a directive in the assembler.
o It is used to define the 8 bit data in binary, hexadecimal or decimal formats.
o It is the only directive that can be used to define ASCII strings larger than two characters.
o DB is also used to allocate memory in byte sized chunks.
o The assembler always converts the numbers into hexadecimal.
• What Is Equ?
o EQU is the equate assembler directive used to define a constant without occupying a memory location.
o It associates a constant value with data label.
o Whenever the label appears in the program, constant value is substituted for label.
o Advantage: The constant value occurring at various positions in a program can be changed at once using this directive.
o Syntax: label EQU constant value
• How Are Labels Named In Assembly Language?
o Label name should be unique and must contain alphabetic letters in both uppercase and lowercase.
o 1st letter should always be an alphabetic letter.
o It can also use digits and special characters?,.,@,_,$.
o Label should not be one of the reserved words in assembly language.
o These labels make the program much easier to read and maintain.
• Are All The Bits Of Flag Register Used In 8051?
o The flag register also called as the program status word uses only 6 bits.
o The two unused bits are user definable flags.
o Carry, auxiliary carry, parity and overflow flags are the conditional flags used in it.
o 1 is a user definable bit and PSW.5 can be used as general purpose bit.
o Rest all flags indicate some or the other condition of an arithmetic operation.
• Which Bit Of The Flag Register Is Set When Output Overflows To The Sign Bit?
The 2nd bit of the flag register is set when output flows to the sign bit. This flag is also called as the overflow flag. Here the output of the signed number operation is too large to be accommodated in 7 bits. For signed numbers the MSB is used to indicate the whether the number is positive or negative. It is only used to detect errors in signed number operations.
• What Are Issues Related To Stack And Bank 1.?
o Bank 1 uses the same RAM space as the stack.
o Stack pointer is incremented or decremented according to the push or pop instruction.
o If the stack pointer is decremented it uses locations 7, 6, 5… which belong to register bank 0.
o If a given program uses R1 then stack is provided new memory location.
o The push instruction may also take stack to location 0 i.e.it will run out of space.
• Explain Jnc.?
It is a command used to jump if no carry occurs after an arithmetic operation. It is called as jump if no carry (conditional jump instruction). Here the carry flag bit in PSW register is used to make decision. The processor looks at the carry flag to see if it is raised or not.
If carry flag is 0, CPU fetches instructions from the address of the label.
• Can Port 0 Be Used As Input Output Port?
Yes, port 0 can be used as input output port. Port 0 is an open drain unlike ports 2, 3, 4. To use it as input or output the 10k ohm pull-up resisters are connected to it externally. To make port 0 as input port it must be programmed by writing 1 to all bits. Example:
1. MOV A,#0FFH
2. MOV P0,A
• Which 2 Ports Combine To Form The 16 Bit Address For External Memory Access?
o Port0 and port2 together form the 16 bit address for external memory.
o Port0 uses pins 32 to 39 of 8051 to give the lower address bits(AD0-AD7)
o Port2 uses pins 21 to 28 of 8051 to give the higher address bits(A8-A15)
o This 16 bit address is used to access external memory if attached.
o When connected to external memory they cannot be used as input output ports.
• Can Single Bit Of A Port Be Accessed In 8051?
o Yes, 8051 has the capability of accessing only single bit of a port.
o Here only single bit is accessed and rest is unaltered.
o SYNTAX: “SETB X. Y”.
o Here X is the port number and y is the desired bit.
o Example: SETB P1.2
Here the second bit of port 1 is set to 1.
• Other Than Setb, Clr Are There Any Single Bit Instructions?
o There are in total 6 single-bit instructions.
o CPL bit: complement the bit (bit= NOT bit).
o JB bit, target: Jump to target if bit equal to 1.
o JNB bit, target: Jump to target if bit is equal to 0.
o JCB bit, target: Jump to target if bit is equal to 1 and then clear bit.
No comments:
Post a Comment