0% found this document useful (0 votes)
8 views6 pages

8051 Micrcontroller

The document compares microprocessors and microcontrollers, highlighting that microcontrollers are more complete systems with built-in memory and I/O capabilities, while microprocessors require additional components. It details the architecture of the Intel 8051 microcontroller, including its registers, flags, and input/output capabilities. Additionally, it explains the functionality of various components such as the ALU, instruction register, and clock circuits within the 8051 architecture.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

8051 Micrcontroller

The document compares microprocessors and microcontrollers, highlighting that microcontrollers are more complete systems with built-in memory and I/O capabilities, while microprocessors require additional components. It details the architecture of the Intel 8051 microcontroller, including its registers, flags, and input/output capabilities. Additionally, it explains the functionality of various components such as the ALU, instruction register, and clock circuits within the 8051 architecture.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MICROPROCESSOR V/S MICROCONTROLLER

A microcontroller differs from a microprocessor in many ways. Early name for a


microcontroller was microcomputer. The main difference between a microprocessor and
microcontroller is the completeness of the machine each represents. In order to put a
microprocessor into use the designer required memory peripheral chips and serial and
parallel ports to make completely functional computer. On the other hand, a complete
computer-based system could be built using single chip microcontrollers, with a minimum of
external components. Following figure shows a simplified block diagram of a microprocessor,
which consists of an arithmetic and logic unit (ALU), general-purpose registers, stack pointer
(SP), program counter (PC), clock timing circuits and interrupt circuits.

Fig. Block Diagram of Microprocessor


A microcontroller incorporates all the features that are found in a microprocessor, except it
also has added features to make a complete microcomputer system on its own. The
microcontroller has built-in ROM, RAM, parallel I/O, serial I/O, counters and a clock circuit.

Fig. Block Diagram of Microcontroller


Comparison Between Microprocessor and Microcontroller
Sr. No. Microprocessor Microcontroller
1 Microprocessor contains ALU, general- Microcontroller contains the circuitry
purpose register, stack pointer, of micro- processor and in addition it
program counter, clock timing circuit has built-in ROM, RAM, I/O devices,
and interrupt circuit. timers and counters.
2 It has many instructions to move data It has one or two instructions to move
between memory and CPU. data between memory and CPU
3 It has one or two-bit handling It has many bit handling instructions.
instructions.
4 Access times for memory and I/O Less access times for built-in memory
devices are more and I/O devices.
5 Microprocessor based system requires Microcontroller based system requires
more hardware. less hardware reducing PCB size and
increasing the reliability.
6 Microprocessor based system is more Less flexible in design point of view.
flexible in design point of view.
7 It has single memory map for data and It has separate memory map for data
code. and code.

8 Less number of pins are multi- Number of pins are multi-functioned.


functioned.
8051 Architecture
The Intel 8051 is a Harvard architecture single chip microcontroller (µC) which was
developed by Intel in 1980 for use in embedded systems. It was extremely popular in the
1980s and early 1990s, but today it has largely been superseded by a vast range of enhanced
devices with 8051-compatible processor cores that are manufactured by more than 20
independent manufacturers including Atmel, Maxim IC (via its Dallas Semiconductor
subsidiary), NXP (formerly Philips Semiconductor), Winbond, Silicon Laboratories, Texas
Instruments and Cypress Semiconductor.
Intel's official designation for the 8051 family of µCs is MCS 51. Intel's original 8051 family
was developed using NMOS technology, but later versions, identified by a letter "C" in their
name, e.g., 80C51, used CMOS technology.

A Register (Accumulator)
A register is a general-purpose register used for storing intermediate results obtained during
operation. Prior to executing an instruction upon any number or operand it is necessary to
store it in the accumulator first. All results obtained from arithmetical operations performed
by the ALU are stored in the accumulator. Data to be moved from one register to another
must go through the accumulator. In other words, the A register is the most commonly used
register and it is impossible to imagine a microcontroller without it. More than half
instructions used by the 8051 microcontroller use somehow the accumulator.

B Register
Multiplication and division can be performed only upon numbers stored in the A and B
registers. All other instructions in the program can use this register as a spare accumulator
(A).

Flags and Program Status Word (PSW)


Flags are 1-bit registers provided to store the result of certain program instruction. In order
that the flags may be conveniently addressed, they are grouped inside the program status
word (PSW) and program control (PCON) registers. The 8051 has four math flags that
respond automatically to outcomes of the mathematical operations and three general-
purpose user flags that can be set to 1 or cleared to 0 by the programmer. The math flag
includes carry (C), auxiliary carry (AC), overflow (OV) and parity (P). User flags named F0,
GF0 and GF1.

The program status word contains the math flags, user flag F0, and the register select bits
this identify which of the four general-purpose register banks is currently in use by the
programmer. The remaining two user flags, GF0 and GF1, are stored in PCON.
Fig. 8051 Architecture
CY, the carry flag
This flag is set whenever there is a carry out from the D7 bit. This flag bit is affected after an
8-bit addition or subtraction. It can also be set to 1 or 0 directly by an instruction "SETB C"
and "CLR C", where "SETB C" stands for set bit carry and "CLR C" for clear carry.
AC, the auxiliary carry flag
If there is a carry from D3 to D4 during an ADD or SUB operation, this bit is set otherwise it is
cleared. This flag is used by instruction that performs BCD arithmetic.

P, the parity flag


The parity flag reflects the number of 1s in the accumulator only. If the A register contains
an odd number of 1s, then P=1 and P = 0 for even.
OV, overflow flag
This flag is set whenever the result of a signed number operation is too large, causing the
higher order bit to overflow into the sign bit. This flag is used to detect the errors in signed
arithmetic operation.
The stack and the stack pointer (SP)
The stack refers to an area of internal RAM is used in conjunction with certain opcodes to
store and retrieve data quickly. It is an
Register Back Selection bits, RS1-RS0
These are the register bank selection pins.
Input/output pins, ports and circuits
One of the major features of microcontroller is its versatility built in the input/output circuits
that connects the 8051 to the external world. The 8051 DIP has 40 pins and the success of
the design in the marketplace was determined by the flexibility built into the use of these
pins. For this reason, 24 of these pins may each be used for one of two entirely different
functions, yielding total pin configuration of 64. The function of pins performs at any given
instant depends, first, what is physically connected to it and then, upon what software
commands are used to program the pin. There are 4 8-bit ports: P0, P1, P2, and P3.

Oscillator and clock circuits


The heart of the 8051 is the circuitry is that generates the clock pulses by which all internal
operations are synchronized. Pins XTAL1 and XTAL2 are provided for providing a resonant
network to form an oscillator. The crystal frequency is basic internal clock of the 8051
microcontroller typically 1 MHz to 16 MHz frequency is required for the operation.

Fig. Crystal Circuit

Data Pointer (DTPR)


DPTR register is not a true one because it doesn't physically exist. It consists of two separate
registers: DPH (Data Pointer High) and (Data Pointer Low). For this reason, it may be treated
as a 16-bit register or as two independent 8-bit registers. Their 16 bits are primarily used for
external memory addressing. Besides, the DPTR Register is usually used for storing data and
intermediate results.

ALU
The arithmetic and logic unit performs 8-bit arithmetic and logical operations over the
operands held by the temporary registers TMPI and TMP2. Users cannot access these
temporary registers.
Instruction Register
This register decodes the opcode of an instruction to be executed and gives information to
the timing and control unit to generate necessary signals for the execution of the instruction.

You might also like