SlideShare a Scribd company logo
4.1 MICRO CONTROLLERS
4.2 8051
MICROCONTROLLERS
UNIT 4
4.1 Micro Controllers
OUTLINE
1) Embedded system and general purpose systems
2) What is microcontroller?
3) What are different types of microcontroller?
4) How to select controller for a given application?
5) Applications..
EMBEDDED SYSTEM AND
GENERAL PURPOSE COMPUTERS
System:-
A system is an arrangement in which all its unit assemble
work together according to a set of rules. It can also be
defined as a way of working, organizing or doing one or
many tasks according to a fixed plan.
For example, a watch is a time displaying system.
If one of its parts fails, the watch will stop working. So we can say, in
a system, all its subcomponents depend on each other.
EMBEDDED SYSTEM
• Embedded means something that is attached to another thing.
• An embedded system can be thought of as a computer hardware
system having software embedded in it.
• An embedded system can be an independent system or it can be
a part of a large system.
• An embedded system is a microcontroller or microprocessor
based system which is designed to perform a specific task.
• For example, a fire alarm is an embedded system; it will sense
only smoke.
• An embedded system has three components −
• It has hardware.
• It has application software.
• It has Real Time Operating system (RTOS)
• RTOS defines the way the system works. It sets the rules
during the execution of application program.
• A small scale embedded system may not have RTOS.
INTRODUCTION TO
MICROCONTROLLERS
•Microprocessor = CPU on a single
chip.
•> ALU + registers + control +…
•Micro-computer = small computer
•uP + I/O + memory + peripheral +
…
• Microcontroller (uC)
A Microprocessor System
Contains the same 6 basic components:
–Arithmetic logic unit (ALU)
–Register array
–Control unit
–Memory
–Input unit
–Output unit
Basic Microprocessor Systems
MICROPROCESSOR
• Microprocessor: a CPU on a single
integrated chip (IC)
• a special type of CPU
• The brain of a computer
• E.g.:
• – 8086, 80286, 80386, 80486,
Pentium, Core 2 Duo, Core 2
Quad, K5, K6, Atholon, Atholon
64, Opteron, Phenon, PowerPC
G4, PowerPC G5, Xenon,
Broadway, Cell, …
• Contains no RAM, no ROM, no I/O
ports on chip.
MICROCONTROLLERS
CPU
ROM RAM
I/O
A single chip
Subsystems:
Timers, Counters, Analog
Interfaces, I/O interfaces
Memory
MICROCONTROLLER :
• A microprocessor, and RAM, ROM, I/O ports, and
timer on a single chip. Also called MCU
(MicroController Unit)
• , uC
• “Computer on a chip”
• Usually not as powerful as general purpose
microprocessor
• Low power consumption, small in size, low cost.
• A lot of MCUs are application specific (as against
the general purpose microprocessor).μC
DIFFERENCE BETWEEN ΜP AND ΜC
Sr. No
µP µC
1 Several Instructions for moving Data from
external memory to CPU.
One or two instructions for
moving the data from
external memory to CPU.
2 In µP few pins are multi functioned. In µC large number of
pins are multi
functioned.
3 Designer can decide on the amount of
ROM, RAM and I/O ports.
Fixed program and data
memory.
4 Uses different ICs for memory and I/O Inbuilt Memory and I/O.
5 No Inbuilt timer. Inbuilt timer is there.
1. 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
2. Availability of software development tools
• assemblers, debuggers, C compilers, emulator,
simulator, technical support
3. Wide availability and reliable sources of the
microcontrollers.
Three criteria in Choosing a Microcontroller
– Speed
– Power consumption
– Amount of RAM and ROM on chip
– Number of I/O pins
– Cost per unit
– Packaging
HOW DO WE DECIDE WHICH MCU TO
USE?
KAGES
PLCC
Plastic
Leaded
Chip
Carrier
Cygnal 8051 MCU in
TQFP64.(Thin Quad Flat Pack)
PDIP: Plastic Dual In Line Package
BASIC MICROPROCESSOR
SYSTEMS
Architecture uses physically separate memories for
their instructions and data, requiring dedicated buses
for each of them. Instructions and operands can
therefore be fetched simultaneously.
Different program and data bus widths are possible,
allowing program and data memory to be better
optimized to the architectural requirements.
E.g.: If the instruction format requires 14 bits then program bus
and memory can be made 14-bit wide, while the data bus and
data memory remain 8-bit wide.
IF A DEVICE OR AN APPLICATION INVOLVES
MEASURING, STORING, CALCULATING,
CONTROLLING OR DISPLAYING INFORMATION,
THEN DEVICE CONTAINS A MICROCONTROLLER IN
IT.
4.2 8051 MICROCONTROLLERS
Brief History of 8051
• The first microprocessor 4004 was invented by Intel
Corporation.
• 8085 and 8086 microprocessors were also invented
by Intel.
• In 1981, Intel introduced an 8-bit microcontroller
called the 8051.
• It was referred as system on a chip because it had
128 bytes of RAM, 4K byte of on-chip ROM, two
timers, one serial port, and 4 ports (8-bit wide), all on
a single chip.
8051 BASIC COMPONENT
• Central Processing Unit (CPU)
• Program Memory (ROM – Read Only Memory)
• Data Memory (RAM – Random Access Memory)
• Timers and Counters
• I/O Ports (I/O – Input/Output)
• Serial Communication Interface
• Clock Circuit (Oscillator Circuit)
• Interrupt Mechanism
RAM
I/O
Port
counter
Timer
Serial
COM
Port
Microcontroller
CPU
A single chip
ROM
BLOCK DIAGRAM
CPU
Interrupt
Control
OSC Bus
Control
4k
ROM
Timer 1
Timer 2
Serial
128 bytes
RAM
4 I/O Ports
TXD RXD
External Interrupts
P0 P2 P1 P3
Addr/Data
BASIC COMPONENTS PRESENT INSIDE
8051 MICROCONTROLLER
ARCHITECTURE ARE:
1. CPU (Central Processing Unit):
• CPU act as a mind of any processing machine. It synchronizes and
manages all processes that are carried out in microcontroller.
• It interprets the program stored in ROM and carries out from storage and
then performs it projected duty.
• CPU manage the different types of registers available in 8051
microcontroller.
2. Interrupts: Interrupts is a sub-routine call that given by the
microcontroller when some other program with high priority is request for
acquiring the system buses then interrupts occur in current running
program.
• interrupts provide a method to postpone or delay the current
process, performs a sub-routine task and then restart the
standard program again.
Types of interrupt in 8051 Microcontroller:
The five sources of interrupts in 8051 Microcontroller:
1) Timer 0 overflow interrupt - TF0
2) Timer 1 overflow interrupt - TF1
3) External hardware interrupt - INT0
4) External hardware interrupt - INT1
5) Serial communication interrupt - RI/TI
MEMORY:
1. For operation Micro-controller required a program.
2. This program guides the microcontroller to perform the specific
tasks.
3. This program installed in microcontroller required some on chip
memory for the storage of the program.
4. Microcontroller also required memory for storage of data and
operands for the short duration.
5. In microcontroller 8051 there is code or program memory of 4 KB
that is it has 4 KB ROM and it also comprise of data memory
(RAM) of 128 bytes.
BUS :
1. Bus is a group of wires which uses as a
communication canal or acts as means of
data transfer.
2. The different bus configuration includes 8,
16 or more cables. Therefore, a bus can
bear 8 bits, 16 bits all together.
• Timers/Counters
• Timers are used to create a time gap or delay between two events.
• The timer produces the delay according to the demand of the processor and sends the signal to the
processor once the respective delay gets produced.
• As the microcontroller is digital circuit therefore it needs timer for their operation.
• Oscillator:
• To perform timer operation inside microcontroller it required externally connected or on-chip
oscillator.
• Microcontroller is used inside an embedded system for managing the function of devices.
• Therefore, 8051 uses the two 16 bit counters and timers.
• For the operation of this timers and counters the oscillator is used inside microcontroller.
• Input/Output Port
• 8051 consists of 4 parallel ports of 8 bit each thereby providing
32 input-output pins.
• All the 4 ports function bidirectionally i.e., either input or
output according to the software control.
ACCUMULATOR
• ACC is the accumulator register. It holds most of the
results of mathematical and logical operations of the
8051.
• It is also used for all data transfer between the 8051 and
any external memory.
Register B
The register B is Used during multiply and divide
operations.
Serial Data Buffer
When transmitting data ,it holds the data to be
transmitted and while receiving ,it holds the receiving
data.
1. An 8-bit CPU with two registers A (ACC or accumulator) and B
2. Internal Flash ROM of 8KB – It is a flash memory that supports in – system
programming.
3. Internal RAM of 256 bytes – The first 128 Bytes of the RAM i.e. 00H to 7FH is again
divided in to 4 banks with 8 registers (R0 – R7) in each bank, 16 bit addressable
registers and 80 general purpose registers.
4. The higher 128 Bytes of the RAM i.e. 80H to FFH consists of Special Function
Registers (SFR) which are used to control different peripherals such as Timers, Serial
Port, all I/O Ports, etc.
5. 32 I/O Pins – Arranged as 4 Ports: P0, P1, P2 and P3
6. 8-bit Stack Pointer (SP) and Processor Status Word (PSW)
7. 16-bit Program Counter (PC) and Data Pointer (DPTR)
8. Two 16-bit timers – T0 and T1
9. Interrupts – Two external and three internal
10. Oscillator and clock circuit
11. Serial Data Transmitter and Receiver for Full-Duplex operation – SBUF
12. Control Registers – SCON, PCON, TCON, TMOD, IP and IE
8051
SCHEMATIC
PIN OUT
PORT
1. Term "port" refers to a group of pins on a microcontroller
which can be accessed simultaneously, or on which we can
set the desired combination of zeros and ones, or read from
them an existing status.
2. Physically, port is a register inside a microcontroller which is
connected by wires to the pins of a microcontroller. Ports
represent physical connection of Central Processing Unit with
an outside world.
3. Microcontroller uses them in order to monitor or control
other components or devices.
4. Due to functionality, some pins have twofold roles.
5. All port pins can be designated as input or output, according
to the needs of a device that's being developed.
IMPORTANT PINS (IO PORTS)
• One of the most useful features = 4 I/O ports (P0 - P3)
 Port 0 :-P0 = (P0.0 - P0.7)
