0% found this document useful (0 votes)
3 views

microprocessor class 12

The document provides an overview of microcontrollers, specifically detailing the features and architecture of the 8051 microcontroller, which includes an 8-bit CPU, RAM, ROM, I/O ports, and various peripherals. It describes the functions of key components such as the ALU, accumulator, B-register, and program counter, along with the significance of different flags in the processor's operation. Additionally, it outlines the functionality of the four 8-bit I/O ports used for various applications.

Uploaded by

sureshpv36
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)
3 views

microprocessor class 12

The document provides an overview of microcontrollers, specifically detailing the features and architecture of the 8051 microcontroller, which includes an 8-bit CPU, RAM, ROM, I/O ports, and various peripherals. It describes the functions of key components such as the ALU, accumulator, B-register, and program counter, along with the significance of different flags in the processor's operation. Additionally, it outlines the functionality of the four 8-bit I/O ports used for various applications.

Uploaded by

sureshpv36
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/ 16

MICROPROCESSOR

PART 12

SIBIN K

Electrical Subject Matter Expert


Microcontrollers
General-purpose microprocessors contains
● No RAM
● No ROM
● No I/O ports

Microcontroller has
● CPU (microprocessor)
● RAM
● ROM
● I/O ports
● Timer
● ADC and other peripherals
A Microcontroller is a programmable digital processor with necessary
peripherals

Various features of 8051 microcontroller are given as follows:


● 8-bit microcontroller
● 8bits data bus
● 16bits address bus
● Internal RAM of 128bytes
● Internal ROM of 4KB
● 32 I/O pins arranged as four 8-bit ports (P0 - P3)
● 40 pins IC
● Two 16-bit timer/counters : T0 and T1
● Two external and three internal vectored interrupts
● One full duplex serial I/O
● ARCHITECTURE
ALU
● It is 8 bit unit.
● It performs arithmetic operation as addition, subtraction, multiplication, division, increment
and decrement.
● It performs logical operations like AND, OR and EX-OR
● It performs compare, rotate and compliment operations.
Accumulator(A-reg):
● It is 8 bit register.
● Result of arithmetic & logic operations performed by ALU is accumulated by this register.
● Therefore it is called accumulator register.
● It is used to store 8 bit data and to hold one of operand of ALU units during arithmetical
and logical operations.
● Most of the instructions are carried out on accumulator data.
● It is most versatile of 2 CPU registers.
B-register:
● It is special 8 bit math register.
● It is used in conjunction with A register as I/P operand for ALU.
● It is used as general purpose register to store 8 bit data.
PSW:
● It is 8 bit register.
● It has 4 conditional flags or math flags which sets or resets according to condition of
result.
● It has 3 control flags, by setting or resetting bit required operation or function can be
achieved.

CY AC F0 RS1 RS0 OV - P
Carry Flag(CY):
● During addition and subtraction any carry or borrow is generated then carry flag is set
otherwise carry flag resets.
● It is used in arithmetic, logical, jump, rotate and Boolean operations.

Auxiliary carry flag(AC):


● If during addition and subtraction any carry or borrow is generated from lower 4 bit to
higher 4 bit then AC sets else it resets.
Overflow flag(OV):
● If in signed arithmetic operations result exceeds more than 7 bit then OV flag sets else
resets.
● It is used in signed arithmetic operations only.

Parity flag(P):
● If in result, even no. Of ones "1" are present than it is called even parity and parity flag
sets.
● In result odd no. Of ones "1"are present than it is called odd parity and parity flag resets
F0: It is user defined flag. The user defines the function of this flag. The user can set ,test n
clear this flag through software.
RS1 and RS0: These flags are used to select bank of register by resetting those flags which
are as shown in table :

RS1 RS0 Bank selection


0 0 Bank 0
0 1 Bank 1
1 0 Bank 2
1 1 Bank 3
Program counter (PC): The Program Counter (PC) is a 2-byte address which tells the
8051 where the next instruction to execute is found in memory. It is used to hold 16 bit
address of internal RAM, external RAM or external ROM locations. When the 8051 is
initialized PC always starts at 0000h and is incremented each time an instruction is executed.

Data pointer register (DTPR): It is a 16 bit register used to hold address of external or
internal RAM where data is stored or result is to be stored. It is used to store 16 bit data. It is
divided into2- 8bit registers, DPH-data pointer higher order and DPL-data pointer lower order.
Each register can be used as general purpose register to store 8 bit data and can also be
used as memory location. DPTR does not have single internal address.
The four 8-bit I/O ports P0, P1, P2 and P3 each uses 8 pins.
PORT 0: used as an I/O port. Used as a bidirectional lower order address and data bus for
external memory

PORT 1: used as an I/O port.

PORT 2: used as an I/O port. Used as a higher order address bus for external memory

PORT 3: used as an I/O port. Also for serial data, external interrupt, external timer, memory
control applications
● PIN DIAGRAM

You might also like