KEMBAR78
FMA Notes Unit - 1 | PDF | Microcontroller | Central Processing Unit
0% found this document useful (0 votes)
16 views29 pages

FMA Notes Unit - 1

The document provides an overview of microcontrollers, specifically the 8051 microcontroller, detailing its features, architecture, and applications. It compares the 8051 with its family members (8052 and 8031) and discusses the evolution and significance of microcontrollers in embedded systems. Additionally, it outlines the basic components and functionalities of the 8051 microcontroller, including its memory, I/O ports, timers, and interrupt handling.

Uploaded by

HoD Electrical
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)
16 views29 pages

FMA Notes Unit - 1

The document provides an overview of microcontrollers, specifically the 8051 microcontroller, detailing its features, architecture, and applications. It compares the 8051 with its family members (8052 and 8031) and discusses the evolution and significance of microcontrollers in embedded systems. Additionally, it outlines the basic components and functionalities of the 8051 microcontroller, including its memory, I/O ports, timers, and interrupt handling.

Uploaded by

HoD Electrical
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/ 29

FMA – Unit - 1

Introduction to concept of microcontroller


A microcontroller is a small, low-cost, microcomputer which is
design to perform specific task of an embedded system like displaying
microwaves information, receiving remote signals etc.
The general microcontroller consist of the processor (CPU), The
memory (RAM, RAM, EPROM), Serial ports, Peripherals (Times,
counters) etc.

Features of 8051 Microcontroller


An 8051 microcontroller having following features −

 8-bit bidirectional data bus


 16-bit unidirectional address bus
 4K bytes on-chip program memory (ROM)
 128 bytes on-chip data memory (RAM)
 Four 8-bit bi-directional I/O ports
 Two 16 bit Timers / Counters
 Three internal and two external Interrupts
 32 special function registers each of 8-bit
 16-bit program counter (PC) and data pointer (DPTR)
 Serial port communication through UART
Comparison of Microprocessor and microcontroller
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 6 8 6
sources
Brief History of 8051
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 chipbecause 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
What is a Microcontroller?
A Microcontroller is a small and low cost microcomputer, it ia designed to perform
specific task of embedded system like displaying microwaves of information and
rececving remote signals, etc

The general microcontroller consist of

On the contrary, a Microprocessor (which was developed before Microcontroller) is


just a Processor (CPU) and doesn’t have the above mentioned peripherals. In order
to make it work or build a system around it, we need to interface the peripherals
separately.

Until the development of Microcontrollers, almost all process and control tasks were
implemented using Microprocessors. As Microprocessor need the additional
peripherals to work as a system, the overall cost of the control system was high.

But with the development of Microcontroller, the situation has changed completely
including the world of Embedded Systems.
8051 Microcontroller Introduction and History
The 8051 Microcontroller Introduction gives a brief overview about the 8051
Microcontroller and its history. Intel’s 8051 Microcontroller (Intel MSC-51
Architecture) was a successor to 8048 Microcontroller (Intel MSC-48 Architecture).

Originally, 8051 Microcontrollers were developed using N-MOS Technology but the
use of battery powered devices and their low power consumption lead to usage of
CMOS Technology (which is famous for its low power consumption).

Even though Intel developed 8051 Microcontrollers (which is discontinued in 2007),


more than 20 semiconductor manufacturers are still producing 8051 compatible
microcontrollers i.e. processors based on MSC-51 Architecture.

Some of the 8051 Microcontrollers produced by different manufacturers are: Atmel


(AT89C51, AT89S51), Phillips (S87C654), STC Micro (STC89C52), Infineon (SAB-
C515, XC800), Siemens (SAB-C501), Silicon Labs (C8051), NXP (NXP700,
NXP900), etc.

Majority of the modern 8051 Microcontrollers are Silicon IP Cores (Intellectual


Property Cores) but discrete 8051 Microcontroller IC’s are also available. Because of
their low power consumption, smaller size and simple architecture, 8051 IP Cores
are used in FPGAs (Field Programmable Gate Array) and SoCs (System on Chip)
instead of Advanced ARM Architecture based MCUs.

