You are on page 1of 24

Seminarios-Taller de Informtica Hardware

Microprocessor-based Digital Systems

Grado en Ingeniera Informtica Primer Curso

Microprocessor-based Digital Systems

Agenda
1. Microprocessor-based Embedded Systems 2. Microcontrollers 3. Skybot Robot

Microprocessor-based Digital Systems

Microprocessor-based Embedded Systems

Microprocessor-based Digital Systems

Computers
When you hear the word computer, you always think of a desktop computer:

But we are surrounded by thousands of invisible computers, embedded in complex devices


Microprocessor-based Digital Systems

Embedded Computers
Every electronic or electromechanical system has a computer (or many) embedded in it:

Microprocessor-based Digital Systems

So What Is an Embedded System?


An embedded system is a special-purpose computer system built into a larger device
Embedded systems are required to meet very different requirements than a general-purpose personal computer

Two distinguishing characteristics:


Cost: Since embedded systems are produced in the tens of thousands to millions of units range, reducing cost is a major concern. Embedded systems often use a (relatively) slow processor and small memory size to minimize costs Space and Power consumption: Usually embedded systems have tight space limitations, so they must be built out of a few components (this also benefits the cost) and complex power dissipation mechanisms (like fans) are not allowed
Microprocessor-based Digital Systems

What Is an Embedded System? Software Issues


The third feature of a embedded system is that it is single-functioned, not general-purpose like a desktop
The SW run in the embedded systems is called Firmware

It is stored in non-volatile memory (Flash, ROM) At most they have a simple operating system, but in most cases the have no OS at all A embedded system is a real time computer
Continually react to changes in the systems environment

Reliability is a must
In most embedded systems a software crash is simply not allowed, e.g. ABS brake system or DVD player
Microprocessor-based Digital Systems

A Little History
One of the first embedded systems was the Apollo Guidance Computer, started in 1962:

Microprocessor-based Digital Systems

The Apollo Guidance Computer


Developed by the Charles S. Draper team at the MIT The first computer built using ICs (4100 3-input NORs connected by wire-wrapping) 4K RAM (ferrite core) 32K ROM (core rope mem) 11 instructions 16 registers 5 vectored interrupts Programmed in assembler, it had a non-preemptive multitasking OS (up to 8 jobs)

Microprocessor-based Digital Systems

Embedded Systems Today

James Benefer, Designing an optimal wireless SoC, EET October 11th 2004
Microprocessor-based Digital Systems

10

Embedded Systems Today (2)


Most of the components are integrated in one chip
System on a chip, SoC, with millions of transitors Can integrate analog and RF sections, and flash memories. Only SDRAM, some passive components and power supply are needed.

Multiprocessing:
A general purpose processor together with a DSP, and also there might be custom co-processors (e.g. MPEG-4)

Plenty of peripherals:
General-purpose (Timers, INTC, UART) as well as specific ones (HDD, Memory Card, Wireless, USB) Platform-based design
Microprocessor-based Digital Systems

11

Embedded Systems Are Everywhere

The average middle-class American household has about 40 to 50 microprocessors in it Another 10 microprocessors are in every PC The Mercedes S-class has 65
Microprocessor-based Digital Systems

12

Some Examples: Bluetooth

Bluetooth RF System-on-Chip: Product Design Challenges and Tradeoffs Andreas Sibrai and Vjekoslav Matic, TechOnLine Jan. 28, 2004
Microprocessor-based Digital Systems

13

Some Examples: DVD Writer

Microprocessor-based Digital Systems

14

But Do Things Have to Be that Complex?

Microprocessor-based Digital Systems

15

No! Still a Lot of Problems Can Be Solved with 8-Bit Microprocessors

Microprocessor-based Digital Systems

16

Most Embedded Systems Are Simple


Intel just holds a 2% of the global processor market
Currently there are 40 MCU vendors, 1300 different 8-bit devices and 240 32-bit alternatives

