SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
PRESENTATION
ON
MICROPROCESSORMICROPROCESSOR
8051
By: -
ANIL MAURYA
ELECTRICAL & ELECTRONICS
ENGINEER
GENERIC 8051 FEATURES
•Eight bit CPU with registers A and B
•Sixteen bit program counter (PC) and data pointer (DPTR)
•Eight-bit program status word (PSW)
•Eight bit stack pointer (SP)
•128 bytes of RAM and 4K ROM
•Thirty two input / output pins arranged as four 8 bit ports: P0-P3
•Two 16-bit timers /counters: T0 and T1•Two 16-bit timers /counters: T0 and T1
•Full duplex serial data receiver and transmitter: SBUF
•Two external and three internal interrupt sources
•Control registers TCON, TMOD, SCON, PCON, IP and IE.
•Oscillator and the clock circuits.
Math Register
A and B CPU Registers:
A Register (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).
Program Status Word (PSW) Register
P - Parity bit. If a number stored in the accumulator is even then this bit will be automatically set
(1), otherwise it will be cleared (0). It is mainly used during data transmit and receive via serial
communication.communication.
OV Overflow occurs when the result of an arithmetical operation is larger than 255 and cannot be
stored in one register. Overflow condition causes the OV bit to be set (1). Otherwise, it will be cleared
(0).
RS0, RS1 - Register bank select bits. These two bits are used to select one of four register banks
of RAM. By setting and clearing these bits, registers R0-R7 are stored in one of four banks of RAM.
F0 - Flag 0. This is a general-purpose bit available for use.
AC - Auxiliary Carry Flag is used for BCD operations only.
CY - Carry Flag is the (ninth) auxiliary bit used for all arithmetical operations
and shift instructions.
INTRNAL RAM
REGISTER Bank
BANK1 BANK2 BANK3BANK0
Internal ROM
Microcontroller has a 4 K byte internal ROM. The opcodes of the instruction stored in the ROM.
The opcode fetch from the internal ROM.
DATA POINTER
Stack Pointer (SP) Register
I/O Ports:
Port 0: Port 0 is 8 bit port. It used as a input port or output port .when used as a output port ,the pin
latches that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1.it Also
provide the facility for low order adders bus for external memory.
Port 1: Port 1is 8 bit port. It used as a input port or output port .when used as a output port ,the pin latches
that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1.
Port 2: Port 0 is 8 bit port. It used as a input port or output port .when used as a output port ,the pin
latches that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1.it Also
provide the facility for high order adders bus for external memory.
Port 3: Port 1is 8 bit port. It used as a input port or output port .when used as a output port ,the pin
latches that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1.The
port 3 alternate uses shown in the following table:
TIMERS AND COUNTERS
The 8051 comes equipped with two 16 bit timers (T0, T1), both of
which may be controlled, set, read, and configured individually.
The 8051 timers have two general functions:
1 Count internal -acting as timer
2. Count external -acting as counter
All counter action is controlled by the TMOD and the TCON registers.
TMOD Register:TMOD Register:
GATE 1 /0 enables and disables Timer 1/0 by means of a signal brought to the
Timer 1 Timer 0
GATE 1 /0 enables and disables Timer 1/0 by means of a signal brought to the
INT1/0 pin (P3.3/P3.2)
1 - Timer 1 operates only if the INT1 bit is set.
0 - Timer 1 operates regardless of the logic state of the INT1 bit.
C/T 1/0 selects pulses to be counted up by the timer/counter 1:
1 - Timer counts pulses from external source ,brought to the T1 pin
(P3.5)(counter)
0 - Timer counts pulses from internal oscillator(timer)
T1M1,T1M0 These two bits select the operational mode of the Timer 1.
Different modes of timers
Different modes of timers
TCON RegisterTCON Register
TF1 bit is automatically set on the Timer 1 overflow (ie when counting is over)TF1 bit is automatically set on the Timer 1 overflow (ie when counting is over)
TR1 bit enables the Timer 1.
1 - Timer 1 is enabled.
0 - Timer 1 is disabled.
TF0 bit is automatically set on the Timer 0 overflow (ie when counting is over).
TR0 bit enables the timer 0.
1 - Timer 0 is enabled.
0 - Timer 0 is disabled.
IE1 – External interrupt 1. set when INT1 is active(pin 3.3).Not related with
timer/counter
IT1 – If IT1 =1 , INT1 is enabled by falling edge signal to generate interrupt
If IT1 =0 , INT1 is enabled by low signal to generate interrupt
IE0 –External interrupt 0. set when INT0 is active(pin 3.2). Not related with
timer/counter
IT0 –If IT1 =1 , INT0 is enabled by falling edge signal to generate interrupt
If IT1 =0 , INT0 is enabled by low signal to generate interrupt
UART (Universal Asynchronous Receiver and Transmitter)
SBUF register holds the data
SCON register controls the data communication
PCON register controls data rate
Serial Port Control (SCON) Register
SM0 – Serial port mode control bit 0
SM1 – Serial port mode control bit 1
SM2 – Multi processor communication bitSM2 – Multi processor communication bit
- In mode 2 and 3, if set to 1 then interrupt is generated 9th bit of received
data is 1. No interrupt is generated if 9th bit is 0
- In mode 1 , no interrupt is generated until a stop bit is received
- in mode 0,it is cleared
REN- Receive enable control bit . Set to 1,to enable reception.Cleared to 0 to disable
reception
TB8 – transmit bit 8. set and cleared by program in mode 2 and mode 3
RB8 – Receive bit 8. set and cleared by program in mode 2 and mode 3
TI – Transmit interrupt flag
RI - Receive interrupt flag
Different mode of serial data transmission
MODE 0
Bit pattern
BAUD RATE = f/12
f:crystal frequency
Different mode of serial data transmission
MODE 1
Bit pattern
BAUD RATE = 2SMOD *k* oscillator freq /32*12*[256-TH1]
If SMOD=0 ,then k=1
If SMOD =1, then k =2
f:crystal frequency(11.0592 MHz)
Different mode of serial data transmission
MODE 2
Bit pattern
BAUD RATE = f/32,f/64
Different mode of serial data transmission
MODE 3
Bit pattern
BAUD RATE = 2SMOD*k*oscillator freq /32*12*[256-TH1]
INTERRUPT
Five interrupts are provided in 8051,three of these are generated
automatically by internal operation two interrupts are triggered by external
signals provided by circuitry that is connected to pins INT0 and INT1.
Timer flag interrupt: when a timer and counter overflow the corresponding
timer flag TF0 or TF1 is set to 1.
Serial port interrupt: if a data byte is received an interrupt bit, RI is set
to 1 in the SCON register when a data byte has binn transmitted an
interrupt bit TI is set to be 1.
External interrupt: pins ~INT0 and ~INT1 are used by external circuitry.
Input on these pins can set the interrupt flag IE0 and IE1 in the TCON
reregister to 1 by two different methods.
Interrupt Enable RegisterInterrupt Enable Register
EA - global interrupt enable/disable: EX1 - bit enables or disables external 1 interrupt:EA - global interrupt enable/disable:
0 - disables all interrupt requests.
1 - enables all individual interrupt requests.
ET2 - Reserved
ES - enables or disables serial interrupt:
0 - UART system cannot generate an interrupt.
1 - UART system enables an interrupt.
ET1 - bit enables or disables Timer 1 interrupt:
0 - Timer 1 cannot generate an interrupt.
1 - Timer 1 enables an interrupt.
EX1 - bit enables or disables external 1 interrupt:
0 - change of the pin INT1 logic state cannot
generate an interrupt.
1 - enables an external interrupt on the pin INT1
state change.
ET0 - bit enables or disables timer 0 interrupt:
0 - Timer 0 cannot generate an interrupt.
1 - enables timer 0 interrupt.
EX0 - bit enables or disables external 0 interrupt:
Interrupt Vector Location Priority
External hardware interrupt
0(INT0)
0003H Highest
Timer 0 interrupt ( T0) 000BHTimer 0 interrupt ( T0) 000BH
External hardware interrupt 1(INT1) 0013H
Timer 1interrupt ( 1) 001BH
Serial communication interrupt (RI
and TI)
0023H lowest
Interrupt priority RegisterInterrupt priority Register
PS - Serial Port Interrupt priority bitPS - Serial Port Interrupt priority bit
Priority 0
Priority 1
PT1 - Timer 1 interrupt priority
Priority 0
Priority 1
PX1 - External Interrupt INT1 priority
Priority 0
Priority 1
PT0 - Timer 0 Interrupt Priority
Priority 0
Priority 1
PX0 - External Interrupt INT0 Priority
Priority 0
Priority 1
Microprocessor 8051

