Microprocessor
Microprocessor
• Arithmetic and Logic unit (ALU): ALU inside a microprocessor used to perform the
arithmetic and logic operation. It performs the logic operation on the data
stored inside a register.
• Accumulator: It is a register inside which the intermediate arithmetic and logical
operation data is stored.
• Working registers: It is a storage device used to store the data inside a
microprocessor in different address location.
• Program counter: It is used for counting the number of programs executed
inside a microprocessor.
• Stack pointer: Stack pointer act as a pointer to the certain address. It is a register
used to store the address of the last program request made by the processor
inside a stack.
• Clock circuit: It is used for generate the clock pulse required as a reference signal
for the microprocessor.
• Interrupt circuit: It is used for generating the interrupt signal when the higher
priority process required to be served first on basis of priority by
microprocessor.
Microcontroller:
• A microcomputer made on a single semiconductor chip is called single-chip
microcomputer.
• Single chip microcomputers are generally used in control applications, they
are also called microcontrollers.
• Microcontroller contains all essential components of a microcomputer such as
CPU, RAM, ROM/EPROM, I/O lines etc.
8051 Architecture
The 8051 microcontrollers are used for a variety of applications involving limited calculations
and relatively some control strategies.
They are used for industrial and commercial control applications, appliances control,
instrumentation etc.
The 8051 contains Boolean processor, full duplex serial port and power saving circuitry in
addition to essential components such as 8-bit CPU, RAM, ROM/EPROM/OTPROM,
timer/counter and parallel I/O lines.
CPU (Central Processing Unit): CPU act as a mind of any processing machine. It
synchronizes and manages all processes that are carried out in microcontroller. User
has no power to control the functioning of CPU. It interprets the program stored in
ROM and carries out from storage and then performs it projected duty. CPU manage
the different types of registers available in 8051 microcontroller.
Memory: For operation Micro-controller required a program. This program guides the
microcontroller to perform the specific tasks. This program installed in microcontroller
required some on chip memory for the storage of the program.
Microcontroller also required memory for storage of data and operands for the short
duration. In microcontroller 8051 there is code or program memory of 4 KB that is it
has 4 KB ROM and it also comprise of data memory (RAM) of 128 bytes.
Bus : Bus is a group of wires which uses as a communication canal or acts as means of
data transfer. The different bus configuration includes 8, 16 or more cables. Therefore,
a bus can bear 8 bits, 16 bits all together.
Oscillator: As the microcontroller is digital circuit therefore it needs timer for their
operation. To perform timer operation inside microcontroller it required externally
connected or on-chip oscillator. Microcontroller is used inside an embedded system
for managing the function of devices. Therefore, 8051 uses the two 16-bit counters
and timers. For the operation of this timers and counters the oscillator is used inside
microcontroller.
Features of 8051 Microcontroller:
Pins 1-8: These pins belongs to Port 1 of microcontroller. Port 1 is used as domestically
pulled up, quasi bi directional input/output port.
Pin 9: It is a RESET pin which is utilized to set the microcontroller 8051 to its primary
value. During the beginning of an application the RESET pin is to be set elevated for
two machine rotations.
Pins 10-17: These pins belong to Port 3 of microcontroller. Port 3 can be used for
number of functions such as timer input, interrupts, serial communication indicator for
transmitting (TxD) and receiving (RxD). It is also known as domestic pull up port with
quasi bi direction port embedded within.
Pins 18 and 19: These pins are generally be used for interfacing outer crystal oscillator
with given system clock.
Pin 20: This pin titled as Vss. It symbolizes ground voltage or 0 V is connected to this
pin of microcontroller.
Pin 21-28: These pins belong to port 2 of microcontroller. Port 2 can be used as
Input/output port, senior order address bus are multiplexed with this quasi bi
directional port.
Pin 29: This pin belongs to Program Store Enable or PSEN. It is used for interpreting
the sign from outer program memory.
Pin 30: This pin belongs to External Access or EA input is used for permit or prohibits
outer memory interfacing. If there is no outer memory need, this pin is set to high by
linking it with supply voltage .
Pin 31: This pin belongs to Address Latch Enable or ALE is used for de-multiplexing
the address data indication of port 0 for outer memory interfacing.
Pin 32-39: These pins belong to Port 0 of the microcontroller. Port 0 can be used as
input/output port, lower order address and data bus signals are multiplexed with this
port. This pin act as bi directional Input/output port and outer connected pull up
resistors are necessary for utilizing these ports as Input/output.
Pin 40: This pin is used to provide power supply to the circuit.
i. Speed, the amount of ROM and RAM, number of I/O ports and timers, size
and packaging
ii. Easy to upgrade
iii. Cost per unit
1. Register banks
2. Bit/Byte addressable area
3. The general-purpose memory area
Register Banks:
Register bank area has four register banks- Bank 0, Bank 1, Bank2, Bank 3
Each bank has 8 registers. Therefore, there are 32 registers in the register bank area
and each register is of 8-bit. Each bank has register R0 to R7.
RS0 and RS1 bits of program status word register is used to select register bank.
The address of the register bank starts at 00h and ends at 1Fh.
Bit addressable area can store or remove 1-bit of data as well as 1-byte data. This
area has total of 128-bit addresses starting from 00h to 07Fh.
The addresses of the general-purpose memory area are from 30H to 7FH
(Refer the explain of the answer from above Question of Internal Structure)
Q. Name the register which doesn’t have RAM address:
PC- Program Counter doesn’t have RAM address.