Plenty of problems are solved with a simple 8-bit microcontroller:


Successful PIC and Motorola HC08 families Low-cost and low-power, and have SoC features (a lot of peripherals, analog sections) Known devices, no need for learning new design flows

The best solution is not the most complex, is the one that optimizes the tradeoff between all the different design metrics
Microprocessor-based Digital Systems

17

Design Metrics
Cost
Unit cost: The cost of manufacturing each unit (just the component and assembly costs) NRE (Non-Recurring Engineering Cost): The one-time cost of designing the system (includes prototyping)

Performance
Most important: Ability to work in real time Time to give a response to the user (e.g. navigation system)

Physical Constraints
Size Power

Microprocessor-based Digital Systems

18

Design Metrics (2)


Development time
Time-to-protoype: The time needed to build a first working version of the system Time-to-market: The latter time, plus the time to manufacture the product and distribute it to the resellers

Other design issues


Flexibility: the system can be used for different tasks without significantly increasing the NRE or the unit costs Maintainability: the system can easily be updated and/or repaired Fail-safe operation: Necessary in mission-critical systems, like life support
Microprocessor-based Digital Systems

19

Microcontrollers

Microprocessor-based Digital Systems

20

Definition
A microcontroller is an integrated circuit or chip that includes the three functional units of a computer:
Central Processing Unit Memory Input/Output and/or peripherals

Microprocessor-based Digital Systems

21

Definition
Microcontrollers are usually designed for specific applications
Price and power consumption are important Each application has different needs

Performance of the Central Processing Unit Size of memory Peripherals

Microprocessor-based Digital Systems

22

Microcontroller vs. Microprocessor


There are several differences, but the most important is the functionality
A microprocessor needs additional components such as memories, peripherals, etc. A microcontroller includes all the necessary components No additional components are necessary (usually) All peripherals and additional units are included

Microprocessor-based Digital Systems

23

Components of a Microcontroller

Fuente: http://o.mneina.googlepages.com/what_is_microcontroller.htm Microprocessor-based Digital Systems

24

Components of a Microcontroller
Memory unit
Store the program instructions and temporal data Program memory is not usually bigger than 16 K-words of nonvolatile memory Data memory, typically SRAM, is not usually bigger than 5 Kilobytes

Central processing unit


Executes operations with memory Executes arithmetic operations Includes small high-speed memory called registers Store data for arithmetic and memory operations

Microprocessor-based Digital Systems

25

Components of a Microcontroller
Buses
There are two types of buses: address and data
Address bus contains the position to be read or write Data bus contains the data to be read or write

Input/Output units
Also known as ports There are three types of ports:
Input Output Bidirectionals

Ports are part of the memory


They can be read or write The value of the port is the value of the pins of the port

Microprocessor-based Digital Systems

26

Components of a Microcontroller
Timer
Provides a time reference for timing, counting, etc. It is basically a counter
A register which value is incremented each clock cycle Take the value before and after a task to calculate the execution time of the task

Very important component

Communications
Peripherals to communicate with the outside world Parallel, serial, USB, CAN, Ethernet, etc.
Microprocessor-based Digital Systems

27

Components of a Microcontroller
Watchdog
Internal timer Helps to detect if
If the microcontroller is stopped The program is not working correctly

Analog-Digital Converter (ADC)


Outside world is usually analogic Allows to convert analog signals to digital signals a vice versa Microcontroller only operates with digital values

Microprocessor-based Digital Systems

28

Microcontrollers Vendors

Microprocessor-based Digital Systems

29

Microcontrollers Shapes

Microprocessor-based Digital Systems

30

Sistema Skybot

Microprocessor-based Digital Systems

31

Skybot Descripcin
Sistema abierto para el desarrollo completo de robots Software multiplataforma Estructura metacrilato con dos motores de CC Sensores:
2 sensores de contacto Hasta 4 fotodetectores 1 LDR 1 Rele