Más contenido relacionado

La actualidad más candente

Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller Nitesh Kumar
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller pptRahul Kumar
 
RISC Vs CISC, Harvard v/s Van Neumann
RISC Vs CISC, Harvard v/s Van NeumannRISC Vs CISC, Harvard v/s Van Neumann
RISC Vs CISC, Harvard v/s Van NeumannRavikumar Tiwari
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adcPRADEEP
 
PIC-18 Microcontroller
PIC-18 MicrocontrollerPIC-18 Microcontroller
PIC-18 MicrocontrollerASHISH RANJAN
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti VenkatraoRamisetti
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basicssagar Ramdev
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded SystemKaran Thakkar
 
7 segment led interfacing with 8051
7 segment led interfacing with 80517 segment led interfacing with 8051
7 segment led interfacing with 8051Sam Patel
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.pptDr.YNM
 
Evolution of microprocessors
Evolution of microprocessorsEvolution of microprocessors
Evolution of microprocessorsharinder
 

La actualidad más candente (20)

Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
 
Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
Microprocessor ppt
Microprocessor pptMicroprocessor ppt
Microprocessor ppt
 
MicroProcessors
MicroProcessors MicroProcessors
MicroProcessors
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
Introduction to intel 8086 part1
Introduction to intel 8086 part1Introduction to intel 8086 part1
Introduction to intel 8086 part1
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
RISC Vs CISC, Harvard v/s Van Neumann
RISC Vs CISC, Harvard v/s Van NeumannRISC Vs CISC, Harvard v/s Van Neumann
RISC Vs CISC, Harvard v/s Van Neumann
 