8-bit R/W - General Purpose I/O
low byte address and data bus for external
memory
 Port 1 :- P1= (P1.0 - P1.7)
Only 8-bit R/W - General Purpose I/O
 Port 2 :- P2 = (P2.0 - P2.7)
8-bit R/W - General Purpose I/O
high byte address for external memory
 Port 3:- P3 = (P3.0 - P3.7)
General Purpose I/O
Timers(T0,T1) – ext. int (INT0, INT1) – Serial
(TXD, RXD)- RD,WR
Each port can be used as input or output (bi-direction)
PORT 3 ALTERNATE FUNCTIONS
IMPORTANT PINS
• Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other functions. It is
internally pulled up, bi-directional I/O port.
• Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values.
• Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like interrupts, timer
input, control signals, serial communication signals RxD and TxD, etc.
• Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system clock.
• Pin 20 − This pin provides the power supply to the circuit.
• Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order address bus signals
are also multiplexed using this port.
• Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a signal from the
external program memory.
• Pin 30 − This is EA pin which stands for External Access input. It is used to enable/disable the external
memory interfacing.
• Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to demultiplex the address-
data signal of port.
• Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order address and data
bus signals are multiplexed using this port.
• Pin 40 − This pin is used to provide power supply to the circuit.
OSCILLATOR CIRCUIT
• Oscillator circuit is used for providing a
microcontroller with a clock. Clock is needed
so that microcontroller could execute a
program or program instructions.
Machine cycle
• 8051 Clock and Instruction Cycle In 8051, one instruction
cycle consists of twelve (12) clock cycles. Instruction cycle
is sometimes called as Machine cycle by some authors.
•Instruction cycle of 8051
•In 8051, each instruction cycle has six states (S 1 - S 6 ).
•Each state has two pulses (P1 and P2)
micro controllers 1.ppt

