Reconfigurable computing
Small Embedded Systems
Unit 1.2
Introduction to Embedded Systems
Introduction
Embedded Systems
Key features
Typical architectures
Computers, Microprocessors and Microcontrollers
Development kits
In the Beginning …
Apollo Guidance System (AGC): early 1960s
First computer built from silicon integrated circuits
One of the earliest computer “embedded systems”
Read data from gyroscope, accelerometers, sextants and telescopes to estimate current position, angle, alignment, raise alarms if problems arose …
https://en.wikipedia.org/wiki/Apollo_command_and_service_module#/media/File:Apollo_CSM_lunar_orbit.jpg (NASA photo in public domain)
https://en.wikipedia.org/wiki/Apollo_Guidance_Computer#/media/File:Dsky.jpg
https://moon.nasa.gov/resources/188/view-apollo-11-lunar-module-as-it-rested-on-lunar-surface/
()
Characteristics of Embedded Systems
Interact directly with their environment
React to external events and must compute and apply appropriate responses
Most embedded systems have tight constraints on memory, processing power, drain on the power supply
Run single program from switch-on to switch-off
But need some way to alter or update this program from time to time
Must find some sensible way to respond to error condition (divide by zero, null pointer reference)
Can’t just print an error message to the screen and give up working
Types of Embedded Systems
Some systems must produce a response by a deadline: a late result is no good
Example: cut thrust if about to collide
Systems that must guarantee response by a deadline are called Real Time Systems
Some systems have their code arranged as a set of tasks, one distinct task for each distinct function
Maintain bearing, maintain angle, adjust speed, update display, respond to keyboard presses…
Tasks are interleaved in time slices onto processor
Multitasking systems
Some systems will cause loss of life if they fail
Safety critical systems
Apollo Guidance Computer Specs
4 kB RAM (to store computed and updated data)
32 kB ROM (to store program and constant data)
16 bit CPU running from 2 MHz clock
Simultaneously manage 8 different tasks
Low power standby mode: 85% power reduction
https://en.wikipedia.org/wiki/Apollo_command_and_service_module#/media/File:Apollo_CSM_lunar_orbit.jpg (NASA photo in public domain)
https://en.wikipedia.org/wiki/Apollo_Guidance_Computer#/media/File:Dsky.jpg
()
Moore’s Law for Integrated Circuits
Gordon Moore (founder of Intel) said in 1965:
Number of transistors on a chip doubles every two years (Moore’s Law)
System complexity that was once expensive and cutting edge is now commonplace and cheap
zeptobars.com/en/read/open-microchip-asic-what-inside-II-msp430-pic-z80
https://zeptobars.com/en/read/open-microchip-asic-what-inside-II-msp430-pic-z80 (Creative commons)
Architecture of an Embedded System
Sensor: senses the physical world
Actuator: drives the physical world
Timers: enable computer to perform tasks at given times and to measure time intervals
Computer
Actuators
Sensors
Clocks, timers and counters
Examples of sensors…
Force
Strain gauges
Conductive rubber
Rheostatic fluids
Piezoelectric films
Capacitive force
Sound
Microphone
Sonar
Position
Microswitches
Shaft encoders
Gyro
Acceleration
MEMS
Pendulum
Monitoring
Voltage
Current
Temperature
Field
Antenna
Magnetic
Location
Permittivity
Dielectric
Examples of actuators…
Electrical
AC motors
DC motors
Solenoids
Relay
Stepper motors
Sound
Speaker
Hydraulic
Ram
Pump
Pneumatic
Ram
Architecture of an Embedded System
Many sensors & actuators are analogue: need ADC, DAC
PWM simulates analogue by turning digital signal on/off quickly
Varying on/off time gives different average value
Some sensors & actuators use digital data:
need support for standard digital interfaces, e.g. SPI, I2C
Computer
Actuators
Clocks, timers and counters
DAC
PWM
Digital comms
ADC
Sensors
Digital comms
Architecture of an Embedded System
Most systems have some kind of user interface
Many systems need to store data locally
Many systems communicate with a remote data store
Increasingly common for remote storage access to be wireless access to the Internet
Computer
Actuators
Clocks, timers and counters
ADC
DAC
PWM
Digital comms
Sensors
Digital comms
Remote Data store
User interface
Data logging
Microcontrollers and Microprocessors
Microprocessor
Chip contains central processing unit
Processes instructions
Microprocessor is one part in the system that forms the computer
CPU
Input/Output Devices
Memory
File store
Chip
Microcontrollers and Microprocessors
Microprocessor
Chip contains central processing unit
Processes instructions
Connects to external devices for
data memory,
instruction memory,
oscillator to generate clock,
peripherals to connect to outside world,
communication controllers….
Microprocessor is one part in the system that forms the computer
Microcontrollers and Microprocessors
Microcontroller
Chip contains all required systems to form a computer:
Microcontroller is computer on a single chip
Interfaces to external sensor and actuator circuitry
CPU
Input/Output Devices
Volatile Memory
Non Volatile Memory
Chip
Direct interface to surrounding circuitry
Microcontrollers and Microprocessors
Microcontroller
Chip contains
Central processing unit
data memory,
instruction memory,
oscillator to generate clock
peripherals to connect to outside world,
communication controllers….
Microcontroller is computer on a single chip
Comparison
Microprocessor chip
Very high speed processing
Can deal with very large programs and data sets
High current drain (poor battery lifetime)
Not normally designed with pins that can directly connect to general purpose external electronics
Microcontroller chip
Slow processing of small data sets
Excellent control of current drain (good battery lifetime)
Excellent for direct connection to external electronics
Many have useful built-in peripherals (e.g. ADC)
Single Board Computers
Single Board Computer (SBC)
Microprocessor-based computer
Built on small form-factor board
Contain support for IO connection to outside world (or vacant slots for IO daughterboards)
Single board computer
8-bit processor
8 MHz clock rate
What’s nice about an SBC?
Raspberry Pi
4-core 64-bit microprocessor
1.5 GHz clock rate
Interface for USB, HDMI, …
1 to 4 Gbyte RAM
8-bit microcontroller
ATmega 328P
Huge processing power
High speed peripherals
What’s nice about a microcontroller?
Idling current ~ 400 mA
Sleep mode ~500 mA
Idling current ~ 4 mA
Sleep mode current down to 1 mA
Raspberry Pi
ATmega 328P
Battery lifetime
What’s nice about a microcontroller?
8 general purpose IO pins on the board headers
Few have special capabilities
20 general purpose IO pins
Many have special capabilities (PWM, ADC, serial comms)
Raspberry Pi
ATmega 328P
Good control over directly connected peripherals
What’s nice about a microcontroller?
Price £35 – £55
Price £1.20 – £1.50
Raspberry Pi
ATmega 328P
Prototyping with bare chips is often inconvenient
Development boards are often used for prototyping
Boards have break-out headers for convenient connection
Microcontroller Development Boards
Development boards manage
download and flashing of new programs
communicating with host computer
power supply
additional (higher speed, more stable) clock generators
But this comes a cost in £, milliamps and size
Microcontroller Development Boards
Very wide range of capability and price
Differentiators:
Data and address size (8-bit, 16-bit, 32-bit)
On-board memory
Peripherals onboard
e.g. may have Analog-to-Digital Converter
Hardware facilities on-board
Controllers for different bus standards
Counters
Timers
Pulse-Width-Modulation generators
Range of Microcontrollers
Very wide range of suppliers
Low-end contains many different 8-bit processor designs:
Microchip PIC range
Microchip/Atmel AVR range
NXP 6811
MOS 6502
High-end is dominated by ARM intellectual property, e.g.
ST Microelectronics STM32
Texas Instruments MSP432
ARM produce designs for 32-bit processors that they sell to other companies
Cortex-M range
Range of Microcontrollers
Summary
Embedded Systems can be based in single board computers or single chip computers (microcontrollers)
Microcontrollers contain useful peripheral devices on board the processor chip
Prototyping boards have features to make prototyping easy (power supply, boot loader, interface to terminal)
/docProps/thumbnail.jpeg