SlideShare a Scribd company logo
1 of 18
By
Mahalakshmi
Embedded Engineer1
What is Microcontroller?
Microcontroller is a
single chip
self-contained computer
single chip devices or single chip computers.
 A programmable single chip which controls a process or
system.
Integrated circuit with pins along each side.
Microcontrollers are used in appliances, automobile,
scientific instrument etc..,
2
Difference between Microcontroller
and Microprocessor
A microcontroller is not the same as a microprocessor.
A microprocessor is a single chip CPU used within other
computer systems. A microcontroller is itself a single chip
computer system.
3
Components
 A microcontroller has seven
main components:
Central processing unit (CPU)
 ROM
 RAM
 Input and Output
 Timer
 Interrupt circuitry
 Buses
4
Architecture
 There are two basic types of architecture:
 Harvard
Von Neumann.
 Microcontrollers most often use a Harvard or a modified
Harvard-based architecture.
5
Von Neumann
Von Neumann architecture has a single, common memory
space where both program instructions and data are stored.
There is a single data bus which fetches both instructions
and data.
The advantage to this architecture lies in its simplicity and
economy.
6
Harvard Architecture
Harvard architecture computers have separate memory areas
for program instructions and data.
There are two or more internal data buses which allow
simultaneous access to both instructions and data.
This speeds up execution time at the cost of more hardware
complexity.
7
The Central Processing Unit
 The central processing unit (CPU) does all the computing.
 It fetches, decodes and executes program instructions and
directs the flow of data to and from memory.
 The CPU performs the calculations required by program
instructions and places the results of these calculations, if
required, into memory space.
8
CPU Components
CPU Contains
Registers
ALU
Address Bus
Data bus
9
Contd..,
 Arithmetic logic unit, or ALU: One part of the CPU is
responsible for performing calculations and executing
instructions. ALU contains the decoder, the sequencer and a
variety of registers.
Decoder: It converts instructions stored in program memory
into codes which the ALU can understand.
Sequencer: It manages the flow of data along the
microcontroller’s data bus.
Registers: It temporarily store vital data which are volatile:
they can change during program execution.
10
Registers
The stack pointer: The stack pointer contains the address of
the next location on the stack. The address in the stack
pointer is decremented when data is pushed on the stack and
incremented when data is popped from the stack.
 The index register: The index register is used to specify an
address when certain addressing modes are used.
11
Contd..,
The program counter: The PC holds the address of the
next instruction in program memory space. It contains the
address of the next instruction the CPU will process. As each
instruction is fetched and processed by the ALU, the CPU
increments the PC.
The accumulator: The accumulator is a register that can
hold operands or results of operations as necessary. The
Microchip devices use the name W (working) register.
12
ROM
 ROM, read only memory, is non-volatile memory used for
program information and permanent data.
 The microcontroller uses ROM memory space to store
program instructions it will execute when it is started or
reset.
13
RAM
RAM, random access memory, is used to write and read
data values as a program runs.
RAM is volatile: if you remove the power supply its
contents are lost. Any variables used in a program are
allocated from RAM.
14
I/O Ports
There are two main port types, parallel and serial, and two
port modes,synchronous and asynchronous.
Parallel I/O requires a data line for each bit,while serial I/O
uses a single line and transfers bits in sequence.
Synchronous I/O is synchronised to a clock while
asynchronous I/O is not.
15
Timer
A timer is a counter that is incremented at a fixed rate when
the system clock pulses.
 A timer/counter can perform several different tasks. The
CPU uses the timer to keep track of time accurately.
The timer can generate a stream of pulses or a single pulse at
different frequencies. It can be used to start and stop tasks at
desired times.
16
Interrupt Circuitry
An interrupt is an event that suspends regular program
operation while the event is serviced by another program.
Interrupts increase the response speed to external events.
When an interrupt is received current operation is
suspended, the interrupt is identified and the controller
jumps (vectors) to an interrupt service routine.
There are two sources of interrupt: hardware and software.
Hardware interrupts include a signal to a pin, timer
overflow, and serial port interrupts. Software interrupts are
commands given by the programmer,
17
Thank You
18

More Related Content