Applications of 8051 Microcontroller


Even with the development of many advanced and superior Microcontrollers, 8051
Microcontroller is still being used in many embedded system and applications.

Some of the applications of 8051 Microcontroller are mentioned below:

 Consumer Appliances (TV Tuners, Remote controls, Computers, Sewing Machines,


etc.)
 Home Applications (TVs, VCR, Video Games, Camcorder, Music Instruments, Home
Security Systems, Garage Door Openers, etc.)
 Communication Systems (Mobile Phones, Intercoms, Answering Machines, Paging
Devices, etc.)
 Office (Fax Machines, Printers, Copiers, Laser Printers, etc.)
 Automobiles (Air Bags, ABS, Engine Control, Transmission Control, Temperature
Control, Keyless Entry, etc)
 Aeronautical and Space
 Medical Equipment
 Defense Systems
 Robotics
 Industrial Process and Flow Control
 Radio and Networking Equipment
 Remote Sensing
8051 Microcontroller Basics
8051 is an 8 – bit Microcontroller i.e. the data bus of the 8051 Microcontroller (both
internal and external) is 8 – bit wide. It is a CISC based Microcontroller with Harvard
Architecture (separate program and data memory).

Since the basic layout of a microcontroller includes a CPU, ROM, RAM, etc. the
8051 microcontroller also has a similar layout. The following image shows a brief
layout of a typical 8051 Microcontroller.

8051 Microcontroller Features

 8 – Bit ALU: ALU or Arithmetic Logic Unit is the heart of a microcontroller. It performs
arithmetic and bitwise operation on binary numbers. The ALU in 8051 is an 8 – Bit
ALU i.e. it can perform operations on 8 – bit data.
 8 – Bit Accumulator:The Accumulator is an important register associated with the
ALU. The accumulator in 8051 is an 8 – bit register.
 RAM: 8051 Microcontroller has 128 Bytes of RAM which includes SFRs and Input /
Output Port Registers.
 ROM: 8051 has 4 KB of on-chip ROM (Program Memory).
 I/O Ports: 8051 has four 8 – bit Input / Output Ports which are bit addressable and
bidirectional.
 Timers / Counters: 8051 has two 16 – bit Timers / Counters.
 Serial Port: 8051 supports full duplex UART Communication.
 External Memory: 8051Microcontroller can access two 16 – bit address line at once:
one each for RAM and ROM. The total external memory that an 8051 Microcontroller
can access for RAM and ROM is 64KB (216 for each type).
 Additional Features: Interrupts, on-chip oscillator, Boolean Processor, Power Down
Mode, etc.

NOTE: Some of the features like size of RAM and ROM, number of Timers, etc. are
not generic. They vary by manufacturer.

8051 Microcontroller Packaging


8051 Microcontroller is available in a variety of IC Packaging Types. The most
popular and commonly used 8051 Microcontroller Packaging is Dual in-line or DIP. It
is often available as a 40 – pin PDIP or Plastic DIP IC.

The other common packaging type is 44 – Lead PLCC (Plastic Leaded Chip Carrier).
It is a kind of surface mount package.

Another surface mount packaging for 8051 microcontroller is 44 – Lead TQFP (Thin
Quad Flat Package).

This article gave an introduction to 8051 Microcontroller and some its basic features.
In the next article, we will see the Pinout Diagram, Pin Description and Architecture
of 8051 Microcontroller.
Basic Components of a Microcontroller
The difference between a Microprocessor and a Microcontroller is the availability of
the on – chip peripherals like Memory (both RAM and ROM), I/O Ports, Timers /
Counters, Communication Interfaces (like Serial Port), etc.

The following image shows the basic components of a Microcontroller. As all the
components (and a few other components) are integrated on a single chip
(Integrated Circuit – IC), a Microcontroller can be considered as a Microcomputer (or
a Computer on – chip).

