Slides created by: - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Slides created by:

Description:

Embedded systems are computer-based ... Digital camera, TV ... cause output events Hardware/Software Interface Write code, execute it on a microcontroller ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 10
Provided by: Tria671
Learn more at: https://ics.uci.edu
Category:

less

Transcript and Presenter's Notes

Title: Slides created by:


1
Embedded Systems
  • Embedded systems are computer-based systems which
    are embedded inside another device (car, home,
    TV, etc.)
  • Interactions with embedded systems are different
    than with standard computers
  • Interact with users via simple interface
  • Digital camera, TV, cellphone,
  • Interact with another device, invisible to user
  • - Disk drive, memory stick, anti-lock braking
    system,

2
ES Characteristics
  • Interact directly with the physical environment
  • ABS applies brakes, disk drive controls motors
  • Hard timing constraints (unlike most computer
    software)
  • ABS fails if it is too slow
  • MP3 player sound bad if conversion is slow
  • Application-specific, not general-purpose
  • ABS only applies breaks, MP3 only plays music
  • Some systems violate this (cellphones w/ apps)

3
Cost Constraints
  • Embedded design methodology Be Efficient!
  • Vast majority of embedded products are in cost
    critical markets
  • Very different from traditional software
    engineering
  • Correct functionality is all that counts
  • Performance, memory, power, not important
  • Moores law will save you eventually
  • Embedded system designers should be control
    freaks
  • Need to have explicit control over timing, memory
  • Why trust a compiler/interpreter/OS?

4
Embedded System Structure
  • Sensors receive data from the world
  • Analog (light sensor, microphone, etc.) and
    digital (buttons)
  • Actuators cause events in the world
  • Analog (motors, speakers) and digital (lights)
  • Application-Specific Integrated Circuit (ASIC)-
    special-purpose hardware
  • Field Programmable Gate Array (FPGA) -
    reconfigurable hardware

5
Microcontrollers
  • Microcontrollers are the center of the system
  • Accept input data, process it, make decisions,
    cause output events
  • Hardware/Software Interface
  • Write code, execute it on a microcontroller
  • Microcontroller interacts with hardware components
  • Simple processors with special features to
    support interaction
  • Barely enough functionality to perform its task
  • Usually much slower than high-end (20MHz)
  • Includes timers, ADCs, configurable
    inputs/outputs, etc.

6
Microchip PIC16F684
Image taken from PIC16F684 Datasheet, Microchip
Technology Inc.
  • 14 pins power, ground, 12 I/O
  • Dual Inline Package (DIP), fits into breadboards
  • 4MHz default clock rate, 20MHz max
  • Timers, ADC, Analog comparator

7
PICKIT 1 Flash Starter Kit
Image taken from PICKIT 1 Flash Starter Kit
User's Guide, Microchip Technology Inc.
  • Comes with a PIC16F684
  • Allows programming via USB cable
  • Includes 8 LEDs, pushbutton, trim pot, expansion
    header

8
Why C for Embedded Systems?
  • Easier to use than Assembly language
  • Allows more control than higher-level languages
    (Java, Python, etc.
  • C example Python example
  • int a, b, c a b c
  • a b c
  • How much memory is used in each example?

9
Assembly is Important Too
  • Assembly gives almost perfect timing control
  • 1 clock per instruction in assembly
  • Performance of C depends on the compiler
    optimizations
  • for (i0 ilt10 i)
  • RA0 1
  • RA0 0
  • RA0 is low for a long time
  • Some functions cannot be accessed from C (sleep
    in PIC)
Write a Comment
User Comments (0)
About PowerShow.com