SlideShare a Scribd company logo
8051 Microcontroller
Chapter 1
BY
Amruta Chintawar
(Asst.Prof at RAIT, Navi Mumbai)
Thursday, September 03, 2015 1By AMRUTA CHINTAWAR
Topics Covered
• Comparison Between Microprocessors and
Microcontroller
• Features, Architecture & Pin configuration
• CPU Timing and Machine cycle
• I/P and O/P Ports
• Memory Organization
• Counters and Timers
• Interrupts
• Serial data I/P &O/P
Thursday, September 03, 2015 2By AMRUTA CHINTAWAR
Comparison Between P & C
P C
CPU is stand-alone, RAM, ROM, I/O,
timer are separate
CPU, RAM, ROM, I/O and timer are all
on a single chip
Designer can decide on the amount of
ROM, RAM and I/O ports
fix amount of on-chip ROM, RAM, I/P
O/P ports (internal h/w is fixed)
general-purpose single-purpose
Instructions are mainly to move large
volume of data
Many bit handling instructions along
with byte processing
More access time for peripherals-system
slower
Less access time on On-chip devices-
system faster
In contrast, similar system that builds
from uP would require a lot of
additional units
Only single chip can be a complete
system
Thursday, September 03, 2015 3By AMRUTA CHINTAWAR
Comparison Between P & C
P C
Implementation is complicated Implementation is easy
Bulkier, costly, less reliable and consume
more power
Compact, Cheaper, more reliable and
consume less power
S/W protection not possible - external
code memory
Possible –On chip memory
uPs are suitable to processing
information in computer systems.
uCs are suitable to control of I/O devices
in designs requiring a minimum
component
Thursday, September 03, 2015 4By AMRUTA CHINTAWAR
Features of 8051
• 12Mhz/ (11.0592Mhz to support standard baud rate for serial
port)
• 4K bytes ROM
• 128 bytes RAM
• Four 8-bit I/O ports (32 I/O pins)
• Two 8/16 bit timers
• Serial port-Asynchronous
• 64K external code memory space
• 64K data memory space
• Multiple internal and external interrupt sources (5 srcs)
Thursday, September 03, 2015 5By AMRUTA CHINTAWAR
Features of 8051
Thursday, September 03, 2015 6By AMRUTA CHINTAWAR
Blocks of Architecture
• ALU
• Memory
• Peripherals
• Timing and Control Unit
• Oscillator
Thursday, September 03, 2015 7By AMRUTA CHINTAWAR
ALU
• 8-bit
• Performs all arithmetic and
logical operations
• Updates status flags(PSW)
Thursday, September 03, 2015 8By AMRUTA CHINTAWAR
Memory
• Separate On-chip Data and Code memor
• Code Memory-Programs instructions (ROM-4KB)
• Data memory-various Data (RAM-128B)
• Few RAM locations used to program control
various on-chip peripherals and features-SFRs
Thursday, September 03, 2015 9By AMRUTA CHINTAWAR
Peripherals
• 2, 16 bit Timers T0,T1
SFRs- TCON,TMOD,T0,T1
PINs-T0, T1
• 4,I/O ports P0,P1,P2,P3
SFRs-P0,P1,P2,P3
PINs-P0.0-P0.7 ,P1.0-P1.7
• Serial Port
 SFRs-SCON,SBUF,PCON (1-bit)
 PINs-Rxd,Txd