More Related Content

Similar to micro controllers 1.ppt

8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollersnehapvs
 
Module -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxModule -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptx
DrVaibhavMeshram
 
I. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptI. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.ppt
HAriesOa1
 
introduction to microprocessors
introduction to microprocessorsintroduction to microprocessors
introduction to microprocessors
sudheerkethamreddy
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentation
xavierpaulino
 
PILOT Session for Embedded Systems
PILOT Session for Embedded Systems PILOT Session for Embedded Systems
PILOT Session for Embedded Systems
Mohamed Al-Emam, PMP®, CAP®
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
Ankita Jaiswal
 
Uc1(vii sem)
Uc1(vii sem)Uc1(vii sem)
Uc1(vii sem)
Ankita Jaiswal
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
818Farida
 
Microcontroller overview 1
Microcontroller overview 1Microcontroller overview 1
Microcontroller overview 1
Sally Salem
 
AT89 S52
AT89 S52AT89 S52
AT89 S52
estherkakani
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentals
JLoknathDora
 
8051 slide
8051 slide8051 slide
8051 slide
VenugopalaRaoAS
 
POA_Unit 5.pptx
POA_Unit 5.pptxPOA_Unit 5.pptx
POA_Unit 5.pptx
GAURAVWANI11
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)
Sahil Gupta
 
