Introduction to Embedded Systems Manuel Lois Anido Federal University of Rio de Janeiro Undergraduate Course in Computer Science NCE/IM 1 Introduction to Embedded Systems Course Objectives: • Study the Methods to Design and Implement Embedded Systems. It is an Interdisciplinary Course which Involves Software and Hardware Knowledge (mostly software). Important Issues: • • • • • • • Arithmetic, Basic Hardware Microcontrollers Interrupts, Concurrency Timing Limited Resources Finite State Machines Connecting I/O Devices Evaluation: • Theorethical Assignments • Practical Assignments 2 Course Outline Introduction to Embedded Systems Basic Electricity, Electronics Concepts and Devices Integer and Fixed-Point Arithmetic Overview of Popular Microcontrollers and DSPs with Associated Assembly Language Using C and IDEs for System Development Interrupts, DMA, Polling, Timers Finite State Machines Basic Microcontroller Interface Circuits – Parallel, Serial, Bar codes, Magnetic cards, smart cards, keyboards, LCDs, USB, SCSI, etc Real-Time Systems Concepts and RTOS Java/Jini for Embedded Devices 3 Embedded Systems’ Books Course is centered on Slides and Papers Text Books: • • Embedded C – Michael J. Pont, Addison Wesley Publ. (C programming for 8051 line) Microcontrolador 8051 Detalhado – Denys E. Nicolosi – Editora Érica • • Microcontrolador PIC – PIC – Programação em C – Fabio Ferreira – Ed. Érica, Desbravando o PIC – David José de Souza – Ed. Érica. • Embedded System Design: A unified Hardware/Software Introduction (Frank Vahid): www.cs.ucr.edu/content/esd/ (on line) • Useful Link on C programming for 8051 - http://www.spjsystems.com/c31exmpl.htm Other Useful Books: • Basic Electronics: Any Basic Book that Describes Electronic Components • Computer Arithmetic: Computer Arithmetic – Algorithms and Hardware Designs – Behrooz Parhami – Oxford Press – ISBN – 0-19-512583-5 • C and the 8051 – Building Efficient Applications – Thomas W. Shultz – Prentice Hall PTR (see www.amazon.com) • ARM and Texas DSP – Look for it at the Internet • Sistemas de Tempo Real: Livro Tempo Real em Formato Eletrônico (PDF) • Java/Jini: Look for it at the Internet 4 Embedded Systems’ Tools Check Your CD-ROM Tools for the 8051 line of Microcontrollers: • • • Keil System IDE: www.keil.com (BEST ONE for 8051 family) EZ Downloader – To donwnload object code through serial port to program 8051 chips PROTEUS and ISIS – CAD (or EDA) system with schematic capture and simulation Tools for the PIC line of Microcontrollers: • CCS – C compiler for PIC Microcontroller • MPLAB – IDE from Microchip for PIC Microcontroller – Editor, File Manager, etc • PROTEUS and ISIS – EDA system with schematic capture and simulation • IC-Prog – To download object code through parallel or serial ports to program PIC chips 5 Embedded Systems - URLs Development kits in Brazil: http://kit.microcontrolador.com 6 Course Evaluation 2 simple homeworks (individual) ( Hw) 1 Exam (Ex1) 1 very simple project (group of two) (P1) 1 project (group of two) (P2) 1 final exam (individual) (Fe) 1 exam that can substitute Ex1 or Fe Evaluation: Average = (0.6*Ex1 + [Ex1 *1.4*(Hw1 + Hw2 + P1 +P2)/4]/10)/2 If Average >= 7 Pass else Go To Final Exam If (Fe + Average)/2 >= 5 PASS Else Fail 7 Introduction Embedded System is a small computer system that is generally hidden inside equipment (machine, electrical appliance) to increase the intelligence of the equipment for better or more efficient functionality. This kind of system always involves both the software and hardware codevelopment. Embedded systems are often easier understood in term of Smart Devices, Intelligent, or Automated Equipment. MARKET (2001) PC´s !! 8 Market for Embedded Microprocessors About four (!) percent of the world’s microprocessors are used in computers. Source: Embedded Systems Programming, May 1999 embedded microprocessors Motorola, ARM, MIPS, i960, x86, … 8-bit 1 billion 8-bit 1 billion 16-bit 1 billion 32-bit 250 million Only 4% of the total number 125 million PCs Intel, AMD Average car has about 15 microprocessors. Mercedes S-class: 63 microprocessors !! 9 A “short list” of embedded systems Anti-lock brakes Auto-focus cameras 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 Modems MPEG decoders Network cards Network switches/routers On-board navigation Pagers Photocopiers Point-of-sale systems Portable video games Printers Satellite phones Scanners Smart ovens/dishwashers Speech recognizers Stereo systems Teleconferencing systems Televisions Temperature controllers Theft tracking systems TV set-top boxes VCR’s, DVD players Video game consoles And Video phones Washers and dryers the list goes on and on . . . 10 Apollo Guidance Computer (AGC) Word length: 16 bits (15 bits data + parity bit) First computer using integrated circuits (ICs) Magnetic core memory Fixed memory (ROM): 36,864 words Erasable memory (RAM): 2,048 words Number of instructions: 34 Cycle time: 11.7 msec Clock frequency: 85 kHz (!) Number of logic gates: 5,600 (2,800 packages) Weight: 30 kg Power consumption: 70 W 11 Technology Areas of Embedded Systems C, Java Languages Embedded Real-Time Program Embedded RTOS Network + Protocol Real World Interfacing Human Computer Interaction Digital + Analog Circuit DSP Control Systems VHDL Verilog Machine Fixed Point Intelligence Arithmetic 12