Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is...

31
Chapter 1 Sections 16 Dr. Iyad Jafar Getting Started with Embedded Systems

Transcript of Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is...

Page 1: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Chapter 1Sections 1‐6

Dr. Iyad Jafar

Getting Started with Embedded Systems

Page 2: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Outline

What is an Embedded System? 

The Essence of Embedded Systems 

Embedded systems examples 

Some Computer Essentials 

Microprocessors vs. Microcontrollers 

The PIC Microcontroller 

The PIC 12 Series as an Example2

Page 3: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

What is an Embedded System?An embedded system is a computer system that is designed to perform one or a few dedicated functions often with real‐time computing constraintsembedded as part of a complete device often including hardware and mechanical parts. 

By contrast, a general‐purpose computer, such as a personal computer, is designed to be flexible and to meet a wide range of end‐user needs.

3

Page 4: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

The Essence of Embedded Systems

4

Embedded Computer Hardware

Software Input 

VariablesOutput Variables

Link to other systems

User Interaction

Page 5: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

The Essence of Embedded SystemsCharacteristics

Microcontroller or DSP based 

Software driven 

Reliable 

Real‐time control system 

Autonomous / human interactive / network interactive 

Operate on diverse input variables and in diverse environments 

5

Page 6: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

AutomotiveAvionics/Aerospace/DefenceIndustrial AutomationTelecommunicationsConsumer Electronics & Intelligent Homes & Retail (Thin Clients/POS)Scientific & Medical EquipmentComputer peripherals

Examples

6

Page 7: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Examples

7

Page 8: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Examples

The refrigerator is required to maintain low temperature by reading the current value and controlling the compressor accordingly

8

Page 9: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Examples

Different sensors in the car door produce signals that are of great importance when integrated with the rest of the car functionality

9

Page 10: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Examples

The Electronic ‘ping‐pong’

10

Page 11: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Examples

The Derbot Autonomous Guided VehicleMore sensors and powerful microcontroller 11

Page 12: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Examples

The Derbot Autonomous Guided Vehicle12

Page 13: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Embedded Systems Market

Source: BCC research http://www.bccresearch.com13

Page 14: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Embedded Systems Market

Source: BCC research http://www.bccresearch.com14

Page 15: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Memory

Some Computer EssentialsElements of a Computer 

15

Central Processing 

Unit

The outside world

Input / Output

Program

Data 

Information path (Bus)

Page 16: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Some Computer EssentialsMemory Organization 

The Von Neumann ArchitectureOne address bus and one data busI/O may be also connected to these busses Simple and logical architecture, however  Same memory width for instruction and data ?!Shared busses ?!

16

Page 17: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Some Computer EssentialsMemory OrganizationThe Harvard Architecture

Separate address and data bus for program memory and data memoryMore flexibility;Different memory widthSimultaneous access of data and program memories 

Complex ?! 

17

Page 18: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Some Computer EssentialsInstruction Sets

Every CPU has a set of instructions that it can recognize and execute There are different approaches in designing instructions for the CPU in attempt to speed up program execution CISC (Complex Instruction Set Computers) 

Many instructions and addressing modes Instructions have different levels of complexity (different size and execution time)Relatively slow Shorter programs 

RISC (Reduced Instruction Set Computers)  Few instructions and addressing modes Simple instructions of fixed sizeRelatively fast  Longer programs 18

Page 19: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Some Computer EssentialsMemory TypesVolatile 

Holds its contents as long as power is ONUsed as temporary storage to hold data Easy to write RAM 

Non‐volatileRetains its values on power out More difficult to write in terms of time and power In embedded systems, it is usually used to store programs ROM 

19

Page 20: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microprocessors and Microcontrollers

First microprocessors in the 1970s The computer CPU on a single chip Initially, memory and I/O interfacing outside the CPUAs technology evolved, the microprocessor became more self‐contained,  powerful, and faster 

A special category of microprocessors emergedMicrocontrollers Intended for control purposesNo high computational power, huge memories, or high speed is required Has excellent I/O capabilities Small, low cost, and self contained 20

Page 21: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microprocessors and Microcontrollers

A generic microcontroller 

21

Page 22: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microprocessors and Microcontrollers

Microcontroller Families Different families with each family built around the same coreFamily members differ in memory size and peripheral capabilities 

22

Page 23: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microprocessors and MicrocontrollersMicrocontroller Packaging 

Plastic packagingPins for I/O, clock, communication,  and Power.The number of pins usually determines the size of the chip

23

Motorola 68000

PIC 16F877

PIC 16C72

PIC 16F84A

PIC 12F508

Motorola 68HC05B16

Page 24: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microchip and the PIC Microcontrollers

• Peripheral Interface Controller (PIC) was originally a design by General Instruments intended for simple control applications 

• In the late 1970s, GI introduced PIC® 1650 and 1655 • Standalone design • RISC with 30 instructions• Single working register  (accumulator)• Many attractive features 

• PIC was sold to Microchip

24

Page 25: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microchip and the PIC Microcontrollers

25

Page 26: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microchip and the PIC Microcontrollers

26

Page 27: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microchip and the PIC Microcontrollers• PIC Families 

• Example: the 16C84 was the first of its kind built using CMOS technology. It was later reissued as 16F84Aincorporating flash memory and other technological features

27

PIC Family Stack Size (words)

Instruction Word Size

No. of Instructions

Interrupt Vectors

12CX/12FX 2 12‐ or 14‐bit 33 None

16C5X/16F5X 2 12‐bit 33 None

16CX/16FX 8 14‐bit 35 1

17CX 16 16‐bit 58 4

18CX/18FX 32 16‐bit 75 2

Page 28: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Microchip and the PIC Microcontrollers

• PIC Characteristics • Low‐cost • Self‐contained • 8‐bit• Harvard architecture • RISC • Pipelined • Single accumulator (the working or W register)• Fixed reset and interrupt vectors 

28

Page 29: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

The PIC 12 Series • PIC 12F508/509• The smallest and simplest PIC 

29

Page 30: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

The PIC 12 Series Architecture 

30

Page 31: Getting Started with Embedded Systems - uCozramzi.ucoz.com/01_Chapter_1-Introduction.pdf · What is an Embedded System? y The Essence of Embedded Systems y Embedded systems examples

Summary• An embedded system has one or more computers embedded within it that perform control operations

• A microcontroller is at the heart of embedded systems. It is basically a microprocessor with extended I/O capabilities 

• Microchip is one of the popular vendors for a large variety of microcontrollers with different features

31