Micro controller
Micro controllerMicro controller
Micro controller
Shrikunj Patel
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollers
EdwardOmondi4
 
Module 5 embedded systems,8051
Module 5 embedded systems,8051Module 5 embedded systems,8051
Module 5 embedded systems,8051
Deepak John
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor
Mrunal Deshkar
 
Ee6008 mcbsd notes
Ee6008 mcbsd notesEe6008 mcbsd notes
Ee6008 mcbsd notes
vlkumashankardeekshi th
 

Similar to micro controllers 1.ppt (20)

8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
Module -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxModule -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptx
 
I. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptI. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.ppt
 
introduction to microprocessors
introduction to microprocessorsintroduction to microprocessors
introduction to microprocessors
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentation
 
PILOT Session for Embedded Systems
PILOT Session for Embedded Systems PILOT Session for Embedded Systems
PILOT Session for Embedded Systems
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
 
Uc1(vii sem)
Uc1(vii sem)Uc1(vii sem)
Uc1(vii sem)
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
 
Microcontroller overview 1
Microcontroller overview 1Microcontroller overview 1
Microcontroller overview 1
 
AT89 S52
AT89 S52AT89 S52
AT89 S52
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentals
 
8051 slide
8051 slide8051 slide
8051 slide
 
POA_Unit 5.pptx
POA_Unit 5.pptxPOA_Unit 5.pptx
POA_Unit 5.pptx
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollers
 
Module 5 embedded systems,8051
Module 5 embedded systems,8051Module 5 embedded systems,8051
Module 5 embedded systems,8051
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor
 
Ee6008 mcbsd notes
Ee6008 mcbsd notesEe6008 mcbsd notes
Ee6008 mcbsd notes
 

Recently uploaded

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 