timers.pdf
timers.pdftimers.pdf
timers.pdf
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adc
 
PIC-18 Microcontroller
PIC-18 MicrocontrollerPIC-18 Microcontroller
PIC-18 Microcontroller
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded System
 
7 segment led interfacing with 8051
7 segment led interfacing with 80517 segment led interfacing with 8051
7 segment led interfacing with 8051
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Evolution of microprocessors
Evolution of microprocessorsEvolution of microprocessors
Evolution of microprocessors
 

Similar a Microprocessor 8051

moving message display of lcd
 moving message display of lcd moving message display of lcd
moving message display of lcdabhishek upadhyay
 
8051 architecture
8051 architecture8051 architecture
8051 architecturesb108ec
 
8051 microcontroller and it’s interface
8051 microcontroller and it’s interface8051 microcontroller and it’s interface
8051 microcontroller and it’s interfaceAbhishek Choksi
 
janakiraman egsp collage I msc 4 unit
janakiraman egsp collage  I msc 4 unitjanakiraman egsp collage  I msc 4 unit
janakiraman egsp collage I msc 4 unitjanakiramang6
 
janakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiramang6
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxShanDimantha1
 
Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"surabhii007
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerAmandeep Alag
 
Datasheet8951
Datasheet8951Datasheet8951
Datasheet8951Tabuu99
 
Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Technogroovy India
 
Electronic voting machine using mcu 89s52
Electronic voting machine using mcu 89s52Electronic voting machine using mcu 89s52
Electronic voting machine using mcu 89s52Saurav Kumar
 
Electronic voting machine presentation
Electronic voting machine  presentationElectronic voting machine  presentation
Electronic voting machine presentationRavikant Dhayal
 
