SlideShare une entreprise Scribd logo
1  sur  60
8051 microcontroller
Vishnu chittan.M
What is an EmbeddedSystem?
 Application-specific systems which contain hardware and
software tailored for a particular task and are generally part of
a larger system.
 Characteristics
 Are dedicated to a particular application.
 Include processors dedicated to specific functions.
 Represent a subset of reactive (responsive to external inputs)
systems.
 Contain real-time constraints.
EmbeddedSystems Applications
Aerospace Navigation systems, automatic landing systems, flight
attitude controls, engine controls, space exploration
(e.g.. The mars pathfinder)
Automotive Fuel injection control, passenger environmental
controls, anti-locking braking systems, air bag controls,
GPS mapping, cruise control
Children's toys Video games, MindStone system
Communication Satellites, network routers, switches, hubs
Computer Peripherals Printers, scanners, keyboards, displays, modems,
hard disk drives, CD-ROM drives, USB
Home Dishwashers, microwave ovens, VCR’s, DVD,
televisions, stereos, fire/security alarm systems,
lawn sprinkler controls, thermostats, digital
cameras, clock radios, cell phones
Industrial Elevator controls, surveillance systems, robots
Instrumentation Data collection, oscilloscopes, signal generators,
signal analyzers, power supplies
EmbeddedSystems Applications
Medical CT, One touch glucose meter, almost all medical
facility
Office Automation FAX machines, copiers, telephones,
Personal PDA’s, pagers, cell phones, video games, Ipod, MP3
players
EmbeddedSystems Applications
Essential Components
Essential components :-
- Microcontroller / DSP core
- Sensors
- Converter ( A-D and D-A )
- Actuators
- Memory (on-chip and off-chip )
- Communication path with interfacing environment
Why do we need to learn Microcontrollers ?
• Its not an exaggeration if I say that ,today there is no
electronic gadget on the earth which is designed without
a Microcontroller. Ex: communication devices, digital
entertainment, portable devices etc…
Not believable ??? See the next slide
• Personal information products: Cell phone, pager, watch, pocket
recorder, calculator
• Laptop components: mouse, keyboard, modem, fax card, sound
card, battery charger
• Home appliances: door lock, alarm clock, thermostat, air
conditioner, TV remote, VCR, small refrigerator, exercise
equipment, washer/dryer, microwave oven
• Industrial equipment: Temperature/pressure controllers,
Counters, timers, RPM Controllers
• Toys: video games, cars, dolls, etc.
So, A good designer should always know
what type of controller he/she is using ,their
architecture, advantages , disadvantages , ways
to reduce production costs and product
reliability etc….
Then What is a Microcontroller ?
• A smaller computer
• On-chip RAM, ROM, I/O ports...
• Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC
16X
RAM ROM
I/O
Port
Timer
Serial
COM
Port
CPU
A single chip
Microcontroller
How is it different from a
Microprocessor ??
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example:Intel’s x86, Motorola’s 680x0
CPU
General-
Purpose
Micro-
processor
RAM ROM I/O
Port
Timer
Serial
COM
Port
Data Bus
Address Bus
Microprocessor
 CPU is stand-alone, RAM,
ROM, I/O, timer are separate
 designer can decide on the
amount of ROM, RAM and
I/O ports.
 expansive
 versatility
 general-purpose
