SlideShare a Scribd company logo
1 of 9
Download to read offline
Introduction to
    Embedded System Design



Babak Kia
Adjunct Professor
Boston University
College of Engineering
Email: bkia -at- bu.edu                                       ENG SC757 - Advanced Microprocessor Design




    Microcontrollers
                          A Microcontroller is essentially a small and self-
                          sufficient computer on a chip, used to control devices
                          It has all the memory and I/O it needs on board
                          Is not expandable – no external bus interface
                          Characteristics of a Microcontroller
                           • Low cost, on the order of $1
                           • Low speed, on the order of 10 KHz – 20 MHz
                           • Low Power, extremely low power in sleep mode
                           • Small architecture, usually an 8-bit architecture
                           • Small memory size, but usually enough for the type of
                             application it is intended for. Onboard Flash.
                           • Limited I/O, but again, enough for the type of application
                             intended for




    Microprocessors
                          A Microprocessor is fundamentally a collection of
                          on/off switches laid out over silicon in order to perform
                          computations
                          Characteristics of a Microprocessor
                          • High cost, anywhere between $20 - $200 or more!
                          • High speed, on the order of 100 MHz – 4 GHz
                          • High Power consumption, lots of heat
                          • Large architecture, 32-bit, and recently 64-bit architecture
                          • Large memory size, onboard flash and cache, with an
                            external bus interface for greater memory usage
                          • Lots of I/O and peripherals, though Microprocessors tend
                            to be short on General purpose I/O




                                                                                                           1
Harvard Architecture
       Harvard Architecture refers to a memory structure
       where the processor is connected to two different
       memory banks via two sets of buses
       This is to provide the processor with two distinct data
       paths, one for instruction and one for data
       Through this scheme, the CPU can read both an
       instruction and data from the respective memory
       banks at the same time
       This inherent independence increases the throughput
       of the machine by enabling it to always prefetch the
       next instruction
       The cost of such a system is complexity in hardware
       Commonly used in DSPs




Von-Neumann Machine
       A Von-Neumann Machine, in contrast to the Harvard
       Architecture provides one data path (bus) for both
       instruction and data
       As a result, the CPU can either be fetching an
       instruction from memory, or read/writing data to it
       Other than less complexity of hardware, it allows for
       using a single, sequential memory.
       Today’s processing speeds vastly outpace memory
       access times, and we employ a very fast but small
       amount of memory (cache) local to the processor
       Modern processors employ a Harvard Architecture to
       read from two instruction and data caches, when at the
       same time using a Von-Neumann Architecture to access
       external memory




Little vs. Big Endian
       Although numbers are always displayed in the same
       way, they are not stored in the same way in memory
       Big-Endian machines store the most significant byte of
       data in the lowest memory address
       Little-Endian machines on the other hand, store the
       least significant byte of data in the lowest memory
       address

       A Big-Endian machine         A Little-Endian machine
       stores 0x12345678 as:        stores 0x12345678 as:
           ADD+0:   0x12                ADD+0:   0x78
           ADD+1:   0x34                ADD+1:   0x56
           ADD+2:   0x56                ADD+2:   0x34
           ADD+3:   0x78                ADD+3:   0x12




                                                                 2
Little vs. Big Endian
       The Intel family of Microprocessors and processors
       from Digital Equipment Corporation use Little-Endian
       mode
       Whereas Architectures from Sun, IBM, and Motorola
       are Big-Endian
       Architectures such as PowerPC, MIPS, and Intel’s IA-
       64 are Bi-Endian, supporting either mode
       Unfortunately both methods are in prevalent use
       today, and neither method is superior to the other
       Interfacing between Big and Little Endian machines
       can be a headache, but this is generally only a concern
       for TCP/IP stack and other interface developers




Program Counter (PC)
       The Program Counter is a 16 or 32 bit register which
       contains the address of the next instruction to be
       executed
       The PC automatically increments to the next
       sequential memory location every time an instruction
       is fetched
       Branch, jump, and interrupt operations load the
       Program Counter with an address other than the next
       sequential location
       During reset, the PC is loaded from a pre-defined
       memory location to signify the starting address of the
       code