Electrnica:
CPU: Skypic (Microcontrolador PIC) Tarjeta de potencia: Sky293 (L293)
Microprocessor-based Digital Systems

32

Skybot Descripcin
Sensores de luz

Sensores de contacto

Sensores de infrarrojos

Microprocessor-based Digital Systems

33

Skybot Ejemplos

Sigue lneas

Mogolln

Microprocessor-based Digital Systems

34

CPU: Skypic Descripcin


Tarjeta entrenadora para los PIC16f87X Contiene el PIC16f876a Compatible con el ICD2 de Microchip Led y pulsador de pruebas Conexin directa de 8 servos Hardware libre y multiplataforma Conectores que dan acceso a todos los recursos del microcontrolador Dos sistemas de comunicaciones diferentes para su interconexin con otras tarjetas, un PC o cualquier otro sistema
Driver serie tipo RS-232 Bus I2C para conexin de sensores

Microprocessor-based Digital Systems

35

PIC 16f876a (pines)

Microprocessor-based Digital Systems

36

Microprocessor-based Digital Systems

37

Microprocessor-based Digital Systems

38

La Skypic aade a este circuito: Conversor TTL->RS232 LED de pruebas Pulsador de pruebas Conexin ICD2 Bus I2C

Microprocessor-based Digital Systems

39

Skypic Interfaces

Microprocessor-based Digital Systems

40

Potencia: Sky293 Descripcin


Interfaces para manejar hasta 2 motores bidireccionales o un motor paso a paso bipolares. L293 que contiene 2 Puente-H Interfaces para polarizar y controlar la lectura (analgico y/o digital) de hasta 4 fotodetectores Permite un sistema de alimentacin de los motores diferente al de la lgica Dispone de 6 entradas analgicas (Pueden ser entradas/salidas digitales y otras 4 seales de entrada/salida digital). Dispone de un rel

Microprocessor-based Digital Systems

41

Sky293 Interfaces

Microprocessor-based Digital Systems

42

Software
Para programar el Skybot necesitamos las siguientes herramientas:
SDCC: Compilador de C para microcontroladores PIC GPUTILS: Utilidades para microcontroladores PIC Pydownloader: Descarga de programas a la Skypic Skybot-test: Programa de diagnsticos para Skybot

Editor de textos para escribir los programas Enlaces recomendados:


http://www.iearobotics.com/wiki/index.php?title=Taller_Skybot:Sesi%C3%B3n_3 http://www.iearobotics.com/wiki/index.php?title=Taller_Skybot:Sesion4:Programaci%C3%B3n_del_Skybot http://www.iearobotics.com/wiki/index.php?title=Programaci%C3%B3n_del_PIC16_en_C

Microprocessor-based Digital Systems

43

Microprocessor-based Digital Systems

44

Conexin al PC

Puerto Serie RS232-38400,8n1 En los laboratorios: COM1


Microprocessor-based Digital Systems

45

Programas
Programmers Notepad: Editor - Compilador

Microprocessor-based Digital Systems

46

Programas
Pydownloader: Descarga Skybot-test: Prueba del robot

Microprocessor-based Digital Systems

47

Manuales y referencias
Descripcin del robot Skybot
http://www.iearobotics.com/wiki/index.php?title=Skybot

Proceso de montaje del Skybot


http://www.iearobotics.com/wiki/index.php?title=Taller_Skybot

Instalacin del software


http://www.iearobotics.com/wiki/index.php?title=Taller_Skybot:Sesi%C3%B3n_3

Manuales de programacin
http://www.iearobotics.com/wiki/index.php?title=Taller_Skybot:Sesion4:Programaci%C3%B3n_del_Skybot http://www.iearobotics.com/wiki/index.php?title=Programaci%C3%B3n_del_PIC16_en_C

Manual de la Skypic
http://www.iearobotics.com/wiki/index.php?title=Skypic

Manual de la Sky293
http://www.iearobotics.com/proyectos/sky293/sky293.html
Microprocessor-based Digital Systems

48

You might also like