SlideShare a Scribd company logo
1 of 24
Designing Embedded Systems
with PIC Microcontrollers:
Principles and Applications
2nd Edition. Tim Wilmshurst
1
Chapter 1
Tiny Computers, Hidden Control
The aims of this chapter are to introduce:
• The meaning of the term ‘embedded system’;
• The microcontroller which lies at the heart of the embedded system;
• The Microchip PIC® family;
• A first PIC microcontroller, the 12F508.
2
What examples of embedded
systems do you know?
What is an embedded system?
3
Example 2: Car Door Control, within a Larger Network
o
p
e
n
d
o
o
rs
e
n
s
o
r
w
i
n
d
o
w
c
o
n
t
r
o
lb
u
t
t
o
n
s
l
o
c
k
c
o
n
t
r
o
l
l
o
c
k
a
c
t
u
a
t
o
r
w
i
n
d
o
w
m
o
t
o
r
w
i
n
d
o
w
s
t
a
l
ls
e
n
s
o
r
4
Dash
Board
Air
Bag
Radio
Climate
& CD
Door
Door
Steering
Driver's
Seat
Central
Control
CAN Bus
Control
Left
Right
Example 2: Car Door Control, within a Larger Network
5
Example 3: The Derbot Autonomous Guided Vehicle
6
PIC
Pulse Width Modulation
Serial Data
Serial
Microcontroller
Compass
Motor Drive
Interface
Streamx2
Ultrasound
Ranging
Pulse Echo
Motor
Bump Sensor
Power
Management
Regulation &
9V
Alkaline
5V
9V
Right
Bump Sensor
Left
LightSensor
Left
LightSensor
Right
Analog to Digital
Converter
Left
Motor
Clock
Module
Serial Extension Bus
LightSensor
Rear
Ultrasound
Servo
Right 7
An embedded system is a system whose principal function is not computational,
but which is controlled by a computer embedded within it.
Generic Block Diagram
Input
Variables
Output
(User Interface)
Variables
(Link to other Systems)
Embedded Computer
Software
Hardware
Signal
Conditioning
Data
Conversion
Output
Drive
(display, keypad etc.)
8
The Embedded System - What Disciplines does it Involve?
Embedded Systems
Electronics
Electric Motors &
Computer Architecture
Software Engineering
Integrated Circuit
Design
Digital
Analogue
Electronics
Actuators
Sensors and
Measurements
Control
Engineering
Data
Communications
9
• A computer “executes” instructions in its (ALU).
• Running through a series of instructions called a program.
• The ALU in turn forms part of the (CPU).
• (A) is the “Accumulator”, a digital register where the
computations actually occur.
• (M) is a location in memory.
• A typical 8-bit ALU can do the list shown below.
What can the Computer Actually Do?
10
Increment A
Decrement A
Add A to M
Subtract M from A
AND A with M
OR A with M
Exclusive OR A with M
Shift A left
Shift A right
Rotate A left
Rotate A right
Complement A
Clear A
A = A plus 1
A = A - 1
A = A plus M
A = A - M
A = A.M
A = A + M
A = A M
+
A = 2A
A = A/2
A = NOT A
A = 0
What can the Computer Actually Do?
11
• CPU has a set of instructions that it recognizes and responds to
all programs.
• We want computers to execute code as fast as possible.
• This leads to CISC (Complex Instruction Set Computer).
• A CISC has many instructions, but sophisticated.
• Simple ones can be expressed in a short instruction code, say
one byte of data, and execute quickly.
• Complex ones need several bytes, and take a long time.
How Instruction Sets are Made: “CISC”
12
How Instruction Sets are Made: “CISC”
A CISC machine is generally recognised by:
• Many instructions (say < 100), with considerable sophistication
• Instruction words are of different length;
• Instructions take different lengths of time to execute.
13
• RISC (Reduced Instruction Set Computer) keep the CPU very
simple and fast, and have a limited instruction set.
• One characteristic of the RISC approach is that each instruction
is contained within a single binary word.
• That word must hold all information necessary, including:
(instruction code - address - data ).
• Every instruction takes the same amount of time.
How Instruction Sets are Made: “RISC”
14
A RISC machine is generally recognised by:
• Few instructions (say > 100),
• Each performs a very simple action;
• All instructions are single word;
• Almost all instructions take the same length of time to execute.
How Instruction Sets are Made: “RISC”
15
A microcontroller is a microprocessor designed primarily to
perform simple control functions.
Microcontrollers usually have these features
• low cost,
• physically small,
• input/output intensive, and capable of easy interfacing,
• limited memory capability,
• ability to operate in a real-time environment.
The Microcontroller
16
In certain applications, following further features are essential:
• ability to operate in hostile environment, e.g. high or low
temperature, tolerant to electromagnetic interference,
• low power, with features adapted to battery power.
The Microcontroller
17
A microcontroller = microprocessor core + memory + peripherals
Digital
Program
I/0
Microprocessor
Data
Memory
Memory
Core
Analog
I/0
& Timers
Counters
Reset
Power
Clock
Address Buses
Internal Data &
Further
Peripheral
Further
Peripheral
Interrupt(s)
18
PIC 16F84A
PIC 16F877
PIC 12F508
Motorola
68HC05B16
PIC 16C72
Motorola 68000
A Gathering of Microprocessors and Microcontrollers
19
Family Example
Devices
Instruction
word size
Stack
size
(words)
Number of
instruction
Interrupt
vectors
Baseline 10F200,
12F508,
16F57
12-bit 2 33 None
Mid-range 12F609,
16F84A,
16F631,
16F873A
14-bit 8 35 1
High
Performance
18F242,
18F2420
16-bit 32 75,
including
hardware
multiply
2
(prioritized)
Comparison of 8-bit PIC families:
20
Microcontroller - PIC 12F508/509
21
The PIC 12F508/509
block diagram
22
Summary
• An embedded system is a product that has one or more computers
embedded within it (Microcontroller).
• Microcontrollers are designed according to accepted electronic and
computer principles.
• A microcontroller = microprocessor core + memory + peripherals
• Microchip offers a wide range of microcontrollers, with different families.
• Each family has identical (or very similar) central architecture and
instruction set.
23
End of Chapter 1
24