• Interrupts
SFRs-IP,IE,TCON
PINs-INT0,INT1 (H/W)Thursday, September 03, 2015 10By AMRUTA CHINTAWAR
Timing and Control
• Generate time and Control signal
• Necessary for Execution
• Synchronizes all activities with clock
Thursday, September 03, 2015 11By AMRUTA CHINTAWAR
Oscillator
• Onchip oscillator circuit – generates clock
pulses.
• External resonant ckt connected (complete
oscillator)
• 12Mhz
Thursday, September 03, 2015 12By AMRUTA CHINTAWAR
Pin Configuration
Thursday, September 03, 2015 13By AMRUTA CHINTAWAR
Pin Configuration
• 40 pins DIP package
• Four 8-bit I/O port pins-has two functions
1. Vcc (pin 40): Power supply ,+5v
2. GND(pin 20) : supply is connected wrp to
ground
Thursday, September 03, 2015 14By AMRUTA CHINTAWAR
Pin Configuration
3. XTAL1 &XTAL2: The external resonant circuit is
connected to on-chip oscillator circuit .
• NORMALLY Quartz crystal and capacitor are
connected with XTAL1(pin 19) & XTAL2 (pin
18)
• Works at a frequency of crystal oscillator
• If clock signal external oscillator is used,its
onne ted to XTAL …XTAL is left
unconnected.
Thursday, September 03, 2015 15By AMRUTA CHINTAWAR
Pin Configuration
3. XTAL1 &XTAL2: The external resonant circuit
is connected to on-chip oscillator circuit .
• NORMALLY Quartz crystal and capacitor are
connected with XTAL1(pin 19) & XTAL2 (pin
18)
• Works at a frequency of crystal oscillator
• If clock signal external oscillator is used,its
onne ted to XTAL …XTAL is left
unconnected.
Thursday, September 03, 2015 16By AMRUTA CHINTAWAR
Pin Configuration
Crystal connections:
Thursday, September 03, 2015 17By AMRUTA CHINTAWAR
Pin Configuration
Machine Cycle:
Thursday, September 03, 2015 18By AMRUTA CHINTAWAR
Pin Configuration
4.ALE/PROG#: Address latch Enable
• Used to Demultiplex address and data
• ALE=1,indicates presence of lower address bits on
P0,thus enable latch to store address.
• ALE=0, contents are latched, it retains till next ALE.
• ALE=0, P0 act as data bus
PROG#
• for on-chip flash memory programming
• After reset if this pin is low ,uC enters into
programming mode
Thursday, September 03, 2015 19By AMRUTA CHINTAWAR
Pin Configuration, ALE
Thursday, September 03, 2015 20By AMRUTA CHINTAWAR
Pin Configuration
5.RST: Reset
• Active high I/P
• Terminates all the activities
• Clears the contents of all the registers
• Default values will be loaded in SFRs
• Reset signal must be held high for at least 2
m/c cycles
Thursday, September 03, 2015 21By AMRUTA CHINTAWAR
Pin Configuration
RESET:
Thursday, September 03, 2015 22By AMRUTA CHINTAWAR
Pin Configuration
6.PSEN#: Program store Enable
• Active low
• Activate external ROM/EPROM/EEPROM
• Connected to OE# of ROM chip
• not activated when On-chip ROM is accessed
Thursday, September 03, 2015 23By AMRUTA CHINTAWAR
Pin Configuration
7.EA#/VPP: External Access
• Active low, External Access, complete code on external ROM
• If high fetch code from on-chip ROM
• Connected to OE# of ROM chip
• not activated when On-chip ROM is accessed
• However any reference to program address outside the address range of
on-chip memory will automatically access External memory
Thursday, September 03, 2015 24By AMRUTA CHINTAWAR
Pin Configuration
8.PORT 0:
• 8-bit open drain bidirectional I/O port
• Occupies 8-pins
• Open drain external pull-up resistor of 10Kohm must be connected to each pin
• To program P0 as I/P, write 1 to lacth register
• It also has alternate function of ADD/DATA
• However any reference to program address outside the address range of on-chip
memory will automatically access External memory
Thursday, September 03, 2015 25By AMRUTA CHINTAWAR
Pin Configuration
9.PORT 1:
• 8-bit bidirectional I/O port
• Occupies 8-pins
• Has Internal pull-up resistor
• To program P1 as I/P, write 1 to latch register
Thursday, September 03, 2015 26By AMRUTA CHINTAWAR
Pin Configuration
9.PORT 2:
• 8-bit bidirectional I/O port
• Occupies 8-pins
• Has Internal pull-up resistor
• Act as Higher order address bus A8-A15 while accessing external memory
• To program P1 as I/P, write 1 to latch register
Thursday, September 03, 2015 27By AMRUTA CHINTAWAR
Pin Configuration
9.PORT 3:
• 8-bit bidirectional I/O port
• Occupies 8-pins
• Has Internal pull-up resistor
• Has alternate functions
• To program P1 as I/P, write 1 to latch register
• TXD & RXD , INT0# & INT1# , T0 & T1 ,WR# and Rd#
Thursday, September 03, 2015 28By AMRUTA CHINTAWAR
Programming Model
• H/W which is available for Programmer to
directly use it through S/W
• It is a collection of 8 and 16 bit register and 8
bit memory locations.
• Can be operated using software instructions
• Each register with exception of PC, has an
internal one byte address assigned to it.
Thursday, September 03, 2015 By AMRUTA CHINTAWAR 29
Programming Model
• Some registers such as TCON, SCON, IP, IE, A,
B, PSW and ports are all bit addressable and
are marked with * mark.
• These types have provision for reading or
writing the entire byte of data and also each
individual bits may be read or altered
• operations can be done by software
instructions that are generally able to specify a
register by its address or its symbolic name or
both
Thursday, September 03, 2015 By AMRUTA CHINTAWAR 30
Programming Model
Thursday, September 03, 2015 31By AMRUTA CHINTAWAR
SFRs Memory Mapping
Thursday, September 03, 2015 32By AMRUTA CHINTAWAR
PSW Structure
Thursday, September 03, 2015 33By AMRUTA CHINTAWAR
I/P and O/P Port
• Ports can be accessed directly by instructions
during program execution
• I/O ports are memory mapped, they are
treated as memory locations
• All ports are bit addressable
• Each PIN consists of a D latch, I/P buffer and
O/P driver
• SFRs for each port is made of 8-latches
• Accessed by SFRs address or name of that port
Thursday, September 03, 2015 34By AMRUTA CHINTAWAR
Port 0
Thursday, September 03, 2015 35By AMRUTA CHINTAWAR
Port 1
Thursday, September 03, 2015 36By AMRUTA CHINTAWAR
Port 2
Thursday, September 03, 2015 37By AMRUTA CHINTAWAR
Port 3
Thursday, September 03, 2015 38By AMRUTA CHINTAWAR
Timer Structure
Thursday, September 03, 2015 39By AMRUTA CHINTAWAR
TMOD Register
Thursday, September 03, 2015 40By AMRUTA CHINTAWAR
TCON Register
Thursday, September 03, 2015 41By AMRUTA CHINTAWAR
Timer Modes
• It operates in 4 different modes
1. Mode0: 13-bit Timer /Counter
2. Mode1: 16-bit Timer/Counter
3.Mode2: 8-bit Auto-reload
4.Mode3: 8-bit split timer(TL0,TH0)
Thursday, September 03, 2015 42By AMRUTA CHINTAWAR
Timer Modes
Thursday, September 03, 2015 43By AMRUTA CHINTAWAR
Timer Modes
Thursday, September 03, 2015 44By AMRUTA CHINTAWAR
Timer Modes
Thursday, September 03, 2015 45By AMRUTA CHINTAWAR
Timer Modes
Thursday, September 03, 2015 46By AMRUTA CHINTAWAR
Timer Modes
Thursday, September 03, 2015 47By AMRUTA CHINTAWAR
Serial Port
• Slow Process
• To tie-up with valuable processor time serial
data flags are included
• Transmission is under control of program
• Reception unpredictable
• Many a times beyond control of program
• Programmers must write routine to clear flags
Thursday, September 03, 2015 48By AMRUTA CHINTAWAR
Serial Port
• Support full-duplex serial communication
• Transmit and receive buffer register with shift
register
• Logic for generating timing signal
• Status bit showing that data byte has been
sent
• Status bit to indicate data bytes has been
received
• Controlled by SBUF & SCON
Thursday, September 03, 2015 49By AMRUTA CHINTAWAR
Serial Port
Thursday, September 03, 2015 50By AMRUTA CHINTAWAR
Serial Data Transmission
Thursday, September 03, 2015 51By AMRUTA CHINTAWAR
Serial Data Transmission
Thursday, September 03, 2015 52By AMRUTA CHINTAWAR
SCON
Thursday, September 03, 2015 53By AMRUTA CHINTAWAR
Serial Modes
MODE 0 MODE 1,2,3
Fixed baud rate Variable by T1 and SMOD bit of
PCON
Thursday, September 03, 2015 54By AMRUTA CHINTAWAR
Serial Mode 0
• 8-bit half Duplex
• START/STOP Bit not required
• TRN and REN is on RxD
• TxD-provides shift clock for data transfer
-data shifted out at S6P2
-data shifted in after Rxd is sampled S5P2
-signal is square wave
-high for S6,S1,S2
-low for S3,S4,S5
• Timer1 baud rate f/12
• For high speed data collection
Thursday, September 03, 2015 55By AMRUTA CHINTAWAR
Serial Mode 0
Thursday, September 03, 2015 56By AMRUTA CHINTAWAR
Serial Mode 1
• 10-bits per character, full duplex
• 1-start(0),8-data,1-stop bit(1)
• Start and stop bit -----discard
• RxD-receives
• TxD-Transmit
• TI=1-after all 10-bits transmitted
• RI=1-if SM2=0 unconditional
RB8=1 condition satisfies
Thursday, September 03, 2015 57By AMRUTA CHINTAWAR
Serial Mode 1
• Reception- START bit discarded
-8-Bit SBUF
-stop bit RB8
• Data received at programmed baud rate
fbaud =2smod /32 xT1
1/32 x T1 ----SMOD=0
1/16xT1 ----SMOD=1
Thursday, September 03, 2015 58By AMRUTA CHINTAWAR
Serial Mode 1
Thursday, September 03, 2015 59By AMRUTA CHINTAWAR
Serial Mode 2
• 11-bits per character
• 1-start(0),8-data,9th-programmable,1-stop
bit(1)
 9th- RB8 and 8-SBUF ------reception
 9th -TB8 and 8-SBUF------transmission