What's hot

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
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessorsobhadevi
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration AKHIL MADANKAR
 
Introduction to microcontroller
Introduction to microcontrollerIntroduction to microcontroller
Introduction to microcontrollerRajib Roy
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training pptNishant Kayal
 
Microprocessor and microcontrollers
Microprocessor and microcontrollersMicroprocessor and microcontrollers
Microprocessor and microcontrollersHiran Gabriel
 
Microprocessor Presentation
Microprocessor PresentationMicroprocessor Presentation
Microprocessor Presentationalaminmasum1
 
Advance Microcontroller AVR
Advance Microcontroller AVRAdvance Microcontroller AVR
Advance Microcontroller AVRDaksh Raj Chopra
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 completeShubham Singh
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basicssagar Ramdev
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051hello_priti
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
introduction to microprocessors
introduction to microprocessorsintroduction to microprocessors
introduction to microprocessorsvishi1993
 

What's hot (20)

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
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration
 
Introduction to microcontroller
Introduction to microcontrollerIntroduction to microcontroller
Introduction to microcontroller
 
8051 memory
8051 memory8051 memory
8051 memory
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Microprocessor and microcontrollers
Microprocessor and microcontrollersMicroprocessor and microcontrollers
Microprocessor and microcontrollers
 
Microprocessor Presentation
Microprocessor PresentationMicroprocessor Presentation
Microprocessor Presentation
 
Advance Microcontroller AVR
Advance Microcontroller AVRAdvance Microcontroller AVR
Advance Microcontroller AVR
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
Embedded c
Embedded cEmbedded c
Embedded c
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
PIC Microcontrollers
PIC MicrocontrollersPIC Microcontrollers
PIC Microcontrollers
 
introduction to microprocessors
introduction to microprocessorsintroduction to microprocessors
introduction to microprocessors
 

Similar to Microcontroller

Introduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptxIntroduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptxVishalGaur54
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Mrunal Deshkar
 
Bca examination 2015 csa
Bca examination 2015 csaBca examination 2015 csa
Bca examination 2015 csaAnjaan Gajendra
 
U proc ovw
U proc ovwU proc ovw
U proc ovwBrit4
 
4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptx4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptxLofi19
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessorAnuja Gunale
 
INSTRUCTION TYPES
INSTRUCTION TYPESINSTRUCTION TYPES
INSTRUCTION TYPESdevi195058
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 finalKhalid Elmeadawy
 
Computer engineering - overview of microprocessors
Computer engineering - overview of microprocessorsComputer engineering - overview of microprocessors
Computer engineering - overview of microprocessorsEkeedaPvtLtd
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notesRavali Sunki
 
co1_aiml_new.pptx
co1_aiml_new.pptxco1_aiml_new.pptx
co1_aiml_new.pptxKUNTALADAS5
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSSabin Gautam
 
Computer Arithmetic and Processor Basics
Computer Arithmetic and Processor BasicsComputer Arithmetic and Processor Basics
Computer Arithmetic and Processor BasicsShinuMMAEI
 

Similar to Microcontroller (20)

Introduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptxIntroduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptx
 
Cpu
CpuCpu
Cpu
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor
 
Bca examination 2015 csa
Bca examination 2015 csaBca examination 2015 csa
Bca examination 2015 csa
 
Unit I.pptx
Unit I.pptxUnit I.pptx
Unit I.pptx
 
U proc ovw
U proc ovwU proc ovw
U proc ovw
 
4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptx4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptx
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
INSTRUCTION TYPES
INSTRUCTION TYPESINSTRUCTION TYPES
INSTRUCTION TYPES
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 final
 
Computer engineering - overview of microprocessors
Computer engineering - overview of microprocessorsComputer engineering - overview of microprocessors
Computer engineering - overview of microprocessors
 
Components of a computer
Components of a computerComponents of a computer
Components of a computer
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
 
co1_aiml_new.pptx
co1_aiml_new.pptxco1_aiml_new.pptx
co1_aiml_new.pptx
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMS
 
Computer Arithmetic and Processor Basics
Computer Arithmetic and Processor BasicsComputer Arithmetic and Processor Basics
Computer Arithmetic and Processor Basics
 