More Related Content

Similar to ES-CH1.ppt

Question 1. please describe an embedded system in less than 100 word.pdf
Question 1. please describe an embedded system in less than 100 word.pdfQuestion 1. please describe an embedded system in less than 100 word.pdf
Question 1. please describe an embedded system in less than 100 word.pdfarmcomputers
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded Systemrmkceteee
 
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerAVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerMohamed Ali
 
conrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxconrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxjbri1395
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processorShubhamMishra485
 
An Entire Concept of Embedded systems
An Entire Concept of Embedded systems An Entire Concept of Embedded systems
An Entire Concept of Embedded systems Prabhakar Captain
 
An entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptAn entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptPrabhakar Captain
 
Embedded systems presentation
Embedded systems presentationEmbedded systems presentation
Embedded systems presentationSurender Singh
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scopeArshit Rai
 
Microchip's PIC Micro Controller
Microchip's PIC Micro ControllerMicrochip's PIC Micro Controller
Microchip's PIC Micro ControllerMidhu S V Unnithan
 
Presentation for EEE engineers on Microcontroller by Dilip Kumar Roy
Presentation for EEE engineers on Microcontroller by Dilip Kumar RoyPresentation for EEE engineers on Microcontroller by Dilip Kumar Roy
Presentation for EEE engineers on Microcontroller by Dilip Kumar RoyDilip Kumar Ckt
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded systemPankaj joshi
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scopeArshit Rai
 
Introduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIntroduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIslam Samir
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 

Similar to ES-CH1.ppt (20)