• Start and stop bit -----discard
• Baud rate controlled by oscillator frequency
fbaud =2smod /64,1/64,1/32 x OSC freq
Thursday, September 03, 2015 60By AMRUTA CHINTAWAR
Serial Mode 3
• Operates like Mode 2
only
• Baud rate is variable
Thursday, September 03, 2015 61By AMRUTA CHINTAWAR
Serial Mode 2 & 3
Thursday, September 03, 2015 62By AMRUTA CHINTAWAR
Interrupts
• It’s a signal generated y an event that auses
the controller to stop temporarily its current
program
• Performs ISR to service that event(Interrupt
handler)
• These events are asynchronous generated by
peripherals
• It allows most efficient utilization of resources
and time
• It’s a H/W generated all
Thursday, September 03, 2015 63By AMRUTA CHINTAWAR
Interrupts of 8051
• The source may be internal peripheral or
external devices
• Total 5---3 internal & 2 H/W
• Internal– Timer0 (TF0),Timer1(TF1),serial
port(TI/RI)
• External--INT0#,INT1#,also referred as IE0,IE1
• Each interrupt has fixed memory location that
contains its ISR
• ISRs are stored in IVT
Thursday, September 03, 2015 64Thursday, September 03, 2015 64By AMRUTA CHINTAWAR
Interrupts of 8051
• All flags auto clear except RI/TI it has to be
cleared manually
Thursday, September 03, 2015 65Thursday, September 03, 2015 65By AMRUTA CHINTAWAR
IP
Thursday, September 03, 2015 66By AMRUTA CHINTAWAR
IE
Thursday, September 03, 2015 67By AMRUTA CHINTAWAR
Power Saving Modes
• Two Power saving modes activated by
programming PCON
• IDLE and POWER DOWN mode
• Most important factor to save powe
consumption is to use crystal frequency just
sufficient for application
• Operating with higher frequency will consume
more power
Thursday, September 03, 2015 68Thursday, September 03, 2015 68By AMRUTA CHINTAWAR
IDLE Mode
• By setting IDLE bit in PCON =1
• Stops program execution and contents of
internal RAM are preserved
• Oscillator continues to run,but clock is
disconnected from CPU
• Timer and serial port operates normally
• Come out by activation of any Interrupt or
RESET,this will make IDLE=0
• After execution of ISR,program resume from
instruction after set idle.
Thursday, September 03, 2015 69Thursday, September 03, 2015 69By AMRUTA CHINTAWAR
Power Down Mode
• By setting PWDN=1
• Stops on chip oscillator
• Program execution, timers and serial port
operation also stops
• Content of internal RAM are preserved
• Come out of by RESET
Thursday, September 03, 2015 70Thursday, September 03, 2015 70By AMRUTA CHINTAWAR
Power Saving Modes
Thursday, September 03, 2015 71By AMRUTA CHINTAWAR
PCON
Thursday, September 03, 2015 72By AMRUTA CHINTAWAR
• Not bit addressable