CPU (Central Processing Unit)

It is the heart of the Microcontroller that mainly comprises of an Arithmetic Logic Unit
(ALU) and a Control Unit (CU) and other important components. The CPU is the
primary device in communicating with peripheral devices like Memory, Input and
Output.

ALU or Arithmetic Logic Unit, as the name suggests, performs the Arithmetical and
Logical Operations. CU or Control Unit is responsible for timing of the
communication process between the CPU and its peripherals.

Program Memory
The instructions of the CPU are stored in the Program Memory. It is usually
implemented as Read Only Memory or ROM, where the Program written in to it will
be retained even when the power is down or the system is reset.

Modern Program Memory Modules are generally made up of EEPROM (Electrically


Erasable Programmable Read – only Memory), which is a type of non – volatile
memory.

In this type of memory, the data can be erased and reprogrammed using special
programming signals.

When the microcontroller is powered on or manually reset, the processor executes a


set of instructions from a pre-defined memory location (address) in the Program
Memory.

Data Memory

Data Memory in a Microcontroller is responsible for storing values of variables,


temporary data, intermediate results and other data for proper operation of the
program.

Data Memory is often called as RAM (Random Access Memory), which is a type of
volatile memory. It is generally organized as registers and includes both Special
Function Registers (SFRs) and user accessible memory locations.

Input and Output Ports

I/O Ports or Input / Output Ports provide the microcontroller, a physical connection to
the outside world. Input Ports provide a gateway for passing on the data from the
outside world with the help of sensors.

The data from the input ports is manipulated (depending on the application) and will
determine the data on the output port.

Output Ports allow microcontroller to control external devices (like motors and
LEDs). Generally, all ports in microcontrollers have dual functionality i.e. they can act
as both input and output port (not at the same time though).

Clock Generator (Oscillator)

A clock signal allows the operations inside the microcontroller and other parts to be
synchronous. A Clock Generator is an integral part of the Microcontroller’s
Architecture and the user has to provide an additional Timing Circuit in the form of a
Crystal.
8051 Microcontroller Architecture
The 8051 Microcontroller is one of the basic type of microcontroller,
designed by Intel in 1980’s. This microcontroller was based on
Harvard Architecture and developed primarily for use in embedded
systems technology

A. Central Processor Unit (CPU)

 The CPU is the brain of any processing device of the


microcontroller.
 It monitors and controls all operations that are performed on
the Microcontroller units.
 The User has no control over the work of the CPU directly.
 It reads program written in ROM memory and executes them
and do the expected task of that application.

B. Memory

 The Program memory (ROM) is used to store the program of the


microcontroller. This program tells microcontroller to do
specific tasks.
 The data memory (RAM) is used to store data temporarily for
operation.
 8051 microcontroller has 4KB program memory (ROM) and
also 128 bytes of data memory (RAM).

C. Control Bus
Basically Bus is a collection of wires which work as a communication
channel or medium for transfer of Data. It has two types:-

 Address Bus: Microcontroller 8051 has a 16 bit address bus for


transferring the data. It is used to address memory locations and
to transfer the address from CPU to Memory of the
microcontroller.
 Data Bus: Microcontroller 8051 has 8 bits of the data bus,
which is used to carry data of particular applications.

D. Input/Output Port

 Microcontroller is used in embedded systems to control the


various operations of machines. Therefore, to connect it to other
machines, devices or peripherals I/O interfacing ports are
required.
 For this purpose microcontroller 8051 has 4 input, output ports
to connect it to the other peripherals

E. Timers/Counters

 8051 microcontroller has two 16 bit timers and counters.


 These counters are again divided into a 8 bit register.
 The timers are used for measurement of intervals to determine
the pulse width of pulses.

F. Interrupts

 Interrupt is a subroutine call that interrupts of the


microcontrollers main operations or work and causes it to
execute any other program, which is more important at the time
of operation.
 The Microcontroller 8051 can be configured in such a way that
