- Embedded Systems Basic Tutorial
- Embedded Systems Resources
- Selected Reading
Brief History of 8051
8051 Microcontroller Interview questions: The Intel 8051 microcontroller is one of the most popular general purpose microcontrollers in use today. It is an 8-bit family of microcontroller developed by Intel in the year 1981. This microcontroller was also referred as 'system on a chip'. Top 10 Microcontroller Interview Questions and Answers 2017 Posted on November 13, 2017 by The top interview team Intel Corporation launched 8-bit microcontroller in 1981 known as 8051. This is all about the 8051 microcontroller timer and counters with basic programming and application circuits. We hope that the information of this article might have given you sufficient data to understand the concept better.
The first microprocessor 4004 was invented by Intel Corporation. 8085 and 8086 microprocessors were also invented by Intel. In 1981, Intel introduced an 8-bit microcontroller called the 8051. It was referred as system on a chip because it had 128 bytes of RAM, 4K byte of on-chip ROM, two timers, one serial port, and 4 ports (8-bit wide), all on a single chip. When it became widely popular, Intel allowed other manufacturers to make and market different flavors of 8051 with its code compatible with 8051. It means that if you write your program for one flavor of 8051, it will run on other flavors too, regardless of the manufacturer. This has led to several versions with different speeds and amounts of on-chip RAM.
8051 Flavors / Members
- 8052 microcontroller − 8052 has all the standard features of the 8051 microcontroller as well as an extra 128 bytes of RAM and an extra timer. It also has 8K bytes of on-chip program ROM instead of 4K bytes.
- 8031 microcontroller − It is another member of the 8051 family. This chip is often referred to as a ROM-less 8051, since it has 0K byte of on-chip ROM. You must add external ROM to it in order to use it, which contains the program to be fetched and executed. This program can be as large as 64K bytes. But in the process of adding external ROM to the 8031, it lost 2 ports out of 4 ports. To solve this problem, we can add an external I/O to the 8031
Comparison between 8051 Family Members
The following table compares the features available in 8051, 8052, and 8031.
Feature | 8051 | 8052 | 8031 |
---|---|---|---|
ROM(bytes) | 4K | 8K | 0K |
RAM(bytes) | 128 | 256 | 128 |
Timers | 2 | 3 | 2 |
I/O pins | 32 | 32 | 32 |
Serial port | 1 | 1 | 1 |
Interrupt sources | 6 | 8 | 6 |
Features of 8051 Microcontroller
An 8051 microcontroller comes bundled with the following features −
- 64K bytes on-chip program memory (ROM)
- 128 bytes on-chip data memory (RAM)
- Four register banks
- 128 user defined software flags
- 8-bit bidirectional data bus
- 16-bit unidirectional address bus
- 32 general purpose registers each of 8-bit
- 16 bit Timers (usually 2, but may have more or less)
- Three internal and two external Interrupts
- Four 8-bit ports,(short model have two 8-bit ports)
- 16-bit program counter and data pointer
- 8051 may also have a number of special features such as UARTs, ADC, Op-amp, etc.
Block Diagram of 8051 Microcontroller
The following illustration shows the block diagram of an 8051 microcontroller −
8051 Microcontroller Pdf
- Answer :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.
- Answer :Intel 8051 is Harvard Architecture. PLC/Microcontrollers/Microprocessors Interview Questions
- Sly and the family stone greatest hits album. Answer :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.
- Answer : Reflection mulan sheet music pdf.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. Assembly Programming Tutorial
- Answer :The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits.Assembly Programming Interview Questions
- Answer :8-bit data bus
- Answer :16-bit address busDigital Logic Design Interview Questions
- Answer :
- 40 Pin IC.
- 128 bytes of RAM.
- 4K ROM.
- 2 Timers (Timer 0 and Timer 1).
- 32 Input/ Output pins.
- 1 serial port.
- 6 Interrupts (Including Reset).
- Answer :At location 0x00 for internal or external memory
- Answer :128 bytes of RAM (from 0x00 to 0x7F) and can be used to store data.
- Answer :
- Direct Addressing
- Register Addressing
- Register Indirect Addressing
- Implicit Addressing
- Immediate Addressing
- Index Addressing
- Answer :64K data memory PLC/Microcontrollers/Microprocessors Interview Questions
- Answer :The memory addresses from 80H to 0FFH are called SFR. These are 128 bytes registers specially designed for interrupts and few other operations.
- Answer :Example: bit address 87h –> byte address 80h, bit #7
- Answer :
- External interrupt 0 (IE0) has highest priority among interrupts.
- Timer interrupt 0 (TF0)
- External interrupt 1 (IE1)
- Timer interrupt 1 (TF1) has lowest priority among other interrupts.
- Serial port Interrupt
- Reset.
- Answer :
- Internal RAM
- Special function registers
- Program memory
- External data memory
- Answer :The bit addressable memory in 8051 is compose from 210 bits: bit address space: 20H – 2FH bytes RAM = 00H – 7FH bits address, SFR registers.
- Answer :
- This file is also called as list file.
- It lists the opcodes, addresses and errors detected by the assembler.
- List file is produced only when indicated by the user.
- 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.Assembly Programming Interview Questions - Answer :
- DB is called as define byte used as a directive in the assembler.
- It is used to define the 8 bit data in binary, hexadecimal or decimal formats.
- It is the only directive that can be used to define ASCII strings larger than two characters.
- DB is also used to allocate memory in byte sized chunks.
- The assembler always converts the numbers into hexadecimal.
- Answer :
- EQU is the equate assembler directive used to define a constant without occupying a memory location.
- It associates a constant value with data label.
- Whenever the label appears in the program, constant value is substituted for label.
- Advantage: The constant value occurring at various positions in a program can be changed at once using this directive.
- Syntax: label EQU constant value
- Answer :
- Label name should be unique and must contain alphabetic letters in both uppercase and lowercase.
- 1st letter should always be an alphabetic letter.
- It can also use digits and special characters?,.,@,_,$.
- Label should not be one of the reserved words in assembly language.
- These labels make the program much easier to read and maintain.
- Answer :
- The flag register also called as the program status word uses only 6 bits.
- The two unused bits are user definable flags.
- Carry, auxiliary carry, parity and overflow flags are the conditional flags used in it.
- 1 is a user definable bit and PSW.5 can be used as general purpose bit.
- Rest all flags indicate some or the other condition of an arithmetic operation.
- Answer :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.
- Answer :
- Bank 1 uses the same RAM space as the stack.
- Stack pointer is incremented or decremented according to the push or pop instruction.
- If the stack pointer is decremented it uses locations 7, 6, 5… which belong to register bank 0.
- If a given program uses R1 then stack is provided new memory location.
- The push instruction may also take stack to location 0 i.e.it will run out of space.
Digital Logic Design Interview Questions - Answer :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. - Answer : https://renewvillage602.weebly.com/blog/ulead-videostudio-10-plus-serial-number-free-download.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:
- MOV A,#0FFH
- MOV P0,A
- Answer :
- Port0 and port2 together form the 16 bit address for external memory.
- Port0 uses pins 32 to 39 of 8051 to give the lower address bits(AD0-AD7)
- Port2 uses pins 21 to 28 of 8051 to give the higher address bits(A8-A15)
- This 16 bit address is used to access external memory if attached.
- When connected to external memory they cannot be used as input output ports.
- Answer :
- Yes, 8051 has the capability of accessing only single bit of a port.
- Here only single bit is accessed and rest is unaltered.
- SYNTAX: “SETB X. Y”.
- Here X is the port number and y is the desired bit.
- Example: SETB P1.2
Here the second bit of port 1 is set to 1. - Answer :
- There are in total 6 single-bit instructions.
- CPL bit: complement the bit (bit= NOT bit).
- JB bit, target: Jump to target if bit equal to 1.
- JNB bit, target: Jump to target if bit is equal to 0.
- JCB bit, target: Jump to target if bit is equal to 1 and then clear bit.