Reset Vector
       The significance of the reset vector is that it points the
       processor to the memory address which contains the
       firmware’s first instruction
       Without the Reset Vector, the processor would not
       know where to begin execution
       Upon reset, the processor loads the Program Counter
       (PC) with the reset vector value from a pre-defined
       memory location
       On CPU08 architecture, this is at location
       $FFFE:$FFFF
       A common mistake which occurs during the debug
       phase – when reset vector is not necessary – the
       developer takes it for granted and doesn’t program
       into the final image. As a result, the processor doesn’t
       start up on the final product.




                                                                    3
Stack Pointer (SP)
      The Stack Pointer (SP), much like the reset vector, is
      required at boot time for many processors
      Some processors, in particular the 8-bit
      microcontrollers automatically provide the stack
      pointer by resetting it to a predefined value
      On a higher end processor, the stack pointer is usually
      read from a non-volatile memory location, much like
      the reset vector
      For example on a ColdFire microprocessor, the first
      sixteen bytes of memory location must be
      programmed as follows:

                  0x00000000: Reset Vector
                  0x00000008: Stack Pointer




COP Watchdog Timer
      The Computer Operating Properly (COP) module is a
      component of modern processors which provides a
      mechanism to help software recover from runaway
      code
      The COP, also known as the Watchdog Timer, is a free-
      running counter that generates a reset if it runs up to a
      pre-defined value and overflows
      In order to prevent a watchdog reset, the user code
      must clear the COP counter periodically.
      COP can be disabled through register settings, and
      even though this is not good practice for final firmware
      release, it is a prudent strategy through the course of
      debug




The Infinite Loop
      Embedded Systems, unlike a PC, never “exit”
      an application
      They idle through an Infinite Loop waiting for
      an event to happen in the form of an
      interrupt, or a pre-scheduled task
      In order to save power, some processors
      enter special sleep or wait modes instead of
      idling through an Infinite Loop, but they will
      come out of this mode upon either a timer or
      an External Interrupt




                                                                  4
Interrupts
       Interrupts are mostly hardware mechanisms
       which tell the program an event has occurred
       They happen at any time, and are therefore
       asynchronous to program flow
       They require special handling by the
       processor, and are ultimately handled by a
       corresponding Interrupt Service Routine (ISR)
       Need to be handled quickly. Take too much
       time servicing an interrupt, and you may miss
       another interrupt.




Designing an Embedded System
       Proposal
       Definition
       Technology Selection
       Budgeting (Time, Human, Financial)
       Material and Development tool purchase
       Schematic Capture & PCB board design
       Firmware Development & Debug
       Hardware Manufacturing
       Testing: In-Situ, Environmental
       Certification: CE
       Firmware Release
       Documentation
       Ongoing Support




System Design Cycle
       Writing code conjures up visions of
       sleepless nights and stacked up boxes
       of pizza
       And if not done correctly, that is
       exactly what the outcome will be!
       The purpose of the design cycle is to
       remind and guide the developer to step
       within a framework proven to keep you
       on track and on budget




                                                       5
System Design Cycle
      There are numerous design cycle
      methodologies, of which the following
      are most popular
       •   The Spaghetti Model
       •   The Waterfall Model
       •   Top-down versus Bottom-up
       •   Spiral Model
       •   GANTT charts




The Spaghetti Model



            Not in this course, thank you.




The Waterfall Model
      Waterfall is a software development model in which
      development is seen flowing steadily through the
      phases of
       •   Requirement Analysis
       •   Design
       •   Implementation
       •   Testing
       •   Integration
       •   Maintenance
      Advantages are good progress tracking due to clear
      milestones
      Disadvantages are its inflexibility, by making it difficult
      to respond to changing customer needs / market
      conditions




                                                                    6
Top-down versus Bottom-up
      The Top-Down Model analyses the overall
      functionality of a system, without going into
      details
      • Each successive iteration of this process then
        designs individual pieces of the system in greater
        detail
      The Bottom-Up Model in contrast defines the
      individual pieces of the system in great detail
      • These individual components are then interfaced
        together to form a larger system