it temporarily terminates or pause the main program at the
occurrence of interrupts. When a subroutine is completed, then
the execution of main program starts.
 Generally five interrupt sources are-

 INTO
 INT1
 TFO
 TF1
 R1/T1

G. Oscillator

 The microcontroller requires clock pulses for its operation, so it


has an on-chip oscillator which works as a clock source for
CPU.
 The output pulses of oscillator are stable. Therefore, it enables
synchronized work of all parts of the Microcontroller.

Applications of 8051 Microcontroller

Some of the applications of 8051 is mainly used in daily life &


industrial applications also some of that applications are shown below

 Light sensing and controlling devices


 Temperature sensing and controlling devices
 Fire detections and safety devices
 Automobile applications
 Defense applications

23222
8051 microcontroller PIN Diagram

The pin diagram of 8051 microcontroller looks as follows −

 Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any
other functions. It is internally pulled up, bi-directional I/O port.
 Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its
initial values.
 Pins 10 to 17 − These pins are known as Port 3. This port serves some
functions like interrupts, timer input, control signals, serial communication
signals RxD and TxD, etc.
 Pins 18 & 19 − These pins are used for interfacing an external crystal to get
the system clock.
 Pin 20 − This pin provides the power supply to the circuit.
 Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher
order address bus signals are also multiplexed using this port.
 Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used
to read a signal from the external program memory.
 Pin 30 − This is EA pin which stands for External Access input. It is used to
enable/disable the external memory interfacing.
 Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used
to demultiplex the address-data signal of port.
 Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower
order address and data bus signals are multiplexed using this port.
 Pin 40 − This pin is used to provide power supply to the circuit.
8051 Memory Organization
8051 memory divided in to two types
A. Program Memory (ROM)
 It can access up to 64 KB program memory (60 KB
external and 4 KB internal program memory).
 When 4KB of Internal ROM (address from 0000H to
0FFFH ) as well as 60KB of External ROM (address from
1000H to FFFFH) have to be used then pin is
connected to Vcc i.e.
 When whole 64KB of External ROM (address from
0000H to FFFFH) has to be used then pin is connected
to GND i.e.

B. Data Memory (RAM)


 It can address upto 64 KB of external data memory and
256 bytes of internal memory.
 The internal data memory is divided into THREE different
blocks.
a. Lower 128 bytes (00H to 7FH)
b. Upper 128 bytes ( 80H to FFH)
c. SFRs (Specials Function Registers)

Structure of Internal RAM (00H to 7FH)


It has 128 bytes Internal RAM which organized in three areas:
A.1 - Register bank area
 There are four register banks ie. 0 to 3 each of 8 byte
 Each bank made up of eight registers named R0 to R7.
 In total Working registers from address 00H to 1FH
organised as four register banks.
 If any of the banks is not selected, then programmer can
be use the area from 00H to 1FH .
 Upon power ON or RESET Bank 0 is selected by default.
A.2 - Bit Addressable area of 16 Bytes
 The microcontroller has reserved of internal RAM whose
address ranges from 20H to 2FH.
 These 16 Bytes provide us with 16 × 8 = 128 bits forming
address bit.
 The microcontroller has given addresses to these bits
ranging from 00H to 7FH.
 These location are called as Bit Addressable Locations

A.3 - General Purpose RAM area


 This RAM is also called as scratch pad area
 It lies above bit address area and as address 30H to 7FH
 This RAM can be used as data RAM

Use of Internal RAM

 It is not essential to utilise the entire area of internal


RAM.
 The microcontroller has instructions that allow the
internal memory location to be use as data pointer.
 The registers R0 & R1 in the four register banks can be
used as a pointer to point the internal and external RAM
both.
 When the register R0 & R1 are used to access the external
RAM, the 8 bits will be consider as LSB of 16 bit address
and MSB is taken to be 00H by default
External Memory

 External memory is used when the internal ROM and RAM


memory is not sufficient on chip.
 Two separate external memories are available by different
control pins for enabling external ROM and RAM chips.
 In 8051 family, external RAM of upto 64 KB and external