Question 1. please describe an embedded system in less than 100 word.pdf
Question 1. please describe an embedded system in less than 100 word.pdfQuestion 1. please describe an embedded system in less than 100 word.pdf
Question 1. please describe an embedded system in less than 100 word.pdf
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded System
 
Risc & cisk
Risc & ciskRisc & cisk
Risc & cisk
 
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerAVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontroller
 
conrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxconrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptx
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processor
 
An Entire Concept of Embedded systems
An Entire Concept of Embedded systems An Entire Concept of Embedded systems
An Entire Concept of Embedded systems
 
An entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptAn entire concept of embedded systems entire ppt
An entire concept of embedded systems entire ppt
 
Embedded systems presentation
Embedded systems presentationEmbedded systems presentation
Embedded systems presentation
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scope
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Microchip's PIC Micro Controller
Microchip's PIC Micro ControllerMicrochip's PIC Micro Controller
Microchip's PIC Micro Controller
 
Presentation for EEE engineers on Microcontroller by Dilip Kumar Roy
Presentation for EEE engineers on Microcontroller by Dilip Kumar RoyPresentation for EEE engineers on Microcontroller by Dilip Kumar Roy
Presentation for EEE engineers on Microcontroller by Dilip Kumar Roy
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded system
 
PILOT Session for Embedded Systems
PILOT Session for Embedded Systems PILOT Session for Embedded Systems
PILOT Session for Embedded Systems
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scope
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Introduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIntroduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and Microcontrollers
 
Arjit intro
Arjit introArjit intro
Arjit intro
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 

More from alaakaraja1

More from alaakaraja1 (6)

13.pptx
13.pptx13.pptx
13.pptx
 
1.pptx
1.pptx1.pptx
1.pptx
 
7.pptx
7.pptx7.pptx
7.pptx
 
ES-CH6.ppt
ES-CH6.pptES-CH6.ppt
ES-CH6.ppt
 
Embedded System Basics - Introduction.ppt
Embedded System Basics - Introduction.pptEmbedded System Basics - Introduction.ppt
Embedded System Basics - Introduction.ppt
 
ES-CH5.ppt
ES-CH5.pptES-CH5.ppt
ES-CH5.ppt
 

Recently uploaded

Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
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
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 

Recently uploaded (20)

Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
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
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 