Microcontroller
• CPU, RAM, ROM, I/O and
timer are all on a single chip
• fix amount of on-chip ROM,
RAM, I/O ports
• Highly bit addressable
• for applications in which cost,
power and space are critical
• single-purpose
Microprocessor vs. Microcontroller
EVOLUTION
Flashback !!!!
In the year 1976, Motorola created a Microprocessor chip called 6801
which replaced its brother 6800 with certain add-on chips to make
a computer. This paved the way for the new revolution in the history
of chip design and gave birth to a new entity called
MICROCONTROLLER.
The INTEL bagged the credit of producing the first Microcontroller
8048 with a CPU and 1K bytes of EPROM, 64 Bytes of RAM an 8-Bit
Timer and 27 I/O pins in 1976.
Evolution contd…
• Then followed the most popular controller 8051 in the year 1980
with 4K bytes of ROM,128 Bytes of RAM , a serial port, two 16-bit
Timers , and 32 I/O pins.
• The 8051 family has many additions and improvements over the
years and remains a most soughtafter tool for todays circuit
designers.
• The same INTEL introduced a 16 bit controller 8096 in the year
1982
• Later INTEL introduced 80c196 series of 16-bit
microcontrollers for mainly industrial applications
• Microchip, another company has introduced a
microcontroller PIC 16C64 an 8-bit in the year 1985.
• 32-bit microcontrollers have been developed by IBM and
Motorola-MPC 505 is a 32-bit RISC controller of Motorola
• The 403 GA is a 32 -bit RISC embedded controller of IBM
ARM Controllers
• In recent times ARM company (Advanced Risc machines) has
developed and introduced 32 bit controllers which are highend
application devices,especially communication devices like mobiles ,
ipods etc..(Refer www.arm.com)
Types of Microcontrollers
Microcontrollers from different
manufacturers
•Atmel
•ARM
•Intel
•8-bit
•8XC42
•MCS48
•MCS51
•8xC251
•16-bit
•MCS96
•MXS296
•National Semiconductor
•COP8
•Microchip
•12-bit instruction PIC
•14-bit instruction PIC
•PIC16F84
•16-bit instruction PIC
•NEC
•Motorola
•8-bit
•68HC05
•68HC08
•68HC11
•16-bit
•68HC12
•68HC16
•32-bit
•683xx
•Texas Instruments
•TMS370
•MSP430
•Zilog
•Z8
•Z86E02
MCS-51 “Family” of Microcontollers
Feature 8031 8051 8052 8751
ROM NO 4kB 8kB 4kB UV Eprom
RAM (Bytes) 128 128 256 128
TIMERS 2 2 3 2
I/O PINS 32 32 32 32
SERIAL PORTS 1 1 1 1
INTERRUPT 6 6 8 6
SOURCES
Microcontroller Architectures
CPU
Program
+ Data
Address Bus
Data Bus
Memory
Von Neumann
Architecture
CPU
Program
Address Bus
Data Bus
Harvard
Architecture
Memory
Data
Address Bus
Fetch Bus
0
0
0
2n
Important Features of 8051
• 4K bytes ROM
• 128 bytes RAM
• Four 8-bit I/O ports
• Two 16-bit timers
• Serial interface
• 64K external code memory space
• 64K data memory space
“Original” 8051 Microcontroller
Oscillator
and timing
4096 Bytes
Program Memory
(ROM)
128 Bytes
Data Memory
(RAM)
Two 16 Bit
Timer/Event
Counters
8051
CPU
64 K Byte Bus
Expansion
Control
Programmable
I/O
Programmable
Serial Port Full
Duplex UART
Synchronous Shifter
Internal data bus
External interrupts
subsystem interrupts
Control Parallel ports
Address Data Bus
I/O pins
Serial Input
Serial Output
Pin Description of the 8051
• The 8051 is a 40 pin
device, but out of these 40
pins, 32 are used for I/O.
• 24 of these are dual
purpose, i.e. they can
operate as I/O or a control
line or as part of address
or date bus.
Inside Architecture of 8051
24
CPU
On-chip
RAM
On-chip
ROM for
program
code
4 I/O Ports
Timer 0
Serial
Port
Inside the 8051 Microcontroller Block Diagram
OSC
Interrupt
Control
External interrupts
Timer 1
Timer/Counter
Bus
Control
TxD RxDP0 P1 P2 P3
Address/Data
Counter
Inputs
Microcontroller Packaging andAppearance
25
 Three criteria in Choosing a Microcontroller
 Meeting the computing needs of the task efficiently and cost