ROM of upto 64 KB can be added on any chip.

Special Function Registers (SFRs)


 SFRs are placed in the address space immediately above 128
bytes of RAM from 80H to FFH.
 Out of these 128 Memory Locations (80H to FFH), there are
only 21 locations that are actually assigned to SFRs. Each
SFR has one Byte Address and also a unique name which
specifies its purpose.
 Since the SFRs are a part of the Internal RAM Structure, you
can access SFRs as if you access the Internal RAM. The
main difference is the address space: first 128 Bytes (00H to
7FH) is for regular Internal RAM and next 128 Bytes (80H
to FFH) is for SFRs.
 The SFRs are used to program and control different
hardware peripherals like Timers, Serial Port, I/O Ports etc
 Suppose some of the address (80H to FFH) is not used, when
writing the data to such unused location the data will be lost
it not stored anywhere.
Input / Output Port
The micro controller 8051 has four ports P0, P1, P2, P3. These ports are required for I/O
operation.

1. Port 0
 It is a multi-functioned port can be used
a. As simple input / output mode,
b. for generating data and
c. as lower order address bus for external memory (A0 to A7)
 Port 0 does not have an internal pull up, hence port 0 is configured as an
output port external pull up is required.

1.1.Port 0 as a Simple Input Port


When port 0 is used as an input port a ‘1’ must be written to the corresponding port 0
latch that will cause both the output transistor to switch off and the pin “floats” in a
high impedance state.
1.2.Port 0 as a Simple Output Port
 When port 0 is used as an output port, the latch pins that are programmed to
“0” will cause the lower FET to turn ON and pin is grounded. (0)
 If a “1” is written on the latch pin the FET will turn OFF and the pin is pulled
High by external pull up resistor.

1.3.Port 0 used as address bus for External memory


 Port 0 generates the lower order address A0 to A7.
 When port 0 is used as an address bus to external memory, the internal control
signals switch the address line to gate of FETs.
 If logic ‘1’ is written to address bit, then upper FET is will turn ON and lower
FET will turn OFF providing logic HIGH at the pin
 If logic ‘0’ is written to address bit, then upper FET is will turn OFF and lower
FET will turn ON providing logic LOW at the pin

2. Port 1

Port 1 does not have any extra function. Hence the output latch is connected directly to the
gate of lower FET

2.1.Port 1 as a Simple Input Port


 When port 1 is used as an input port a ‘1’ must be written to the
corresponding port 1 latch that will cause the lower FET turn OFF, The pin
and input to the pin buffer are pulled logic “1” by internal pull up.

2.2.Port 1 as a Simple Output Port


 When port 1 is used as an output port, the latch pins that are programmed to
“0” will cause the lower FET to turn ON, the internal pull up to turn OFF and
input to the circuit is logic 0.
3. Port 2

Port 2 is multifunctional port. It can be used as a simple input / output port or for
generating the order address bus for external memory.
3.1.Port 2 as a Simple Input Port
 When port 2 is used as an input port a ‘1’ must be written to the
corresponding port 2 latch that will cause the lower FET turn OFF, The pin
and input to the pin buffer are pulled logic “1” by internal pull up.

3.2.Port 2 as a Simple Output Port


 When port 2 is used as an output port, the latch pins that are programmed to
“0” will cause the lower FET to turn ON, the internal pull up to turn OFF and
input to the circuit is logic 0.
 If a ‘1’ is written onto the latch pin then it will drive the input of external
circuit high through the pull up. The Lower FER turn OFF.

3.3.Port 2 used as address bus for External memory


 Port 2 generates the higher order address A8 to A15.
 When port 2 is used as an address bus to external memory, the internal control
signals switch the address line to gate of FETs.
 The latch Remain stable because it does not have to turn around for the data
input as port 0.