The Spiral Model
      Modern software design practices such as
      the Spiral Model employ both top-down and
      bottom-up techniques
      Widely used in the industry today
      For a GUI application, for example, the Spiral
      Model would contend that
       • You first start off with a rough-sketch of
         user interface (simple buttons & icons)
       • Make the underlying application work
       • Only then start adding features and in a
         final stage spruce up the buttons & icons




The Spiral Model
      In this course, we won’t focus on the
      aesthetic qualities of the application -
      only the underlying technology




                                                             7
GANTT Chart
      GANTT Chart is simply a type of bar chart
      which shows the interrelationships of how
      projects and schedules progress over time




Design Metrics
      Metrics to consider in designing an
      Embedded System
      • Unit Cost: Can be a combination of cost to
        manufacture hardware + licensing fees
      • NRE Costs: Non Recurring Engineering costs
      • Size: The physical dimensions of the system
      • Power Consumption: Battery, power supply,
        wattage, current consumption, etc.
      • Performance: The throughput of the system, its
        response time, and computation power
      • Safety, fault-tolerance, field-upgradeability,
        ruggedness, maintenance, ease of use, ease of
        installation, etc. etc.




Schematic Capture




                                                         8
PCB Layout




       PCB Board




Portions of this power point presentation may have been taken from relevant users and technical manuals. Original content Copyright © 2005 – Babak Kia




                                                                                                                                                         9

More Related Content

What's hot (20)

Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 
Choosing the right processor
Choosing the right processorChoosing the right processor
Choosing the right processor
 
Classification OF Microprocessor
Classification OF MicroprocessorClassification OF Microprocessor
Classification OF Microprocessor
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
Lecture1 - Computer Architecture
Lecture1 - Computer ArchitectureLecture1 - Computer Architecture
Lecture1 - Computer Architecture
 
27 multicore
27 multicore27 multicore
27 multicore
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systems
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
Three Central Processing Unit
Three   Central Processing UnitThree   Central Processing Unit
Three Central Processing Unit
 
Introduction to Computer Architecture
Introduction to Computer ArchitectureIntroduction to Computer Architecture
Introduction to Computer Architecture
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Design of embedded systems
Design of embedded systemsDesign of embedded systems
Design of embedded systems
 
Introduction to embedded system
Introduction to embedded systemIntroduction to embedded system
Introduction to embedded system
 
Cpu
CpuCpu
Cpu
 
Arm processor
Arm processorArm processor
Arm processor
 
Trends in computer architecture
Trends in computer architectureTrends in computer architecture
Trends in computer architecture
 
Microprocessor and microcontrollers
Microprocessor and microcontrollersMicroprocessor and microcontrollers
Microprocessor and microcontrollers
 
Embedded Systems : introduction
Embedded Systems : introductionEmbedded Systems : introduction
Embedded Systems : introduction
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 

Viewers also liked

Electronic bicycle lock
Electronic bicycle lockElectronic bicycle lock
Electronic bicycle lockviv3ksharma
 
Flashing cum running light
Flashing cum running lightFlashing cum running light
Flashing cum running lightviv3ksharma
 
Project: Electronic circuit
Project: Electronic circuitProject: Electronic circuit
Project: Electronic circuitasgslide
 
AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...
AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...
AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...AKSHAT GANGWAR
 
Friendly charger for mobile phones
Friendly charger for mobile phonesFriendly charger for mobile phones
Friendly charger for mobile phonesviv3ksharma
 
Ch 1 microwave fundamentals
Ch 1  microwave fundamentalsCh 1  microwave fundamentals
Ch 1 microwave fundamentalszarinamdamin
 
Embedded Systems: Lecture 2: Introduction to Embedded Systems
Embedded Systems: Lecture 2: Introduction to Embedded SystemsEmbedded Systems: Lecture 2: Introduction to Embedded Systems
Embedded Systems: Lecture 2: Introduction to Embedded SystemsAhmed El-Arabawy
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system designMukesh Bansal
 

Viewers also liked (10)