effectively.
• Speed, the amount of ROM and RAM, the number of I/O
ports and timers, size, packaging, power consumption.
• Easy to upgrade.
• Cost per unit.
 Availability of software development tools.
• Assemblers, debuggers, C compilers, emulator, simulator,
technical support.
 Wide availability and reliable sources of the microcontrollers.
26
27
A Pin on Port 1
28
D Q
Ck Q
Vcc
Load (L1)
Read latch
Read pin
Write to
latch
Internal
CPU bus
M
1
P1.X
pinP1.X
TB1
TB2
A Pin of Port 0
29
D Q
Clk Q
Read latch
Read pin
Write to
latch
Internal CPU
bus
M
1
P0.X
pinP0.X
TB1
TB2
Memory mapping in 8051
30
ROM memory map in 8051 family
0000H
0FFFH
0000H
1FFFH
0000H
7FFFH
8751
AT89C51 8752
AT89C52
4k
DS5000-32
8k 32k
from Atmel Corporation
from Dallas Semiconductor
221-Introduction
to Embedded C
31
Advantages
 It is a ‘mid-level’, with ‘high-level’ features (such as
support for functions and modules), and ‘low-level’
features (such as good access to hardware via pointers)
 C is the most common Embedded language 85%, of
embedded applications are coded in C.
 It directly manipulates the hardware and memory
addresses.
 Cx51 Cross compiler supports all of the ANSI Standard C
directives.
32
Data Types
Data types Bits Bytes Value range
• Bit 1 0 to 1
• Signed char 8 1 -128 to +127
• Unsigned char 8 1 0 to 255
• Signed short 16 2 -32768 to +32767
• Unsigned short 16 2 0 to 65535
• Signed int 16 2 -32768 to +32767
• Unsigned int 16 2 0 to 65535
• Signed long 32 4 -2147483648 to 2147483647
• Unsigned long 32 4 0 to 4294967295
• Float 32 4 ±1.175494E-38 to
±3.402823E+38
• sbit 1 0 to 1
• sfr 8 1 0 to 255
33
8051 Memory Areas
• The 8051 architecture supports a number of
physically separate memory areas for program and data.
Each memory area offers certain advantages and
disadvantages.
 Program Memory code
 Internal Data memory bdata, data, idata
 External Data memory xdata, pdata
34
35
 code: Program memory (64 Kbytes); accessed by opcode
MOVC A, @A+DPTR.
 data: Directly addressable internal data memory; fastest
access to full internal address space (256 bytes).
 idata: Indirectly addressable internal data memory; accessed
across the internal address space (128 bytes).
 bdata: Bit-addressable internal data memory; allows mixed bit
and byte access (16 bytes).
 xdata: External data memory (64 Kbytes); accessed by opcode
MOVX @DPTR.
 pdata: Paged (256 bytes) external data memory; accessed by
opcode . MOVX @Rn.
Explicitly declaredMemorytypes
36
Memory models
 The memory model determines which default memory type to
use for automatic variables, and declarations with no explicit
memory type specifier.
 If the memory type specifier is omitted in a variable
declaration, the default or implicit memory type is
automatically selected.
 Automatic variables which cannot be located in registers are
also stored in the default memory area.
 The default memory type is determined by the SMALL,
COMPACT and LARGE compiler control directives.
Small Model: Internal RAM128 bytes
 All variables, by default, reside in the internal data memory
of the 8051 system.
 It is the same as if they were declared explicitly using the
data memory --type specifier.
 Variable access is very efficient. Stack size is critical because
the real stack size depends upon the nesting depth of the
various functions.
 Using this memory model, the number of global variables
must be kept to a minimum to allow. However the amount of
space required for the stack must be kept in mind.
37
Compact Model: RAM256bytes off-chip
 All variables, by default, reside in one page of external