4. Port 3
Port 3 is a multifunction port it can be used as simple input / output port. The port 3
pins have special functions.

 P3.0 - (RXD): It is a Serial Communication Input.


 P3.1 - (TXD): It is a Serial Communication output
 P3.2 - ( ): Input of Interrupt 0
 P3.3 - ( ): Input of Interrupt 1
 P3.4 - (T0): Input of Counter 0 clock
 P3.5 - (T1): Input of Counter 1 clock
 P3.6 - ( ): Writing Signal to write content on external RAM.
 P3.7 - ( ): Reading Signal to read contents of external RAM.

 Unlike the ports 0 and 2, where all the 8 bits simultaneously change for alternate
use.
 Each bit of port 3 can be programmed as I/O to perform one of the functions.
 Port 3 bit contains D type latch, three unidirectional buffers, FET with internal
pull-up. As the internal pull up is fixed port 3 is called as quasi-bidirectional.
Special Function Registers (SFRs)
 SFRs are placed in the address space immediately above 128
bytes of RAM from 80H to FFH.
 Out of these 128 Memory Locations (80H to FFH), there are
only 21 locations that are actually assigned to SFRs. Each
SFR has one Byte Address and also a unique name which
specifies its purpose.
 Since the SFRs are a part of the Internal RAM Structure, you
can access SFRs as if you access the Internal RAM. The
main difference is the address space: first 128 Bytes (00H to
7FH) is for regular Internal RAM and next 128 Bytes (80H
to FFH) is for SFRs.
 The SFRs are used to program and control different
hardware peripherals like Timers, Serial Port, I/O Ports etc
 Suppose some of the address (80H to FFH) is not used, when
writing the data to such unused location the data will be lost
it not stored anywhere.

Internal
Register Name Functions RAM
Address
ACC or A Accumulator E0 H
B Register B F0 H
DPH Addressing Ext. Memory 83 H
DPL Addressing Ext. Memory 82 H
IE Interrupt Enable Control A8 H
IP Interrupt Priority B8 H
P0 PORT 0 Latch 80 H
P1 PORT 1 Latch 90 H
P2 PORT 2 Latch A0 H
P3 PORT 3 Latch B0 H
PCON Power Control 87 H
PSW Program Status Word D0 H
SCON Serial Port Control 98 H
SBUF Serial Port Data Buffer 99 H
SP Stack Pointer 81 H
TMOD Timer/ Counter Mode Control 89 H
TCON Timer/ Counter Control 88 H
TL0 Timer 0 Low Byte 8A H
TH0 Timer 0 High Byte 8C H
TL1 Timer 1 Low Byte 8B H
TH1 Timer 1 High Byte 8D H

A or Accumulator (ACC)
The Accumulator is used to hold the data for almost all the ALU Operations.

B (Register B)
The B Register is used along with the ACC in Multiplication and Division operations. These
two operations are performed on data that are stored only in Registers A and B.

Data Pointer (DPTR – DPL and DPH)


The Data Pointer is a 16-bit Register. It can be used as a single 16-bit register (as DPTR) or
two 8-bit registers (as DPL and DPH). The DPTR Register is used by the programmer
addressing external memory (Program – ROM or Data – RAM).

I/O Port Registers (P0, P1, P2 and P3)


The 8051 Microcontroller four Ports which can be used as Input and/or Output. These four
ports are P0, P1, P2 and P3.

If a Port Bit is SET (declared as 1), the corresponding Port Pin will be configured as Input
and similarly if a Port Bit is CLEARED (declared as 0), the corresponding Port Pin is
configured as Output.
Stack Pointer (SP)

The stack is a section of a RAM used by the CPU to store information


such as data or memory address on temporary basis. And which work on
LIFO (Last in and first out) basis. The CPU needs this storage area
considering limited number of registers.

As the stack is a section of a RAM, there are registers inside the CPU to
point to it. The register used to access the stack is known as the stack
pointer register.

Program Status Word (PSW)


The PSW Register consists of Flag Bits, which help the programmer in checking the
condition of the result and also make decisions.

Flags are 1-bit storage elements that store and indicate the nature of the result that is
generated by execution of certain instructions.

You might also like