More Related Content

What's hot

I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
ssuser3a47cb
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...
NimeshSingh27
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
8085 instruction set
8085 instruction set8085 instruction set
Addressing modes
Addressing modesAddressing modes
Addressing modes
karthiga selvaraju
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
Monica Gunjal
 
Unit 2 mpmc
Unit 2 mpmcUnit 2 mpmc
Unit 2 mpmc
tamilnesaner
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
Channabasappa Kudarihal
 
8051 serial communication-UART
8051 serial communication-UART8051 serial communication-UART
8051 serial communication-UART
Pantech ProLabs India Pvt Ltd
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
SARITHA REDDY
 
8051 assembly programming
8051 assembly programming8051 assembly programming
8051 assembly programming
sergeiseq
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
ShivamSood22
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
Vikas Dongre
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
Suchismita Paul
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar
 
Transistor Transistor Logic
Transistor Transistor LogicTransistor Transistor Logic
Transistor Transistor Logic
surat murthy
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
Nahian Ahmed
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
DEPARTMENT OF PHYSICS
 
Microprocessor vs. microcontroller
Microprocessor vs. microcontrollerMicroprocessor vs. microcontroller
Microprocessor vs. microcontrolleraviban
 

What's hot (20)

I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
Unit 2 mpmc
Unit 2 mpmcUnit 2 mpmc
Unit 2 mpmc
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
 
8051 serial communication-UART
8051 serial communication-UART8051 serial communication-UART
8051 serial communication-UART
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
8051 assembly programming
8051 assembly programming8051 assembly programming
8051 assembly programming
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
Transistor Transistor Logic
Transistor Transistor LogicTransistor Transistor Logic
Transistor Transistor Logic
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 
Microprocessor vs. microcontroller
Microprocessor vs. microcontrollerMicroprocessor vs. microcontroller
Microprocessor vs. microcontroller
 

Viewers also liked

8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
Microwave oscillator design
Microwave oscillator designMicrowave oscillator design
Microwave oscillator designImane Haf
 
Microcontrollermesin2008 aneukmesinunsyiah
Microcontrollermesin2008 aneukmesinunsyiahMicrocontrollermesin2008 aneukmesinunsyiah
Microcontrollermesin2008 aneukmesinunsyiah
afdhal teknik
 
Lavadora BOSCH WAK24268EE
Lavadora BOSCH WAK24268EELavadora BOSCH WAK24268EE
Lavadora BOSCH WAK24268EE
Alsako Electrodomésticos
 
Empowered PhXX Women Business Owner Summit Slides
Empowered PhXX Women Business Owner Summit SlidesEmpowered PhXX Women Business Owner Summit Slides
Empowered PhXX Women Business Owner Summit Slides
Kristin Slice
 
(CDN) Content Delivery Network
(CDN) Content Delivery Network(CDN) Content Delivery Network
(CDN) Content Delivery Network
Kenton Spence
 
菊花茶 Tea
菊花茶 Tea菊花茶 Tea
菊花茶 Teamikejiang
 
Microondas BOSCH BFL634GW1
Microondas BOSCH BFL634GW1Microondas BOSCH BFL634GW1
Microondas BOSCH BFL634GW1
Alsako Electrodomésticos
 
Embedded System Practical manual (1)
Embedded System Practical manual (1)Embedded System Practical manual (1)
Embedded System Practical manual (1)
Niraj Bharambe
 
8051 Instruction Set
8051 Instruction Set8051 Instruction Set
8051 Instruction Set
Stupidsid.com
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
anishgoel
 
Emily Ostrander Resume Presentation
Emily Ostrander Resume PresentationEmily Ostrander Resume Presentation
Emily Ostrander Resume Presentation
emilyostrander510
 
Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951 Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951 pooja jaiswal
 
The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systems
manishpatel_79
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set
Nitin Ahire
 
8051 addressing modes
8051 addressing modes8051 addressing modes
8051 addressing modes
sb108ec
 
Encimera AEG HK633320FB
Encimera AEG HK633320FBEncimera AEG HK633320FB
Encimera AEG HK633320FB
Alsako Electrodomésticos
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counterankit3991
 

Viewers also liked (20)

8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
Microwave oscillator design
Microwave oscillator designMicrowave oscillator design
Microwave oscillator design
 
Microcontrollermesin2008 aneukmesinunsyiah
Microcontrollermesin2008 aneukmesinunsyiahMicrocontrollermesin2008 aneukmesinunsyiah
Microcontrollermesin2008 aneukmesinunsyiah
 
Lavadora BOSCH WAK24268EE
Lavadora BOSCH WAK24268EELavadora BOSCH WAK24268EE
Lavadora BOSCH WAK24268EE
 