data memory.
 It is as if they were explicitly declared using the pdata
memory type specifier. This memory model can
accommodate a maximum of 256 bytes of variables. The
limitation is due to the addressing scheme used, which is
indirect through registers R0 and R1 (@R0, @R1.
38
Compact Model: RAM256bytes off-chip
 The compact model is rarely used for an entire
program, but more
 usual in combination with the SMALL switch
reserved for interrupt routines.
 COMPACT is especially useful for programs with
a large number of
 medium speed 8 bit variables.
39
Large Model: Total RAMup to 64KB
In this model, all variables, by default, reside in external
data memory (up to 64 Kbytes).
 It is the same as if they were explicitly declared using the
xdata memory type specifier.
 Memory access through this data pointer is inefficient,
especially on variables with a length of two or more bytes.
 This type of data access mechanism generates more code
than the small or compact models, Permits slow access to a
very large memory space .
40
Interfacing Dip Switches andInterfacing LEDs
(a)
(b)
Interfacing Push-Button Keys
What is a Keypad ?
 Collection of keys interfaced to
the microcontroller
 Arranged in the form of two
dimensional matrix
 Matrix arrangement used for
minimizing the number of port
lines
 Junction of each row and
column forms the key
Interfacing a Keyboard
Applications of
Microcontrollers
Simple Interfacing Examples
Seven segment Interfacing
Traffic light controller
Closed loop control system-
Temperature control example
Home automation system
Single Axis solar tracking system

Contenu connexe

Tendances

Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051guest70d48b1
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerAmandeep Alag
 
Microprocessor 8051
Microprocessor 8051Microprocessor 8051
Microprocessor 8051Anil Maurya
 
Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontrollerankitsharmaj
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller featuresTech_MX
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration AKHIL MADANKAR
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller Gaurav Verma
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )Tarun Khaneja
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt ianishgoel
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051Sadiq Rahim
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 MicrocontrollerNitin Ahire
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basicssagar Ramdev
 
8051microcontroller
8051microcontroller 8051microcontroller
8051microcontroller manish080
 

Tendances (20)

Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
Microprocessor 8051
Microprocessor 8051Microprocessor 8051
Microprocessor 8051
 
Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontroller
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller features
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8051 presentation
8051 presentation8051 presentation
8051 presentation
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt i
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
8051 Micro Controller
8051 Micro Controller 8051 Micro Controller
8051 Micro Controller
 
AT89 S52
AT89 S52AT89 S52
AT89 S52
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
MICROCONTROLLER 8051
MICROCONTROLLER 8051MICROCONTROLLER 8051
MICROCONTROLLER 8051
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
89s52 2
89s52 289s52 2
89s52 2
 
8051microcontroller
8051microcontroller 8051microcontroller
8051microcontroller
 

En vedette

En vedette (20)

Task 3
Task 3Task 3
Task 3
 
Condori qb
Condori qbCondori qb
Condori qb
 
Visual resume
Visual resume Visual resume
Visual resume
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Lesly
LeslyLesly
Lesly
 
выставкаа2
выставкаа2выставкаа2
выставкаа2
 
Кондрина С.Н.
Кондрина С.Н.Кондрина С.Н.
Кондрина С.Н.
 
The 8051 microcontroller and embedded systems using assembly and c 2nd-ed
The 8051 microcontroller and embedded systems using assembly and c 2nd-edThe 8051 microcontroller and embedded systems using assembly and c 2nd-ed
The 8051 microcontroller and embedded systems using assembly and c 2nd-ed
 
Microcontroller poster
Microcontroller posterMicrocontroller poster
Microcontroller poster
 
8051 micro controller
8051 micro controller8051 micro controller
8051 micro controller
 
Dugan, Samuel - Resume FINAL
Dugan, Samuel - Resume FINALDugan, Samuel - Resume FINAL
Dugan, Samuel - Resume FINAL
 
