Docsity

Embedded Systems - Embedded System Design - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download Embedded Systems - Embedded System Design - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

1

Lecture 1: Embedded Systems

Overview, AVR

Hardware/Software Introduction

2

Embedded Systems Overview

• Computing systems are everywhere

• Most of us think of “desktop” computers

  • PC’s
  • Laptops
  • Mainframes
  • Servers

• But there’s another type of computing

system

  • Far more common...

4

A “short list” of embedded

systems

And the list goes on and on

Anti-lock Auto-focus cameras brakes Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders Cell phones Cell-phone base stations Cordless phones Cruise control Curbside check-in systems Digital cameras Disk drives Electronic card readers Electronic instruments Electronic toys/games Factory control Fax machines Fingerprint identifiers Home security systems Life-support systems Medical testing systems

ModemsMPEG decoders Network cards Network switches/routersOn-board navigation PagersPhotocopiers Point-of-sale systems Portable video gamesPrinters Satellite phonesScanners Smart ovens/dishwashers Speech recognizersStereo systems Teleconferencing systemsTelevisions Temperature controllers Theft tracking systemsTV set-top boxes VCR’s, DVD playersVideo game consoles Video phones Washers and dryers

5

What is an embedded system?

• What makes a microcontroller:

– Self Contained

• CPU

• Memory

• I/O

– Application or Task Specific

• Not a general-purpose computer

• Appropriately scaled for the job

7

Designing Embedded Systems

• Microcontrollers

– Don’t have keyboard and monitor jacks

– Must use ports to perform I/O

• Inputs – to sense things

• Outputs – to control things

• Related Component Topics

– Common Interfaces

– Part Packages

8

What you will do:

  • Labs
    • Lab 1: Introduction to AVR STK Hardware/Software, a couple of simple c programs
    • Lab 2: A/D converter
    • Lab 3: Optical Sensors
    • Lab 4: 2 bits D/A converter
    • Lab 5: Controls and Feedback
    • Lab 6: Motor Control - open loop
    • Lab 7: Motor Control - simple feedback control
    • Lab 8: Motor Control - proportional feedback control

10

Introduction to AVR

  • CodeVision AVR C Compiler Professional

version

  • Installed in 20 PCs in room EN
  • Compile programs with more than a thousand instructions.
  • Provides many useful assembly programs used by your C programs. You write your programs in C completely. AVR C compiler will integrate all required programs together
  • More about AVR C compiler when presenting Lab 1

11

The Atmel AVR TM is a family of 8-bit RISC microcontrollers produced by Atmel.

The AVR architecture was conceived by two students at the Norwegian Institute of Technology (NTH) and further refined and developed at Atmel Norway , the Atmel daughter company founded by the two chip architects.

History of AVR

13

Used in Lab

14

AVR Architecture

  • What are the features of RISC?
    • 1 instruction per clock cycle (pipelined)
    • Lots of registers: 32 GP registers
    • Register-to-register operation
  • Variations in the parts:
    • TINY to MEGA
    • ATtiny
      • Processor has only 8 pins
    • ATmega128 (128K bytes flash)
      • Processor has 64 pins

16

AVR RISC Architecture

  • Single Cycle Instructions: 8mhz = 8mips.
  • Large register file (32).
  • Every register an accumulator.
  • 3 index register pairs
  • Register & IO are

mapped in SRAM space.

17

On ChipDebugger

Two Wire Interface

19

Typical Hardware Support

  • Internal or External Oscillator/Clock
  • Brown Out Detector
  • One or more timers
  • Two or more PWM
  • One or more USART
  • 10 bit ADC
  • Analog Comparator
  • External interrupts

20