Empowered PhXX Women Business Owner Summit Slides
Empowered PhXX Women Business Owner Summit SlidesEmpowered PhXX Women Business Owner Summit Slides
Empowered PhXX Women Business Owner Summit Slides
 
(CDN) Content Delivery Network
(CDN) Content Delivery Network(CDN) Content Delivery Network
(CDN) Content Delivery Network
 
菊花茶 Tea
菊花茶 Tea菊花茶 Tea
菊花茶 Tea
 
Microondas BOSCH BFL634GW1
Microondas BOSCH BFL634GW1Microondas BOSCH BFL634GW1
Microondas BOSCH BFL634GW1
 
New Resume
New ResumeNew Resume
New Resume
 
Embedded System Practical manual (1)
Embedded System Practical manual (1)Embedded System Practical manual (1)
Embedded System Practical manual (1)
 
8051 Instruction Set
8051 Instruction Set8051 Instruction Set
8051 Instruction Set
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
Emily Ostrander Resume Presentation
Emily Ostrander Resume PresentationEmily Ostrander Resume Presentation
Emily Ostrander Resume Presentation
 
Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951 Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951
 
The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systems
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set
 
8051 addressing modes
8051 addressing modes8051 addressing modes
8051 addressing modes
 
Encimera AEG HK633320FB
Encimera AEG HK633320FBEncimera AEG HK633320FB
Encimera AEG HK633320FB
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 

Similar to 8051,chapter1,architecture and peripherals

Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture
amrutachintawar239
 
module-2.pptx
module-2.pptxmodule-2.pptx
module-2.pptx
Ambika Naik
 
2502s
2502s2502s
2502s
Andi Gian
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
818Farida
 
Mp 8085
Mp 8085Mp 8085
Mp 8085
sharan Kumar
 
Microprocessor and Microcontroller lec5
Microprocessor and Microcontroller lec5Microprocessor and Microcontroller lec5
Microprocessor and Microcontroller lec5
Ameen San
 
Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]gauravholani
 
microprocessor Lec 01 mic
microprocessor Lec 01 micmicroprocessor Lec 01 mic
microprocessor Lec 01 mic
iqbal ahmad
 
Avr report
Avr reportAvr report
Avr report
NITISH KUMAR
 
8155 Basic Concepts
8155 Basic Concepts8155 Basic Concepts
8155 Basic Concepts
Srinath Kalikivayi
 
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptxMECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
CHANDRA KUMAR S
 
8085-microprocessor
8085-microprocessor8085-microprocessor
8085-microprocessor
ATTO RATHORE
 
Microprocessor and Application (8085)
Microprocessor and Application (8085)Microprocessor and Application (8085)
Microprocessor and Application (8085)ufaq kk
 
8085 microproceesor ppt
8085 microproceesor ppt8085 microproceesor ppt
8085 microproceesor ppt
RJ Aniket
 

Similar to 8051,chapter1,architecture and peripherals (20)

Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture
 
12 mt06ped005
12 mt06ped005 12 mt06ped005
12 mt06ped005
 
module-2.pptx
module-2.pptxmodule-2.pptx
module-2.pptx
 
2502s
2502s2502s
2502s
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
 
Microprocessor systems 8085(2)
Microprocessor systems 8085(2)Microprocessor systems 8085(2)
Microprocessor systems 8085(2)
 
Mp 8085
Mp 8085Mp 8085
Mp 8085
 
Ppi 8255
Ppi 8255Ppi 8255
Ppi 8255
 
Dsp on an-avr
Dsp on an-avrDsp on an-avr
Dsp on an-avr
 
Microprocessor and Microcontroller lec5
Microprocessor and Microcontroller lec5Microprocessor and Microcontroller lec5
Microprocessor and Microcontroller lec5
 
Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]
 
microprocessor Lec 01 mic
microprocessor Lec 01 micmicroprocessor Lec 01 mic
microprocessor Lec 01 mic
 
Doc2502
Doc2502Doc2502
Doc2502
 
Avr report
Avr reportAvr report
Avr report
 
8155 Basic Concepts
8155 Basic Concepts8155 Basic Concepts
8155 Basic Concepts
 
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptxMECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
 
8085-microprocessor
8085-microprocessor8085-microprocessor
8085-microprocessor
 
Microprocessor and Application (8085)
Microprocessor and Application (8085)Microprocessor and Application (8085)
Microprocessor and Application (8085)
 
8085 microproceesor ppt
8085 microproceesor ppt8085 microproceesor ppt
8085 microproceesor ppt
 
12 mt06ped001
12 mt06ped001 12 mt06ped001
12 mt06ped001
 

Recently uploaded

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 

Recently uploaded (20)

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 