ES-CH1.ppt

  • 1. Designing Embedded Systems with PIC Microcontrollers: Principles and Applications 2nd Edition. Tim Wilmshurst 1
  • 2. Chapter 1 Tiny Computers, Hidden Control The aims of this chapter are to introduce: • The meaning of the term ‘embedded system’; • The microcontroller which lies at the heart of the embedded system; • The Microchip PIC® family; • A first PIC microcontroller, the 12F508. 2
  • 3. What examples of embedded systems do you know? What is an embedded system? 3
  • 4. Example 2: Car Door Control, within a Larger Network o p e n d o o rs e n s o r w i n d o w c o n t r o lb u t t o n s l o c k c o n t r o l l o c k a c t u a t o r w i n d o w m o t o r w i n d o w s t a l ls e n s o r 4
  • 6. Example 3: The Derbot Autonomous Guided Vehicle 6
  • 7. PIC Pulse Width Modulation Serial Data Serial Microcontroller Compass Motor Drive Interface Streamx2 Ultrasound Ranging Pulse Echo Motor Bump Sensor Power Management Regulation & 9V Alkaline 5V 9V Right Bump Sensor Left LightSensor Left LightSensor Right Analog to Digital Converter Left Motor Clock Module Serial Extension Bus LightSensor Rear Ultrasound Servo Right 7
  • 8. An embedded system is a system whose principal function is not computational, but which is controlled by a computer embedded within it. Generic Block Diagram Input Variables Output (User Interface) Variables (Link to other Systems) Embedded Computer Software Hardware Signal Conditioning Data Conversion Output Drive (display, keypad etc.) 8
  • 9. The Embedded System - What Disciplines does it Involve? Embedded Systems Electronics Electric Motors & Computer Architecture Software Engineering Integrated Circuit Design Digital Analogue Electronics Actuators Sensors and Measurements Control Engineering Data Communications 9
  • 10. • A computer “executes” instructions in its (ALU). • Running through a series of instructions called a program. • The ALU in turn forms part of the (CPU). • (A) is the “Accumulator”, a digital register where the computations actually occur. • (M) is a location in memory. • A typical 8-bit ALU can do the list shown below. What can the Computer Actually Do? 10
  • 11. Increment A Decrement A Add A to M Subtract M from A AND A with M OR A with M Exclusive OR A with M Shift A left Shift A right Rotate A left Rotate A right Complement A Clear A A = A plus 1 A = A - 1 A = A plus M A = A - M A = A.M A = A + M A = A M + A = 2A A = A/2 A = NOT A A = 0 What can the Computer Actually Do? 11
  • 12. • CPU has a set of instructions that it recognizes and responds to all programs. • We want computers to execute code as fast as possible. • This leads to CISC (Complex Instruction Set Computer). • A CISC has many instructions, but sophisticated. • Simple ones can be expressed in a short instruction code, say one byte of data, and execute quickly. • Complex ones need several bytes, and take a long time. How Instruction Sets are Made: “CISC” 12
  • 13. How Instruction Sets are Made: “CISC” A CISC machine is generally recognised by: • Many instructions (say < 100), with considerable sophistication • Instruction words are of different length; • Instructions take different lengths of time to execute. 13
  • 14. • RISC (Reduced Instruction Set Computer) keep the CPU very simple and fast, and have a limited instruction set. • One characteristic of the RISC approach is that each instruction is contained within a single binary word. • That word must hold all information necessary, including: (instruction code - address - data ). • Every instruction takes the same amount of time. How Instruction Sets are Made: “RISC” 14
  • 15. A RISC machine is generally recognised by: • Few instructions (say > 100), • Each performs a very simple action; • All instructions are single word; • Almost all instructions take the same length of time to execute. How Instruction Sets are Made: “RISC” 15
  • 16. A microcontroller is a microprocessor designed primarily to perform simple control functions. Microcontrollers usually have these features • low cost, • physically small, • input/output intensive, and capable of easy interfacing, • limited memory capability, • ability to operate in a real-time environment. The Microcontroller 16
  • 17. In certain applications, following further features are essential: • ability to operate in hostile environment, e.g. high or low temperature, tolerant to electromagnetic interference, • low power, with features adapted to battery power. The Microcontroller 17
  • 18. A microcontroller = microprocessor core + memory + peripherals Digital Program I/0 Microprocessor Data Memory Memory Core Analog I/0 & Timers Counters Reset Power Clock Address Buses Internal Data & Further Peripheral Further Peripheral Interrupt(s) 18
  • 19. PIC 16F84A PIC 16F877 PIC 12F508 Motorola 68HC05B16 PIC 16C72 Motorola 68000 A Gathering of Microprocessors and Microcontrollers 19
  • 20. Family Example Devices Instruction word size Stack size (words) Number of instruction Interrupt vectors Baseline 10F200, 12F508, 16F57 12-bit 2 33 None Mid-range 12F609, 16F84A, 16F631, 16F873A 14-bit 8 35 1 High Performance 18F242, 18F2420 16-bit 32 75, including hardware multiply 2 (prioritized) Comparison of 8-bit PIC families: 20
  • 21. Microcontroller - PIC 12F508/509 21
  • 23. Summary • An embedded system is a product that has one or more computers embedded within it (Microcontroller). • Microcontrollers are designed according to accepted electronic and computer principles. • A microcontroller = microprocessor core + memory + peripherals • Microchip offers a wide range of microcontrollers, with different families. • Each family has identical (or very similar) central architecture and instruction set. 23