Electronic bicycle lock
Electronic bicycle lockElectronic bicycle lock
Electronic bicycle lock
 
Flashing cum running light
Flashing cum running lightFlashing cum running light
Flashing cum running light
 
Project: Electronic circuit
Project: Electronic circuitProject: Electronic circuit
Project: Electronic circuit
 
AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...
AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...
AUTOMATIC DOORBELL WITH OBJECT DETECTION USING ULTRA SONIC TRANSMITTER AND RE...
 
Friendly charger for mobile phones
Friendly charger for mobile phonesFriendly charger for mobile phones
Friendly charger for mobile phones
 
Ch 1 microwave fundamentals
Ch 1  microwave fundamentalsCh 1  microwave fundamentals
Ch 1 microwave fundamentals
 
Embedded Systems: Lecture 2: Introduction to Embedded Systems
Embedded Systems: Lecture 2: Introduction to Embedded SystemsEmbedded Systems: Lecture 2: Introduction to Embedded Systems
Embedded Systems: Lecture 2: Introduction to Embedded Systems
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system design
 
Microwave Antenna
Microwave AntennaMicrowave Antenna
Microwave Antenna
 
The Programmer
The ProgrammerThe Programmer
The Programmer
 

Similar to Introduction to Embedded System Design Microcontrollers

Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller Nitesh Kumar
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptxPratik Gohel
 
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdf
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdfmicroprocessormicrocontrollerbysanat-140107013112-phpapp02.pdf
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdfMECHANICALENGINEERIN19
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processorShubhamMishra485
 
Micro controller
Micro controllerMicro controller
Micro controllerDevi Prasad
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollersnehapvs
 
Intel 8th generation and 7th gen microprocessor full details especially for t...
Intel 8th generation and 7th gen microprocessor full details especially for t...Intel 8th generation and 7th gen microprocessor full details especially for t...
Intel 8th generation and 7th gen microprocessor full details especially for t...Chessin Chacko
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 finalKhalid Elmeadawy
 
Ca lecture 03
Ca lecture 03Ca lecture 03
Ca lecture 03Haris456
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded SystemZakaria Gomaa
 
1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptx1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptxISMT College
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1AJAL A J
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1Hossam Hassan
 
Challenges in Embedded Computing
Challenges in Embedded ComputingChallenges in Embedded Computing
Challenges in Embedded ComputingPradeep Kumar TS
 
microprocessor-and-microcontroller
microprocessor-and-microcontrollermicroprocessor-and-microcontroller
microprocessor-and-microcontrollerjhcid
 
Basics of micro controllers for biginners
Basics of  micro controllers for biginnersBasics of  micro controllers for biginners
Basics of micro controllers for biginnersGerwin Makanyanga
 

Similar to Introduction to Embedded System Design Microcontrollers (20)

Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdf
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdfmicroprocessormicrocontrollerbysanat-140107013112-phpapp02.pdf
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdf
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processor
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Cpu
CpuCpu
Cpu
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
esunit1.pptx
esunit1.pptxesunit1.pptx
esunit1.pptx
 
Intel 8th generation and 7th gen microprocessor full details especially for t...
Intel 8th generation and 7th gen microprocessor full details especially for t...Intel 8th generation and 7th gen microprocessor full details especially for t...
Intel 8th generation and 7th gen microprocessor full details especially for t...
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 final
 
Ca lecture 03
Ca lecture 03Ca lecture 03
Ca lecture 03
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 
1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptx1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptx
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
 
Challenges in Embedded Computing
Challenges in Embedded ComputingChallenges in Embedded Computing
Challenges in Embedded Computing
 
microprocessor-and-microcontroller
microprocessor-and-microcontrollermicroprocessor-and-microcontroller
microprocessor-and-microcontroller
 
Basics of micro controllers for biginners
Basics of  micro controllers for biginnersBasics of  micro controllers for biginners
Basics of micro controllers for biginners
 

Recently uploaded

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Recently uploaded (20)

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