8051,chapter1,architecture and peripherals

  • 1. 8051 Microcontroller Chapter 1 BY Amruta Chintawar (Asst.Prof at RAIT, Navi Mumbai) Thursday, September 03, 2015 1By AMRUTA CHINTAWAR
  • 2. Topics Covered • Comparison Between Microprocessors and Microcontroller • Features, Architecture & Pin configuration • CPU Timing and Machine cycle • I/P and O/P Ports • Memory Organization • Counters and Timers • Interrupts • Serial data I/P &O/P Thursday, September 03, 2015 2By AMRUTA CHINTAWAR
  • 3. Comparison Between P & C P C CPU is stand-alone, RAM, ROM, I/O, timer are separate CPU, RAM, ROM, I/O and timer are all on a single chip Designer can decide on the amount of ROM, RAM and I/O ports fix amount of on-chip ROM, RAM, I/P O/P ports (internal h/w is fixed) general-purpose single-purpose Instructions are mainly to move large volume of data Many bit handling instructions along with byte processing More access time for peripherals-system slower Less access time on On-chip devices- system faster In contrast, similar system that builds from uP would require a lot of additional units Only single chip can be a complete system Thursday, September 03, 2015 3By AMRUTA CHINTAWAR
  • 4. Comparison Between P & C P C Implementation is complicated Implementation is easy Bulkier, costly, less reliable and consume more power Compact, Cheaper, more reliable and consume less power S/W protection not possible - external code memory Possible –On chip memory uPs are suitable to processing information in computer systems. uCs are suitable to control of I/O devices in designs requiring a minimum component Thursday, September 03, 2015 4By AMRUTA CHINTAWAR
  • 5. Features of 8051 • 12Mhz/ (11.0592Mhz to support standard baud rate for serial port) • 4K bytes ROM • 128 bytes RAM • Four 8-bit I/O ports (32 I/O pins) • Two 8/16 bit timers • Serial port-Asynchronous • 64K external code memory space • 64K data memory space • Multiple internal and external interrupt sources (5 srcs) Thursday, September 03, 2015 5By AMRUTA CHINTAWAR
  • 6. Features of 8051 Thursday, September 03, 2015 6By AMRUTA CHINTAWAR
  • 7. Blocks of Architecture • ALU • Memory • Peripherals • Timing and Control Unit • Oscillator Thursday, September 03, 2015 7By AMRUTA CHINTAWAR
  • 8. ALU • 8-bit • Performs all arithmetic and logical operations • Updates status flags(PSW) Thursday, September 03, 2015 8By AMRUTA CHINTAWAR
  • 9. Memory • Separate On-chip Data and Code memor • Code Memory-Programs instructions (ROM-4KB) • Data memory-various Data (RAM-128B) • Few RAM locations used to program control various on-chip peripherals and features-SFRs Thursday, September 03, 2015 9By AMRUTA CHINTAWAR
  • 10. Peripherals • 2, 16 bit Timers T0,T1 SFRs- TCON,TMOD,T0,T1 PINs-T0, T1 • 4,I/O ports P0,P1,P2,P3 SFRs-P0,P1,P2,P3 PINs-P0.0-P0.7 ,P1.0-P1.7 • Serial Port  SFRs-SCON,SBUF,PCON (1-bit)  PINs-Rxd,Txd • Interrupts SFRs-IP,IE,TCON PINs-INT0,INT1 (H/W)Thursday, September 03, 2015 10By AMRUTA CHINTAWAR
  • 11. Timing and Control • Generate time and Control signal • Necessary for Execution • Synchronizes all activities with clock Thursday, September 03, 2015 11By AMRUTA CHINTAWAR
  • 12. Oscillator • Onchip oscillator circuit – generates clock pulses. • External resonant ckt connected (complete oscillator) • 12Mhz Thursday, September 03, 2015 12By AMRUTA CHINTAWAR
  • 13. Pin Configuration Thursday, September 03, 2015 13By AMRUTA CHINTAWAR
  • 14. Pin Configuration • 40 pins DIP package • Four 8-bit I/O port pins-has two functions 1. Vcc (pin 40): Power supply ,+5v 2. GND(pin 20) : supply is connected wrp to ground Thursday, September 03, 2015 14By AMRUTA CHINTAWAR
  • 15. Pin Configuration 3. XTAL1 &XTAL2: The external resonant circuit is connected to on-chip oscillator circuit . • NORMALLY Quartz crystal and capacitor are connected with XTAL1(pin 19) & XTAL2 (pin 18) • Works at a frequency of crystal oscillator • If clock signal external oscillator is used,its onne ted to XTAL …XTAL is left unconnected. Thursday, September 03, 2015 15By AMRUTA CHINTAWAR
  • 16. Pin Configuration 3. XTAL1 &XTAL2: The external resonant circuit is connected to on-chip oscillator circuit . • NORMALLY Quartz crystal and capacitor are connected with XTAL1(pin 19) & XTAL2 (pin 18) • Works at a frequency of crystal oscillator • If clock signal external oscillator is used,its onne ted to XTAL …XTAL is left unconnected. Thursday, September 03, 2015 16By AMRUTA CHINTAWAR
  • 17. Pin Configuration Crystal connections: Thursday, September 03, 2015 17By AMRUTA CHINTAWAR
  • 18. Pin Configuration Machine Cycle: Thursday, September 03, 2015 18By AMRUTA CHINTAWAR
  • 19. Pin Configuration 4.ALE/PROG#: Address latch Enable • Used to Demultiplex address and data • ALE=1,indicates presence of lower address bits on P0,thus enable latch to store address. • ALE=0, contents are latched, it retains till next ALE. • ALE=0, P0 act as data bus PROG# • for on-chip flash memory programming • After reset if this pin is low ,uC enters into programming mode Thursday, September 03, 2015 19By AMRUTA CHINTAWAR
  • 20. Pin Configuration, ALE Thursday, September 03, 2015 20By AMRUTA CHINTAWAR
  • 21. Pin Configuration 5.RST: Reset • Active high I/P • Terminates all the activities • Clears the contents of all the registers • Default values will be loaded in SFRs • Reset signal must be held high for at least 2 m/c cycles Thursday, September 03, 2015 21By AMRUTA CHINTAWAR
  • 22. Pin Configuration RESET: Thursday, September 03, 2015 22By AMRUTA CHINTAWAR
  • 23. Pin Configuration 6.PSEN#: Program store Enable • Active low • Activate external ROM/EPROM/EEPROM • Connected to OE# of ROM chip • not activated when On-chip ROM is accessed Thursday, September 03, 2015 23By AMRUTA CHINTAWAR
  • 24. Pin Configuration 7.EA#/VPP: External Access • Active low, External Access, complete code on external ROM • If high fetch code from on-chip ROM • Connected to OE# of ROM chip • not activated when On-chip ROM is accessed • However any reference to program address outside the address range of on-chip memory will automatically access External memory Thursday, September 03, 2015 24By AMRUTA CHINTAWAR
  • 25. Pin Configuration 8.PORT 0: • 8-bit open drain bidirectional I/O port • Occupies 8-pins • Open drain external pull-up resistor of 10Kohm must be connected to each pin • To program P0 as I/P, write 1 to lacth register • It also has alternate function of ADD/DATA • However any reference to program address outside the address range of on-chip memory will automatically access External memory Thursday, September 03, 2015 25By AMRUTA CHINTAWAR
  • 26. Pin Configuration 9.PORT 1: • 8-bit bidirectional I/O port • Occupies 8-pins • Has Internal pull-up resistor • To program P1 as I/P, write 1 to latch register Thursday, September 03, 2015 26By AMRUTA CHINTAWAR
  • 27. Pin Configuration 9.PORT 2: • 8-bit bidirectional I/O port • Occupies 8-pins • Has Internal pull-up resistor • Act as Higher order address bus A8-A15 while accessing external memory • To program P1 as I/P, write 1 to latch register Thursday, September 03, 2015 27By AMRUTA CHINTAWAR
  • 28. Pin Configuration 9.PORT 3: • 8-bit bidirectional I/O port • Occupies 8-pins • Has Internal pull-up resistor • Has alternate functions • To program P1 as I/P, write 1 to latch register • TXD & RXD , INT0# & INT1# , T0 & T1 ,WR# and Rd# Thursday, September 03, 2015 28By AMRUTA CHINTAWAR
  • 29. Programming Model • H/W which is available for Programmer to directly use it through S/W • It is a collection of 8 and 16 bit register and 8 bit memory locations. • Can be operated using software instructions • Each register with exception of PC, has an internal one byte address assigned to it. Thursday, September 03, 2015 By AMRUTA CHINTAWAR 29
  • 30. Programming Model • Some registers such as TCON, SCON, IP, IE, A, B, PSW and ports are all bit addressable and are marked with * mark. • These types have provision for reading or writing the entire byte of data and also each individual bits may be read or altered • operations can be done by software instructions that are generally able to specify a register by its address or its symbolic name or both Thursday, September 03, 2015 By AMRUTA CHINTAWAR 30
  • 31. Programming Model Thursday, September 03, 2015 31By AMRUTA CHINTAWAR
  • 32. SFRs Memory Mapping Thursday, September 03, 2015 32By AMRUTA CHINTAWAR
  • 33. PSW Structure Thursday, September 03, 2015 33By AMRUTA CHINTAWAR
  • 34. I/P and O/P Port • Ports can be accessed directly by instructions during program execution • I/O ports are memory mapped, they are treated as memory locations • All ports are bit addressable • Each PIN consists of a D latch, I/P buffer and O/P driver • SFRs for each port is made of 8-latches • Accessed by SFRs address or name of that port Thursday, September 03, 2015 34By AMRUTA CHINTAWAR
  • 35. Port 0 Thursday, September 03, 2015 35By AMRUTA CHINTAWAR
  • 36. Port 1 Thursday, September 03, 2015 36By AMRUTA CHINTAWAR
  • 37. Port 2 Thursday, September 03, 2015 37By AMRUTA CHINTAWAR
  • 38. Port 3 Thursday, September 03, 2015 38By AMRUTA CHINTAWAR
  • 39. Timer Structure Thursday, September 03, 2015 39By AMRUTA CHINTAWAR
  • 40. TMOD Register Thursday, September 03, 2015 40By AMRUTA CHINTAWAR
  • 41. TCON Register Thursday, September 03, 2015 41By AMRUTA CHINTAWAR
  • 42. Timer Modes • It operates in 4 different modes 1. Mode0: 13-bit Timer /Counter 2. Mode1: 16-bit Timer/Counter 3.Mode2: 8-bit Auto-reload 4.Mode3: 8-bit split timer(TL0,TH0) Thursday, September 03, 2015 42By AMRUTA CHINTAWAR
  • 43. Timer Modes Thursday, September 03, 2015 43By AMRUTA CHINTAWAR
  • 44. Timer Modes Thursday, September 03, 2015 44By AMRUTA CHINTAWAR
  • 45. Timer Modes Thursday, September 03, 2015 45By AMRUTA CHINTAWAR
  • 46. Timer Modes Thursday, September 03, 2015 46By AMRUTA CHINTAWAR
  • 47. Timer Modes Thursday, September 03, 2015 47By AMRUTA CHINTAWAR
  • 48. Serial Port • Slow Process • To tie-up with valuable processor time serial data flags are included • Transmission is under control of program • Reception unpredictable • Many a times beyond control of program • Programmers must write routine to clear flags Thursday, September 03, 2015 48By AMRUTA CHINTAWAR
  • 49. Serial Port • Support full-duplex serial communication • Transmit and receive buffer register with shift register • Logic for generating timing signal • Status bit showing that data byte has been sent • Status bit to indicate data bytes has been received • Controlled by SBUF & SCON Thursday, September 03, 2015 49By AMRUTA CHINTAWAR
  • 50. Serial Port Thursday, September 03, 2015 50By AMRUTA CHINTAWAR
  • 51. Serial Data Transmission Thursday, September 03, 2015 51By AMRUTA CHINTAWAR
  • 52. Serial Data Transmission Thursday, September 03, 2015 52By AMRUTA CHINTAWAR
  • 53. SCON Thursday, September 03, 2015 53By AMRUTA CHINTAWAR
  • 54. Serial Modes MODE 0 MODE 1,2,3 Fixed baud rate Variable by T1 and SMOD bit of PCON Thursday, September 03, 2015 54By AMRUTA CHINTAWAR
  • 55. Serial Mode 0 • 8-bit half Duplex • START/STOP Bit not required • TRN and REN is on RxD • TxD-provides shift clock for data transfer -data shifted out at S6P2 -data shifted in after Rxd is sampled S5P2 -signal is square wave -high for S6,S1,S2 -low for S3,S4,S5 • Timer1 baud rate f/12 • For high speed data collection Thursday, September 03, 2015 55By AMRUTA CHINTAWAR
  • 56. Serial Mode 0 Thursday, September 03, 2015 56By AMRUTA CHINTAWAR
  • 57. Serial Mode 1 • 10-bits per character, full duplex • 1-start(0),8-data,1-stop bit(1) • Start and stop bit -----discard • RxD-receives • TxD-Transmit • TI=1-after all 10-bits transmitted • RI=1-if SM2=0 unconditional RB8=1 condition satisfies Thursday, September 03, 2015 57By AMRUTA CHINTAWAR
  • 58. Serial Mode 1 • Reception- START bit discarded -8-Bit SBUF -stop bit RB8 • Data received at programmed baud rate fbaud =2smod /32 xT1 1/32 x T1 ----SMOD=0 1/16xT1 ----SMOD=1 Thursday, September 03, 2015 58By AMRUTA CHINTAWAR
  • 59. Serial Mode 1 Thursday, September 03, 2015 59By AMRUTA CHINTAWAR
  • 60. Serial Mode 2 • 11-bits per character • 1-start(0),8-data,9th-programmable,1-stop bit(1)  9th- RB8 and 8-SBUF ------reception  9th -TB8 and 8-SBUF------transmission • Start and stop bit -----discard • Baud rate controlled by oscillator frequency fbaud =2smod /64,1/64,1/32 x OSC freq Thursday, September 03, 2015 60By AMRUTA CHINTAWAR
  • 61. Serial Mode 3 • Operates like Mode 2 only • Baud rate is variable Thursday, September 03, 2015 61By AMRUTA CHINTAWAR
  • 62. Serial Mode 2 & 3 Thursday, September 03, 2015 62By AMRUTA CHINTAWAR
  • 63. Interrupts • It’s a signal generated y an event that auses the controller to stop temporarily its current program • Performs ISR to service that event(Interrupt handler) • These events are asynchronous generated by peripherals • It allows most efficient utilization of resources and time • It’s a H/W generated all Thursday, September 03, 2015 63By AMRUTA CHINTAWAR
  • 64. Interrupts of 8051 • The source may be internal peripheral or external devices • Total 5---3 internal & 2 H/W • Internal– Timer0 (TF0),Timer1(TF1),serial port(TI/RI) • External--INT0#,INT1#,also referred as IE0,IE1 • Each interrupt has fixed memory location that contains its ISR • ISRs are stored in IVT Thursday, September 03, 2015 64Thursday, September 03, 2015 64By AMRUTA CHINTAWAR
  • 65. Interrupts of 8051 • All flags auto clear except RI/TI it has to be cleared manually Thursday, September 03, 2015 65Thursday, September 03, 2015 65By AMRUTA CHINTAWAR
  • 66. IP Thursday, September 03, 2015 66By AMRUTA CHINTAWAR
  • 67. IE Thursday, September 03, 2015 67By AMRUTA CHINTAWAR
  • 68. Power Saving Modes • Two Power saving modes activated by programming PCON • IDLE and POWER DOWN mode • Most important factor to save powe consumption is to use crystal frequency just sufficient for application • Operating with higher frequency will consume more power Thursday, September 03, 2015 68Thursday, September 03, 2015 68By AMRUTA CHINTAWAR
  • 69. IDLE Mode • By setting IDLE bit in PCON =1 • Stops program execution and contents of internal RAM are preserved • Oscillator continues to run,but clock is disconnected from CPU • Timer and serial port operates normally • Come out by activation of any Interrupt or RESET,this will make IDLE=0 • After execution of ISR,program resume from instruction after set idle. Thursday, September 03, 2015 69Thursday, September 03, 2015 69By AMRUTA CHINTAWAR
  • 70. Power Down Mode • By setting PWDN=1 • Stops on chip oscillator • Program execution, timers and serial port operation also stops • Content of internal RAM are preserved • Come out of by RESET Thursday, September 03, 2015 70Thursday, September 03, 2015 70By AMRUTA CHINTAWAR
  • 71. Power Saving Modes Thursday, September 03, 2015 71By AMRUTA CHINTAWAR
  • 72. PCON Thursday, September 03, 2015 72By AMRUTA CHINTAWAR • Not bit addressable