EMBEDDED SYSTEMS 2&3
EMBEDDED SYSTEMS 2&3EMBEDDED SYSTEMS 2&3
EMBEDDED SYSTEMS 2&3PRADEEP
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorialFutura infotech
 

Similar a Microprocessor 8051 (20)

moving message display of lcd
 moving message display of lcd moving message display of lcd
moving message display of lcd
 
8051 architecture
8051 architecture8051 architecture
8051 architecture
 
8051 microcontroller and it’s interface
8051 microcontroller and it’s interface8051 microcontroller and it’s interface
8051 microcontroller and it’s interface
 
janakiraman egsp collage I msc 4 unit
janakiraman egsp collage  I msc 4 unitjanakiraman egsp collage  I msc 4 unit
janakiraman egsp collage I msc 4 unit
 
janakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiraman I msc 4 unit
janakiraman I msc 4 unit
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptx
 
Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"
 
Interrupt.pptx
Interrupt.pptxInterrupt.pptx
Interrupt.pptx
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
At89 c51
At89 c51At89 c51
At89 c51
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
Datasheet8951
Datasheet8951Datasheet8951
Datasheet8951
 
8051
80518051
8051
 
Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy
 
Electronic voting machine using mcu 89s52
Electronic voting machine using mcu 89s52Electronic voting machine using mcu 89s52
Electronic voting machine using mcu 89s52
 
Electronic voting machine presentation
Electronic voting machine  presentationElectronic voting machine  presentation
Electronic voting machine presentation
 
EMBEDDED SYSTEMS 2&3
EMBEDDED SYSTEMS 2&3EMBEDDED SYSTEMS 2&3
EMBEDDED SYSTEMS 2&3
 
At89s52
At89s52At89s52
At89s52
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 

Más de Anil Maurya

Training report-hzl-cszl
Training report-hzl-cszlTraining report-hzl-cszl
Training report-hzl-cszlAnil Maurya
 
Three phase shifter appliance
Three phase shifter applianceThree phase shifter appliance
Three phase shifter applianceAnil Maurya
 
Report on robotic control
Report on robotic controlReport on robotic control
Report on robotic controlAnil Maurya
 
Report on minor project
Report on minor projectReport on minor project
Report on minor projectAnil Maurya
 
Ppt on rs logix 5000
Ppt on rs logix 5000Ppt on rs logix 5000
Ppt on rs logix 5000Anil Maurya
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlabAnil Maurya
 
Presentation on PLC and SCADA
Presentation on PLC and SCADAPresentation on PLC and SCADA
Presentation on PLC and SCADAAnil Maurya
 

Más de Anil Maurya (13)

Zinc ppt
Zinc pptZinc ppt
Zinc ppt
 
Training report-hzl-cszl
Training report-hzl-cszlTraining report-hzl-cszl
Training report-hzl-cszl
 
Three phase shifter appliance
Three phase shifter applianceThree phase shifter appliance
Three phase shifter appliance
 
Simulations
SimulationsSimulations
Simulations
 
Simulation 2
Simulation 2Simulation 2
Simulation 2
 
Report on robotic control
Report on robotic controlReport on robotic control
Report on robotic control
 
Report on minor project
Report on minor projectReport on minor project
Report on minor project
 
Ppt on rs logix 5000
Ppt on rs logix 5000Ppt on rs logix 5000
Ppt on rs logix 5000
 
Plc report
Plc reportPlc report
Plc report
 
Ppt on robotic
Ppt on roboticPpt on robotic
Ppt on robotic
 
Plc report
Plc reportPlc report
Plc report
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
 
Presentation on PLC and SCADA
Presentation on PLC and SCADAPresentation on PLC and SCADA
Presentation on PLC and SCADA
 