Unit2fit
Unit2fitUnit2fit
Unit2fit
 
Microcontroller part 1
Microcontroller part 1Microcontroller part 1
Microcontroller part 1
 

Recently uploaded

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 

Recently uploaded (20)

🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 

Microcontroller

  • 2. What is Microcontroller? Microcontroller is a single chip self-contained computer single chip devices or single chip computers.  A programmable single chip which controls a process or system. Integrated circuit with pins along each side. Microcontrollers are used in appliances, automobile, scientific instrument etc.., 2
  • 3. Difference between Microcontroller and Microprocessor A microcontroller is not the same as a microprocessor. A microprocessor is a single chip CPU used within other computer systems. A microcontroller is itself a single chip computer system. 3
  • 4. Components  A microcontroller has seven main components: Central processing unit (CPU)  ROM  RAM  Input and Output  Timer  Interrupt circuitry  Buses 4
  • 5. Architecture  There are two basic types of architecture:  Harvard Von Neumann.  Microcontrollers most often use a Harvard or a modified Harvard-based architecture. 5
  • 6. Von Neumann Von Neumann architecture has a single, common memory space where both program instructions and data are stored. There is a single data bus which fetches both instructions and data. The advantage to this architecture lies in its simplicity and economy. 6
  • 7. Harvard Architecture Harvard architecture computers have separate memory areas for program instructions and data. There are two or more internal data buses which allow simultaneous access to both instructions and data. This speeds up execution time at the cost of more hardware complexity. 7
  • 8. The Central Processing Unit  The central processing unit (CPU) does all the computing.  It fetches, decodes and executes program instructions and directs the flow of data to and from memory.  The CPU performs the calculations required by program instructions and places the results of these calculations, if required, into memory space. 8
  • 10. Contd..,  Arithmetic logic unit, or ALU: One part of the CPU is responsible for performing calculations and executing instructions. ALU contains the decoder, the sequencer and a variety of registers. Decoder: It converts instructions stored in program memory into codes which the ALU can understand. Sequencer: It manages the flow of data along the microcontroller’s data bus. Registers: It temporarily store vital data which are volatile: they can change during program execution. 10
  • 11. Registers The stack pointer: The stack pointer contains the address of the next location on the stack. The address in the stack pointer is decremented when data is pushed on the stack and incremented when data is popped from the stack.  The index register: The index register is used to specify an address when certain addressing modes are used. 11
  • 12. Contd.., The program counter: The PC holds the address of the next instruction in program memory space. It contains the address of the next instruction the CPU will process. As each instruction is fetched and processed by the ALU, the CPU increments the PC. The accumulator: The accumulator is a register that can hold operands or results of operations as necessary. The Microchip devices use the name W (working) register. 12
  • 13. ROM  ROM, read only memory, is non-volatile memory used for program information and permanent data.  The microcontroller uses ROM memory space to store program instructions it will execute when it is started or reset. 13
  • 14. RAM RAM, random access memory, is used to write and read data values as a program runs. RAM is volatile: if you remove the power supply its contents are lost. Any variables used in a program are allocated from RAM. 14
  • 15. I/O Ports There are two main port types, parallel and serial, and two port modes,synchronous and asynchronous. Parallel I/O requires a data line for each bit,while serial I/O uses a single line and transfers bits in sequence. Synchronous I/O is synchronised to a clock while asynchronous I/O is not. 15
  • 16. Timer A timer is a counter that is incremented at a fixed rate when the system clock pulses.  A timer/counter can perform several different tasks. The CPU uses the timer to keep track of time accurately. The timer can generate a stream of pulses or a single pulse at different frequencies. It can be used to start and stop tasks at desired times. 16
  • 17. Interrupt Circuitry An interrupt is an event that suspends regular program operation while the event is serviced by another program. Interrupts increase the response speed to external events. When an interrupt is received current operation is suspended, the interrupt is identified and the controller jumps (vectors) to an interrupt service routine. There are two sources of interrupt: hardware and software. Hardware interrupts include a signal to a pin, timer overflow, and serial port interrupts. Software interrupts are commands given by the programmer, 17