Introduction to Embedded System Design Microcontrollers

  • 1. Introduction to Embedded System Design Babak Kia Adjunct Professor Boston University College of Engineering Email: bkia -at- bu.edu ENG SC757 - Advanced Microprocessor Design Microcontrollers A Microcontroller is essentially a small and self- sufficient computer on a chip, used to control devices It has all the memory and I/O it needs on board Is not expandable – no external bus interface Characteristics of a Microcontroller • Low cost, on the order of $1 • Low speed, on the order of 10 KHz – 20 MHz • Low Power, extremely low power in sleep mode • Small architecture, usually an 8-bit architecture • Small memory size, but usually enough for the type of application it is intended for. Onboard Flash. • Limited I/O, but again, enough for the type of application intended for Microprocessors A Microprocessor is fundamentally a collection of on/off switches laid out over silicon in order to perform computations Characteristics of a Microprocessor • High cost, anywhere between $20 - $200 or more! • High speed, on the order of 100 MHz – 4 GHz • High Power consumption, lots of heat • Large architecture, 32-bit, and recently 64-bit architecture • Large memory size, onboard flash and cache, with an external bus interface for greater memory usage • Lots of I/O and peripherals, though Microprocessors tend to be short on General purpose I/O 1
  • 2. Harvard Architecture Harvard Architecture refers to a memory structure where the processor is connected to two different memory banks via two sets of buses This is to provide the processor with two distinct data paths, one for instruction and one for data Through this scheme, the CPU can read both an instruction and data from the respective memory banks at the same time This inherent independence increases the throughput of the machine by enabling it to always prefetch the next instruction The cost of such a system is complexity in hardware Commonly used in DSPs Von-Neumann Machine A Von-Neumann Machine, in contrast to the Harvard Architecture provides one data path (bus) for both instruction and data As a result, the CPU can either be fetching an instruction from memory, or read/writing data to it Other than less complexity of hardware, it allows for using a single, sequential memory. Today’s processing speeds vastly outpace memory access times, and we employ a very fast but small amount of memory (cache) local to the processor Modern processors employ a Harvard Architecture to read from two instruction and data caches, when at the same time using a Von-Neumann Architecture to access external memory Little vs. Big Endian Although numbers are always displayed in the same way, they are not stored in the same way in memory Big-Endian machines store the most significant byte of data in the lowest memory address Little-Endian machines on the other hand, store the least significant byte of data in the lowest memory address A Big-Endian machine A Little-Endian machine stores 0x12345678 as: stores 0x12345678 as: ADD+0: 0x12 ADD+0: 0x78 ADD+1: 0x34 ADD+1: 0x56 ADD+2: 0x56 ADD+2: 0x34 ADD+3: 0x78 ADD+3: 0x12 2
  • 3. Little vs. Big Endian The Intel family of Microprocessors and processors from Digital Equipment Corporation use Little-Endian mode Whereas Architectures from Sun, IBM, and Motorola are Big-Endian Architectures such as PowerPC, MIPS, and Intel’s IA- 64 are Bi-Endian, supporting either mode Unfortunately both methods are in prevalent use today, and neither method is superior to the other Interfacing between Big and Little Endian machines can be a headache, but this is generally only a concern for TCP/IP stack and other interface developers Program Counter (PC) The Program Counter is a 16 or 32 bit register which contains the address of the next instruction to be executed The PC automatically increments to the next sequential memory location every time an instruction is fetched Branch, jump, and interrupt operations load the Program Counter with an address other than the next sequential location During reset, the PC is loaded from a pre-defined memory location to signify the starting address of the code Reset Vector The significance of the reset vector is that it points the processor to the memory address which contains the firmware’s first instruction Without the Reset Vector, the processor would not know where to begin execution Upon reset, the processor loads the Program Counter (PC) with the reset vector value from a pre-defined memory location On CPU08 architecture, this is at location $FFFE:$FFFF A common mistake which occurs during the debug phase – when reset vector is not necessary – the developer takes it for granted and doesn’t program into the final image. As a result, the processor doesn’t start up on the final product. 3
  • 4. Stack Pointer (SP) The Stack Pointer (SP), much like the reset vector, is required at boot time for many processors Some processors, in particular the 8-bit microcontrollers automatically provide the stack pointer by resetting it to a predefined value On a higher end processor, the stack pointer is usually read from a non-volatile memory location, much like the reset vector For example on a ColdFire microprocessor, the first sixteen bytes of memory location must be programmed as follows: 0x00000000: Reset Vector 0x00000008: Stack Pointer COP Watchdog Timer The Computer Operating Properly (COP) module is a component of modern processors which provides a mechanism to help software recover from runaway code The COP, also known as the Watchdog Timer, is a free- running counter that generates a reset if it runs up to a pre-defined value and overflows In order to prevent a watchdog reset, the user code must clear the COP counter periodically. COP can be disabled through register settings, and even though this is not good practice for final firmware release, it is a prudent strategy through the course of debug The Infinite Loop Embedded Systems, unlike a PC, never “exit” an application They idle through an Infinite Loop waiting for an event to happen in the form of an interrupt, or a pre-scheduled task In order to save power, some processors enter special sleep or wait modes instead of idling through an Infinite Loop, but they will come out of this mode upon either a timer or an External Interrupt 4
  • 5. Interrupts Interrupts are mostly hardware mechanisms which tell the program an event has occurred They happen at any time, and are therefore asynchronous to program flow They require special handling by the processor, and are ultimately handled by a corresponding Interrupt Service Routine (ISR) Need to be handled quickly. Take too much time servicing an interrupt, and you may miss another interrupt. Designing an Embedded System Proposal Definition Technology Selection Budgeting (Time, Human, Financial) Material and Development tool purchase Schematic Capture & PCB board design Firmware Development & Debug Hardware Manufacturing Testing: In-Situ, Environmental Certification: CE Firmware Release Documentation Ongoing Support System Design Cycle Writing code conjures up visions of sleepless nights and stacked up boxes of pizza And if not done correctly, that is exactly what the outcome will be! The purpose of the design cycle is to remind and guide the developer to step within a framework proven to keep you on track and on budget 5
  • 6. System Design Cycle There are numerous design cycle methodologies, of which the following are most popular • The Spaghetti Model • The Waterfall Model • Top-down versus Bottom-up • Spiral Model • GANTT charts The Spaghetti Model Not in this course, thank you. The Waterfall Model Waterfall is a software development model in which development is seen flowing steadily through the phases of • Requirement Analysis • Design • Implementation • Testing • Integration • Maintenance Advantages are good progress tracking due to clear milestones Disadvantages are its inflexibility, by making it difficult to respond to changing customer needs / market conditions 6
  • 7. Top-down versus Bottom-up The Top-Down Model analyses the overall functionality of a system, without going into details • Each successive iteration of this process then designs individual pieces of the system in greater detail The Bottom-Up Model in contrast defines the individual pieces of the system in great detail • These individual components are then interfaced together to form a larger system The Spiral Model Modern software design practices such as the Spiral Model employ both top-down and bottom-up techniques Widely used in the industry today For a GUI application, for example, the Spiral Model would contend that • You first start off with a rough-sketch of user interface (simple buttons & icons) • Make the underlying application work • Only then start adding features and in a final stage spruce up the buttons & icons The Spiral Model In this course, we won’t focus on the aesthetic qualities of the application - only the underlying technology 7
  • 8. GANTT Chart GANTT Chart is simply a type of bar chart which shows the interrelationships of how projects and schedules progress over time Design Metrics Metrics to consider in designing an Embedded System • Unit Cost: Can be a combination of cost to manufacture hardware + licensing fees • NRE Costs: Non Recurring Engineering costs • Size: The physical dimensions of the system • Power Consumption: Battery, power supply, wattage, current consumption, etc. • Performance: The throughput of the system, its response time, and computation power • Safety, fault-tolerance, field-upgradeability, ruggedness, maintenance, ease of use, ease of installation, etc. etc. Schematic Capture 8
  • 9. PCB Layout PCB Board Portions of this power point presentation may have been taken from relevant users and technical manuals. Original content Copyright © 2005 – Babak Kia 9