Último

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Último (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 

Microprocessor 8051

  • 2.
  • 3.
  • 4. GENERIC 8051 FEATURES •Eight bit CPU with registers A and B •Sixteen bit program counter (PC) and data pointer (DPTR) •Eight-bit program status word (PSW) •Eight bit stack pointer (SP) •128 bytes of RAM and 4K ROM •Thirty two input / output pins arranged as four 8 bit ports: P0-P3 •Two 16-bit timers /counters: T0 and T1•Two 16-bit timers /counters: T0 and T1 •Full duplex serial data receiver and transmitter: SBUF •Two external and three internal interrupt sources •Control registers TCON, TMOD, SCON, PCON, IP and IE. •Oscillator and the clock circuits.
  • 5. Math Register A and B CPU Registers: A Register (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).
  • 6. Program Status Word (PSW) Register P - Parity bit. If a number stored in the accumulator is even then this bit will be automatically set (1), otherwise it will be cleared (0). It is mainly used during data transmit and receive via serial communication.communication. OV Overflow occurs when the result of an arithmetical operation is larger than 255 and cannot be stored in one register. Overflow condition causes the OV bit to be set (1). Otherwise, it will be cleared (0). RS0, RS1 - Register bank select bits. These two bits are used to select one of four register banks of RAM. By setting and clearing these bits, registers R0-R7 are stored in one of four banks of RAM.
  • 7. F0 - Flag 0. This is a general-purpose bit available for use. AC - Auxiliary Carry Flag is used for BCD operations only. CY - Carry Flag is the (ninth) auxiliary bit used for all arithmetical operations and shift instructions.
  • 10. Internal ROM Microcontroller has a 4 K byte internal ROM. The opcodes of the instruction stored in the ROM. The opcode fetch from the internal ROM.
  • 12. Stack Pointer (SP) Register
  • 13. I/O Ports: Port 0: Port 0 is 8 bit port. It used as a input port or output port .when used as a output port ,the pin latches that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1.it Also provide the facility for low order adders bus for external memory. Port 1: Port 1is 8 bit port. It used as a input port or output port .when used as a output port ,the pin latches that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1. Port 2: Port 0 is 8 bit port. It used as a input port or output port .when used as a output port ,the pin latches that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1.it Also provide the facility for high order adders bus for external memory. Port 3: Port 1is 8 bit port. It used as a input port or output port .when used as a output port ,the pin latches that programmed to a 0 ,if used as a output port ,the pin latches that programmed to a 1.The port 3 alternate uses shown in the following table:
  • 14.
  • 15. TIMERS AND COUNTERS The 8051 comes equipped with two 16 bit timers (T0, T1), both of which may be controlled, set, read, and configured individually. The 8051 timers have two general functions: 1 Count internal -acting as timer 2. Count external -acting as counter All counter action is controlled by the TMOD and the TCON registers.
  • 16. TMOD Register:TMOD Register: GATE 1 /0 enables and disables Timer 1/0 by means of a signal brought to the Timer 1 Timer 0 GATE 1 /0 enables and disables Timer 1/0 by means of a signal brought to the INT1/0 pin (P3.3/P3.2) 1 - Timer 1 operates only if the INT1 bit is set. 0 - Timer 1 operates regardless of the logic state of the INT1 bit. C/T 1/0 selects pulses to be counted up by the timer/counter 1: 1 - Timer counts pulses from external source ,brought to the T1 pin (P3.5)(counter) 0 - Timer counts pulses from internal oscillator(timer) T1M1,T1M0 These two bits select the operational mode of the Timer 1.
  • 17.
  • 20. TCON RegisterTCON Register TF1 bit is automatically set on the Timer 1 overflow (ie when counting is over)TF1 bit is automatically set on the Timer 1 overflow (ie when counting is over) TR1 bit enables the Timer 1. 1 - Timer 1 is enabled. 0 - Timer 1 is disabled. TF0 bit is automatically set on the Timer 0 overflow (ie when counting is over). TR0 bit enables the timer 0. 1 - Timer 0 is enabled. 0 - Timer 0 is disabled.
  • 21. IE1 – External interrupt 1. set when INT1 is active(pin 3.3).Not related with timer/counter IT1 – If IT1 =1 , INT1 is enabled by falling edge signal to generate interrupt If IT1 =0 , INT1 is enabled by low signal to generate interrupt IE0 –External interrupt 0. set when INT0 is active(pin 3.2). Not related with timer/counter IT0 –If IT1 =1 , INT0 is enabled by falling edge signal to generate interrupt If IT1 =0 , INT0 is enabled by low signal to generate interrupt
  • 22. UART (Universal Asynchronous Receiver and Transmitter) SBUF register holds the data SCON register controls the data communication PCON register controls data rate
  • 23. Serial Port Control (SCON) Register SM0 – Serial port mode control bit 0 SM1 – Serial port mode control bit 1 SM2 – Multi processor communication bitSM2 – Multi processor communication bit - In mode 2 and 3, if set to 1 then interrupt is generated 9th bit of received data is 1. No interrupt is generated if 9th bit is 0 - In mode 1 , no interrupt is generated until a stop bit is received - in mode 0,it is cleared REN- Receive enable control bit . Set to 1,to enable reception.Cleared to 0 to disable reception TB8 – transmit bit 8. set and cleared by program in mode 2 and mode 3 RB8 – Receive bit 8. set and cleared by program in mode 2 and mode 3 TI – Transmit interrupt flag RI - Receive interrupt flag
  • 24.
  • 25. Different mode of serial data transmission MODE 0 Bit pattern BAUD RATE = f/12 f:crystal frequency
  • 26. Different mode of serial data transmission MODE 1 Bit pattern BAUD RATE = 2SMOD *k* oscillator freq /32*12*[256-TH1] If SMOD=0 ,then k=1 If SMOD =1, then k =2 f:crystal frequency(11.0592 MHz)
  • 27. Different mode of serial data transmission MODE 2 Bit pattern BAUD RATE = f/32,f/64
  • 28. Different mode of serial data transmission MODE 3 Bit pattern BAUD RATE = 2SMOD*k*oscillator freq /32*12*[256-TH1]
  • 29. INTERRUPT Five interrupts are provided in 8051,three of these are generated automatically by internal operation two interrupts are triggered by external signals provided by circuitry that is connected to pins INT0 and INT1. Timer flag interrupt: when a timer and counter overflow the corresponding timer flag TF0 or TF1 is set to 1. Serial port interrupt: if a data byte is received an interrupt bit, RI is set to 1 in the SCON register when a data byte has binn transmitted an interrupt bit TI is set to be 1. External interrupt: pins ~INT0 and ~INT1 are used by external circuitry. Input on these pins can set the interrupt flag IE0 and IE1 in the TCON reregister to 1 by two different methods.
  • 30.
  • 31. Interrupt Enable RegisterInterrupt Enable Register EA - global interrupt enable/disable: EX1 - bit enables or disables external 1 interrupt:EA - global interrupt enable/disable: 0 - disables all interrupt requests. 1 - enables all individual interrupt requests. ET2 - Reserved ES - enables or disables serial interrupt: 0 - UART system cannot generate an interrupt. 1 - UART system enables an interrupt. ET1 - bit enables or disables Timer 1 interrupt: 0 - Timer 1 cannot generate an interrupt. 1 - Timer 1 enables an interrupt. EX1 - bit enables or disables external 1 interrupt: 0 - change of the pin INT1 logic state cannot generate an interrupt. 1 - enables an external interrupt on the pin INT1 state change. ET0 - bit enables or disables timer 0 interrupt: 0 - Timer 0 cannot generate an interrupt. 1 - enables timer 0 interrupt. EX0 - bit enables or disables external 0 interrupt:
  • 32. Interrupt Vector Location Priority External hardware interrupt 0(INT0) 0003H Highest Timer 0 interrupt ( T0) 000BHTimer 0 interrupt ( T0) 000BH External hardware interrupt 1(INT1) 0013H Timer 1interrupt ( 1) 001BH Serial communication interrupt (RI and TI) 0023H lowest
  • 33. Interrupt priority RegisterInterrupt priority Register PS - Serial Port Interrupt priority bitPS - Serial Port Interrupt priority bit Priority 0 Priority 1 PT1 - Timer 1 interrupt priority Priority 0 Priority 1 PX1 - External Interrupt INT1 priority Priority 0 Priority 1 PT0 - Timer 0 Interrupt Priority Priority 0 Priority 1 PX0 - External Interrupt INT0 Priority Priority 0 Priority 1