Microcontroller in automobile and applications
Microcontroller in automobile and applicationsMicrocontroller in automobile and applications
Microcontroller in automobile and applications
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
інклюзивна освіта1
інклюзивна освіта1інклюзивна освіта1
інклюзивна освіта1
 
Pn junction diode
Pn junction diodePn junction diode
Pn junction diode
 
Applications of 8051 microcontrollers
Applications of 8051 microcontrollersApplications of 8051 microcontrollers
Applications of 8051 microcontrollers
 
Diode
DiodeDiode
Diode
 
Diodes
DiodesDiodes
Diodes
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
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
 

Similaire à 8051 basics

microcontroller-8051-ppt
 microcontroller-8051-ppt microcontroller-8051-ppt
microcontroller-8051-pptjhcid
 
microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)jhcid
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERAnkita Jaiswal
 
PRESENTATION OF MICROCONTROLLER
PRESENTATION OF MICROCONTROLLERPRESENTATION OF MICROCONTROLLER
PRESENTATION OF MICROCONTROLLERAviSharma63
 
Embedded training report(mcs 51)
Embedded training report(mcs 51)Embedded training report(mcs 51)
Embedded training report(mcs 51)Gurwinder Singh
 
What is a microcontroller
What is a microcontrollerWhat is a microcontroller
What is a microcontrollerparassini
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtechsangeetha rakhi
 
Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...Claude Ndayisenga
 
Features of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processorsFeatures of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processorsVikas Dongre
 
Solution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsSolution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsmanishpatel_79
 
Sistem mikroprosessor
Sistem mikroprosessorSistem mikroprosessor
Sistem mikroprosessorfahmihafid
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxSKWriters
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf818Farida
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded SystemKaran Thakkar
 

Similaire à 8051 basics (20)

microcontroller-8051-ppt
 microcontroller-8051-ppt microcontroller-8051-ppt
microcontroller-8051-ppt
 
microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
 
Uc1(vii sem)
Uc1(vii sem)Uc1(vii sem)
Uc1(vii sem)
 
ritesh (3)
ritesh (3)ritesh (3)
ritesh (3)
 
PRESENTATION OF MICROCONTROLLER
PRESENTATION OF MICROCONTROLLERPRESENTATION OF MICROCONTROLLER
PRESENTATION OF MICROCONTROLLER
 
Embedded training report(mcs 51)
Embedded training report(mcs 51)Embedded training report(mcs 51)
Embedded training report(mcs 51)
 
Vinod ppt on es31 08 15
Vinod ppt on es31 08 15Vinod ppt on es31 08 15
Vinod ppt on es31 08 15
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
What is a microcontroller
What is a microcontrollerWhat is a microcontroller
What is a microcontroller
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtech
 
Module 1.pdf
Module 1.pdfModule 1.pdf
Module 1.pdf
 
Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...
 
Features of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processorsFeatures of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processors
 
Solution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsSolution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systems
 
Sistem mikroprosessor
Sistem mikroprosessorSistem mikroprosessor
Sistem mikroprosessor
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptx
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded System
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 