micro controllers 1.ppt

  • 1. 4.1 MICRO CONTROLLERS 4.2 8051 MICROCONTROLLERS UNIT 4
  • 3. OUTLINE 1) Embedded system and general purpose systems 2) What is microcontroller? 3) What are different types of microcontroller? 4) How to select controller for a given application? 5) Applications..
  • 4. EMBEDDED SYSTEM AND GENERAL PURPOSE COMPUTERS System:- A system is an arrangement in which all its unit assemble work together according to a set of rules. It can also be defined as a way of working, organizing or doing one or many tasks according to a fixed plan. For example, a watch is a time displaying system. If one of its parts fails, the watch will stop working. So we can say, in a system, all its subcomponents depend on each other.
  • 5. EMBEDDED SYSTEM • Embedded means something that is attached to another thing. • An embedded system can be thought of as a computer hardware system having software embedded in it. • An embedded system can be an independent system or it can be a part of a large system. • An embedded system is a microcontroller or microprocessor based system which is designed to perform a specific task. • For example, a fire alarm is an embedded system; it will sense only smoke.
  • 6.
  • 7.
  • 8. • An embedded system has three components − • It has hardware. • It has application software. • It has Real Time Operating system (RTOS) • RTOS defines the way the system works. It sets the rules during the execution of application program. • A small scale embedded system may not have RTOS.
  • 9.
  • 10. INTRODUCTION TO MICROCONTROLLERS •Microprocessor = CPU on a single chip. •> ALU + registers + control +… •Micro-computer = small computer •uP + I/O + memory + peripheral + … • Microcontroller (uC)
  • 11. A Microprocessor System Contains the same 6 basic components: –Arithmetic logic unit (ALU) –Register array –Control unit –Memory –Input unit –Output unit Basic Microprocessor Systems
  • 12. MICROPROCESSOR • Microprocessor: a CPU on a single integrated chip (IC) • a special type of CPU • The brain of a computer • E.g.: • – 8086, 80286, 80386, 80486, Pentium, Core 2 Duo, Core 2 Quad, K5, K6, Atholon, Atholon 64, Opteron, Phenon, PowerPC G4, PowerPC G5, Xenon, Broadway, Cell, … • Contains no RAM, no ROM, no I/O ports on chip.
  • 13. MICROCONTROLLERS CPU ROM RAM I/O A single chip Subsystems: Timers, Counters, Analog Interfaces, I/O interfaces Memory
  • 14. MICROCONTROLLER : • A microprocessor, and RAM, ROM, I/O ports, and timer on a single chip. Also called MCU (MicroController Unit) • , uC • “Computer on a chip” • Usually not as powerful as general purpose microprocessor • Low power consumption, small in size, low cost. • A lot of MCUs are application specific (as against the general purpose microprocessor).μC
  • 15. DIFFERENCE BETWEEN ΜP AND ΜC Sr. No µP µC 1 Several Instructions for moving Data from external memory to CPU. One or two instructions for moving the data from external memory to CPU. 2 In µP few pins are multi functioned. In µC large number of pins are multi functioned. 3 Designer can decide on the amount of ROM, RAM and I/O ports. Fixed program and data memory. 4 Uses different ICs for memory and I/O Inbuilt Memory and I/O. 5 No Inbuilt timer. Inbuilt timer is there.
  • 16.
  • 17. 1. 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 2. Availability of software development tools • assemblers, debuggers, C compilers, emulator, simulator, technical support 3. Wide availability and reliable sources of the microcontrollers. Three criteria in Choosing a Microcontroller
  • 18. – Speed – Power consumption – Amount of RAM and ROM on chip – Number of I/O pins – Cost per unit – Packaging HOW DO WE DECIDE WHICH MCU TO USE?
  • 19.
  • 20. KAGES PLCC Plastic Leaded Chip Carrier Cygnal 8051 MCU in TQFP64.(Thin Quad Flat Pack) PDIP: Plastic Dual In Line Package
  • 21. BASIC MICROPROCESSOR SYSTEMS Architecture uses physically separate memories for their instructions and data, requiring dedicated buses for each of them. Instructions and operands can therefore be fetched simultaneously. Different program and data bus widths are possible, allowing program and data memory to be better optimized to the architectural requirements. E.g.: If the instruction format requires 14 bits then program bus and memory can be made 14-bit wide, while the data bus and data memory remain 8-bit wide.
  • 22. IF A DEVICE OR AN APPLICATION INVOLVES MEASURING, STORING, CALCULATING, CONTROLLING OR DISPLAYING INFORMATION, THEN DEVICE CONTAINS A MICROCONTROLLER IN IT.
  • 24. Brief History of 8051 • The first microprocessor 4004 was invented by Intel Corporation. • 8085 and 8086 microprocessors were also invented by Intel. • In 1981, Intel introduced an 8-bit microcontroller called the 8051. • It was referred as system on a chip because it had 128 bytes of RAM, 4K byte of on-chip ROM, two timers, one serial port, and 4 ports (8-bit wide), all on a single chip.
  • 25. 8051 BASIC COMPONENT • Central Processing Unit (CPU) • Program Memory (ROM – Read Only Memory) • Data Memory (RAM – Random Access Memory) • Timers and Counters • I/O Ports (I/O – Input/Output) • Serial Communication Interface • Clock Circuit (Oscillator Circuit) • Interrupt Mechanism RAM I/O Port counter Timer Serial COM Port Microcontroller CPU A single chip ROM
  • 26. BLOCK DIAGRAM CPU Interrupt Control OSC Bus Control 4k ROM Timer 1 Timer 2 Serial 128 bytes RAM 4 I/O Ports TXD RXD External Interrupts P0 P2 P1 P3 Addr/Data
  • 27.
  • 28. BASIC COMPONENTS PRESENT INSIDE 8051 MICROCONTROLLER ARCHITECTURE ARE: 1. CPU (Central Processing Unit): • CPU act as a mind of any processing machine. It synchronizes and manages all processes that are carried out in microcontroller. • It interprets the program stored in ROM and carries out from storage and then performs it projected duty. • CPU manage the different types of registers available in 8051 microcontroller. 2. Interrupts: Interrupts is a sub-routine call that given by the microcontroller when some other program with high priority is request for acquiring the system buses then interrupts occur in current running program.
  • 29. • interrupts provide a method to postpone or delay the current process, performs a sub-routine task and then restart the standard program again. Types of interrupt in 8051 Microcontroller: The five sources of interrupts in 8051 Microcontroller: 1) Timer 0 overflow interrupt - TF0 2) Timer 1 overflow interrupt - TF1 3) External hardware interrupt - INT0 4) External hardware interrupt - INT1 5) Serial communication interrupt - RI/TI
  • 30. MEMORY: 1. For operation Micro-controller required a program. 2. This program guides the microcontroller to perform the specific tasks. 3. This program installed in microcontroller required some on chip memory for the storage of the program. 4. Microcontroller also required memory for storage of data and operands for the short duration. 5. In microcontroller 8051 there is code or program memory of 4 KB that is it has 4 KB ROM and it also comprise of data memory (RAM) of 128 bytes.
  • 31. BUS : 1. Bus is a group of wires which uses as a communication canal or acts as means of data transfer. 2. The different bus configuration includes 8, 16 or more cables. Therefore, a bus can bear 8 bits, 16 bits all together.
  • 32. • Timers/Counters • Timers are used to create a time gap or delay between two events. • The timer produces the delay according to the demand of the processor and sends the signal to the processor once the respective delay gets produced. • As the microcontroller is digital circuit therefore it needs timer for their operation. • Oscillator: • To perform timer operation inside microcontroller it required externally connected or on-chip oscillator. • Microcontroller is used inside an embedded system for managing the function of devices. • Therefore, 8051 uses the two 16 bit counters and timers. • For the operation of this timers and counters the oscillator is used inside microcontroller.
  • 33. • Input/Output Port • 8051 consists of 4 parallel ports of 8 bit each thereby providing 32 input-output pins. • All the 4 ports function bidirectionally i.e., either input or output according to the software control.
  • 34. ACCUMULATOR • ACC is the accumulator register. It holds most of the results of mathematical and logical operations of the 8051. • It is also used for all data transfer between the 8051 and any external memory. Register B The register B is Used during multiply and divide operations. Serial Data Buffer When transmitting data ,it holds the data to be transmitted and while receiving ,it holds the receiving data.
  • 35. 1. An 8-bit CPU with two registers A (ACC or accumulator) and B 2. Internal Flash ROM of 8KB – It is a flash memory that supports in – system programming. 3. Internal RAM of 256 bytes – The first 128 Bytes of the RAM i.e. 00H to 7FH is again divided in to 4 banks with 8 registers (R0 – R7) in each bank, 16 bit addressable registers and 80 general purpose registers. 4. The higher 128 Bytes of the RAM i.e. 80H to FFH consists of Special Function Registers (SFR) which are used to control different peripherals such as Timers, Serial Port, all I/O Ports, etc. 5. 32 I/O Pins – Arranged as 4 Ports: P0, P1, P2 and P3 6. 8-bit Stack Pointer (SP) and Processor Status Word (PSW) 7. 16-bit Program Counter (PC) and Data Pointer (DPTR) 8. Two 16-bit timers – T0 and T1 9. Interrupts – Two external and three internal 10. Oscillator and clock circuit 11. Serial Data Transmitter and Receiver for Full-Duplex operation – SBUF 12. Control Registers – SCON, PCON, TCON, TMOD, IP and IE
  • 37. PORT 1. Term "port" refers to a group of pins on a microcontroller which can be accessed simultaneously, or on which we can set the desired combination of zeros and ones, or read from them an existing status. 2. Physically, port is a register inside a microcontroller which is connected by wires to the pins of a microcontroller. Ports represent physical connection of Central Processing Unit with an outside world. 3. Microcontroller uses them in order to monitor or control other components or devices. 4. Due to functionality, some pins have twofold roles. 5. All port pins can be designated as input or output, according to the needs of a device that's being developed.
  • 38. IMPORTANT PINS (IO PORTS) • One of the most useful features = 4 I/O ports (P0 - P3)  Port 0 :-P0 = (P0.0 - P0.7) 8-bit R/W - General Purpose I/O low byte address and data bus for external memory  Port 1 :- P1= (P1.0 - P1.7) Only 8-bit R/W - General Purpose I/O  Port 2 :- P2 = (P2.0 - P2.7) 8-bit R/W - General Purpose I/O high byte address for external memory  Port 3:- P3 = (P3.0 - P3.7) General Purpose I/O Timers(T0,T1) – ext. int (INT0, INT1) – Serial (TXD, RXD)- RD,WR Each port can be used as input or output (bi-direction)
  • 39. PORT 3 ALTERNATE FUNCTIONS
  • 40. IMPORTANT PINS • Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other functions. It is internally pulled up, bi-directional I/O port. • Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values. • Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like interrupts, timer input, control signals, serial communication signals RxD and TxD, etc. • Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system clock. • Pin 20 − This pin provides the power supply to the circuit. • Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order address bus signals are also multiplexed using this port. • Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a signal from the external program memory. • Pin 30 − This is EA pin which stands for External Access input. It is used to enable/disable the external memory interfacing. • Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to demultiplex the address- data signal of port. • Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order address and data bus signals are multiplexed using this port. • Pin 40 − This pin is used to provide power supply to the circuit.
  • 41. OSCILLATOR CIRCUIT • Oscillator circuit is used for providing a microcontroller with a clock. Clock is needed so that microcontroller could execute a program or program instructions. Machine cycle • 8051 Clock and Instruction Cycle In 8051, one instruction cycle consists of twelve (12) clock cycles. Instruction cycle is sometimes called as Machine cycle by some authors.
  • 42. •Instruction cycle of 8051 •In 8051, each instruction cycle has six states (S 1 - S 6 ). •Each state has two pulses (P1 and P2)