Dernier

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Dernier (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

8051 basics

  • 2. What is an EmbeddedSystem?  Application-specific systems which contain hardware and software tailored for a particular task and are generally part of a larger system.  Characteristics  Are dedicated to a particular application.  Include processors dedicated to specific functions.  Represent a subset of reactive (responsive to external inputs) systems.  Contain real-time constraints.
  • 3. EmbeddedSystems Applications Aerospace Navigation systems, automatic landing systems, flight attitude controls, engine controls, space exploration (e.g.. The mars pathfinder) Automotive Fuel injection control, passenger environmental controls, anti-locking braking systems, air bag controls, GPS mapping, cruise control Children's toys Video games, MindStone system Communication Satellites, network routers, switches, hubs
  • 4. Computer Peripherals Printers, scanners, keyboards, displays, modems, hard disk drives, CD-ROM drives, USB Home Dishwashers, microwave ovens, VCR’s, DVD, televisions, stereos, fire/security alarm systems, lawn sprinkler controls, thermostats, digital cameras, clock radios, cell phones Industrial Elevator controls, surveillance systems, robots Instrumentation Data collection, oscilloscopes, signal generators, signal analyzers, power supplies EmbeddedSystems Applications
  • 5. Medical CT, One touch glucose meter, almost all medical facility Office Automation FAX machines, copiers, telephones, Personal PDA’s, pagers, cell phones, video games, Ipod, MP3 players EmbeddedSystems Applications
  • 6. Essential Components Essential components :- - Microcontroller / DSP core - Sensors - Converter ( A-D and D-A ) - Actuators - Memory (on-chip and off-chip ) - Communication path with interfacing environment
  • 7. Why do we need to learn Microcontrollers ? • Its not an exaggeration if I say that ,today there is no electronic gadget on the earth which is designed without a Microcontroller. Ex: communication devices, digital entertainment, portable devices etc… Not believable ??? See the next slide
  • 8. • Personal information products: Cell phone, pager, watch, pocket recorder, calculator • Laptop components: mouse, keyboard, modem, fax card, sound card, battery charger • Home appliances: door lock, alarm clock, thermostat, air conditioner, TV remote, VCR, small refrigerator, exercise equipment, washer/dryer, microwave oven • Industrial equipment: Temperature/pressure controllers, Counters, timers, RPM Controllers • Toys: video games, cars, dolls, etc.
  • 9. So, A good designer should always know what type of controller he/she is using ,their architecture, advantages , disadvantages , ways to reduce production costs and product reliability etc….
  • 10. Then What is a Microcontroller ? • A smaller computer • On-chip RAM, ROM, I/O ports... • Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X RAM ROM I/O Port Timer Serial COM Port CPU A single chip Microcontroller
  • 11. How is it different from a Microprocessor ?? CPU for Computers No RAM, ROM, I/O on CPU chip itself Example:Intel’s x86, Motorola’s 680x0 CPU General- Purpose Micro- processor RAM ROM I/O Port Timer Serial COM Port Data Bus Address Bus
  • 12. Microprocessor  CPU is stand-alone, RAM, ROM, I/O, timer are separate  designer can decide on the amount of ROM, RAM and I/O ports.  expansive  versatility  general-purpose Microcontroller • CPU, RAM, ROM, I/O and timer are all on a single chip • fix amount of on-chip ROM, RAM, I/O ports • Highly bit addressable • for applications in which cost, power and space are critical • single-purpose Microprocessor vs. Microcontroller
  • 13. EVOLUTION Flashback !!!! In the year 1976, Motorola created a Microprocessor chip called 6801 which replaced its brother 6800 with certain add-on chips to make a computer. This paved the way for the new revolution in the history of chip design and gave birth to a new entity called MICROCONTROLLER. The INTEL bagged the credit of producing the first Microcontroller 8048 with a CPU and 1K bytes of EPROM, 64 Bytes of RAM an 8-Bit Timer and 27 I/O pins in 1976.
  • 14. Evolution contd… • Then followed the most popular controller 8051 in the year 1980 with 4K bytes of ROM,128 Bytes of RAM , a serial port, two 16-bit Timers , and 32 I/O pins. • The 8051 family has many additions and improvements over the years and remains a most soughtafter tool for todays circuit designers. • The same INTEL introduced a 16 bit controller 8096 in the year 1982
  • 15. • Later INTEL introduced 80c196 series of 16-bit microcontrollers for mainly industrial applications • Microchip, another company has introduced a microcontroller PIC 16C64 an 8-bit in the year 1985. • 32-bit microcontrollers have been developed by IBM and Motorola-MPC 505 is a 32-bit RISC controller of Motorola • The 403 GA is a 32 -bit RISC embedded controller of IBM
  • 16. ARM Controllers • In recent times ARM company (Advanced Risc machines) has developed and introduced 32 bit controllers which are highend application devices,especially communication devices like mobiles , ipods etc..(Refer www.arm.com)
  • 18. Microcontrollers from different manufacturers •Atmel •ARM •Intel •8-bit •8XC42 •MCS48 •MCS51 •8xC251 •16-bit •MCS96 •MXS296 •National Semiconductor •COP8 •Microchip •12-bit instruction PIC •14-bit instruction PIC •PIC16F84 •16-bit instruction PIC •NEC •Motorola •8-bit •68HC05 •68HC08 •68HC11 •16-bit •68HC12 •68HC16 •32-bit •683xx •Texas Instruments •TMS370 •MSP430 •Zilog •Z8 •Z86E02
  • 19. MCS-51 “Family” of Microcontollers Feature 8031 8051 8052 8751 ROM NO 4kB 8kB 4kB UV Eprom RAM (Bytes) 128 128 256 128 TIMERS 2 2 3 2 I/O PINS 32 32 32 32 SERIAL PORTS 1 1 1 1 INTERRUPT 6 6 8 6 SOURCES
  • 20. Microcontroller Architectures CPU Program + Data Address Bus Data Bus Memory Von Neumann Architecture CPU Program Address Bus Data Bus Harvard Architecture Memory Data Address Bus Fetch Bus 0 0 0 2n
  • 21. Important Features of 8051 • 4K bytes ROM • 128 bytes RAM • Four 8-bit I/O ports • Two 16-bit timers • Serial interface • 64K external code memory space • 64K data memory space
  • 22. “Original” 8051 Microcontroller Oscillator and timing 4096 Bytes Program Memory (ROM) 128 Bytes Data Memory (RAM) Two 16 Bit Timer/Event Counters 8051 CPU 64 K Byte Bus Expansion Control Programmable I/O Programmable Serial Port Full Duplex UART Synchronous Shifter Internal data bus External interrupts subsystem interrupts Control Parallel ports Address Data Bus I/O pins Serial Input Serial Output
  • 23. Pin Description of the 8051 • The 8051 is a 40 pin device, but out of these 40 pins, 32 are used for I/O. • 24 of these are dual purpose, i.e. they can operate as I/O or a control line or as part of address or date bus.
  • 24. Inside Architecture of 8051 24 CPU On-chip RAM On-chip ROM for program code 4 I/O Ports Timer 0 Serial Port Inside the 8051 Microcontroller Block Diagram OSC Interrupt Control External interrupts Timer 1 Timer/Counter Bus Control TxD RxDP0 P1 P2 P3 Address/Data Counter Inputs
  • 26.  Three criteria in Choosing a Microcontroller  Meeting the computing needs of the task efficiently and cost effectively. • Speed, the amount of ROM and RAM, the number of I/O ports and timers, size, packaging, power consumption. • Easy to upgrade. • Cost per unit.  Availability of software development tools. • Assemblers, debuggers, C compilers, emulator, simulator, technical support.  Wide availability and reliable sources of the microcontrollers. 26
  • 27. 27
  • 28. A Pin on Port 1 28 D Q Ck Q Vcc Load (L1) Read latch Read pin Write to latch Internal CPU bus M 1 P1.X pinP1.X TB1 TB2
  • 29. A Pin of Port 0 29 D Q Clk Q Read latch Read pin Write to latch Internal CPU bus M 1 P0.X pinP0.X TB1 TB2
  • 30. Memory mapping in 8051 30 ROM memory map in 8051 family 0000H 0FFFH 0000H 1FFFH 0000H 7FFFH 8751 AT89C51 8752 AT89C52 4k DS5000-32 8k 32k from Atmel Corporation from Dallas Semiconductor
  • 32. Advantages  It is a ‘mid-level’, with ‘high-level’ features (such as support for functions and modules), and ‘low-level’ features (such as good access to hardware via pointers)  C is the most common Embedded language 85%, of embedded applications are coded in C.  It directly manipulates the hardware and memory addresses.  Cx51 Cross compiler supports all of the ANSI Standard C directives. 32
  • 33. Data Types Data types Bits Bytes Value range • Bit 1 0 to 1 • Signed char 8 1 -128 to +127 • Unsigned char 8 1 0 to 255 • Signed short 16 2 -32768 to +32767 • Unsigned short 16 2 0 to 65535 • Signed int 16 2 -32768 to +32767 • Unsigned int 16 2 0 to 65535 • Signed long 32 4 -2147483648 to 2147483647 • Unsigned long 32 4 0 to 4294967295 • Float 32 4 ±1.175494E-38 to ±3.402823E+38 • sbit 1 0 to 1 • sfr 8 1 0 to 255 33
  • 34. 8051 Memory Areas • The 8051 architecture supports a number of physically separate memory areas for program and data. Each memory area offers certain advantages and disadvantages.  Program Memory code  Internal Data memory bdata, data, idata  External Data memory xdata, pdata 34
  • 35. 35  code: Program memory (64 Kbytes); accessed by opcode MOVC A, @A+DPTR.  data: Directly addressable internal data memory; fastest access to full internal address space (256 bytes).  idata: Indirectly addressable internal data memory; accessed across the internal address space (128 bytes).  bdata: Bit-addressable internal data memory; allows mixed bit and byte access (16 bytes).  xdata: External data memory (64 Kbytes); accessed by opcode MOVX @DPTR.  pdata: Paged (256 bytes) external data memory; accessed by opcode . MOVX @Rn. Explicitly declaredMemorytypes
  • 36. 36 Memory models  The memory model determines which default memory type to use for automatic variables, and declarations with no explicit memory type specifier.  If the memory type specifier is omitted in a variable declaration, the default or implicit memory type is automatically selected.  Automatic variables which cannot be located in registers are also stored in the default memory area.  The default memory type is determined by the SMALL, COMPACT and LARGE compiler control directives.
  • 37. Small Model: Internal RAM128 bytes  All variables, by default, reside in the internal data memory of the 8051 system.  It is the same as if they were declared explicitly using the data memory --type specifier.  Variable access is very efficient. Stack size is critical because the real stack size depends upon the nesting depth of the various functions.  Using this memory model, the number of global variables must be kept to a minimum to allow. However the amount of space required for the stack must be kept in mind. 37
  • 38. Compact Model: RAM256bytes off-chip  All variables, by default, reside in one page of external data memory.  It is as if they were explicitly declared using the pdata memory type specifier. This memory model can accommodate a maximum of 256 bytes of variables. The limitation is due to the addressing scheme used, which is indirect through registers R0 and R1 (@R0, @R1. 38
  • 39. Compact Model: RAM256bytes off-chip  The compact model is rarely used for an entire program, but more  usual in combination with the SMALL switch reserved for interrupt routines.  COMPACT is especially useful for programs with a large number of  medium speed 8 bit variables. 39
  • 40. Large Model: Total RAMup to 64KB In this model, all variables, by default, reside in external data memory (up to 64 Kbytes).  It is the same as if they were explicitly declared using the xdata memory type specifier.  Memory access through this data pointer is inefficient, especially on variables with a length of two or more bytes.  This type of data access mechanism generates more code than the small or compact models, Permits slow access to a very large memory space . 40
  • 41. Interfacing Dip Switches andInterfacing LEDs
  • 43. What is a Keypad ?  Collection of keys interfaced to the microcontroller  Arranged in the form of two dimensional matrix  Matrix arrangement used for minimizing the number of port lines  Junction of each row and column forms the key
  • 49.
  • 50. Closed loop control system- Temperature control example
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 60. Single Axis solar tracking system