Professional Documents
Culture Documents
Introduction
l l
Level of Integration
l
Processor, memory, timer, UART, I/O ports etc System cost, per unit cost General purpose Vs specialized
Cost
l
Application domain
l
22-Aug-02
Embedded Systems
l
l l
Usually small code footprint Assembly Language everywhere RTOS and HLLs are available Need special tools for development, debugging etc
22-Aug-02
Hardware/Software partitioning (open problem) Device/Peripheral selection (memory size, vendor etc) Software development environment
22-Aug-02
Full Manual
22-Aug-02
Hex system
1000 1010 0011 1111b = 8A3FH
Simple TBT addition with 1 carry for every 16 If subtrahend smaller than minuend then simple TBT subtraction Else, swap and then find 2s complement of result
6
Hex subtraction
22-Aug-02
Logic gates
For loose random logic Inverter, AND, OR, XOR, NAND, NOR, Tri-state buffer Used for address decoding Used for demuxing address/data lines, latches etc Flip-flops, latches Edge and level triggered TTL devices (74xxx series), CMOS devices (CD4000, 74C etc) Linear devices (Op-amps, regulators, etc)
l l
Decoders
Sequential elements
Discrete components
22-Aug-02
Common use of a decoder - Address generation Common use of a latch - Bus Demuxing
ALE
A0 A1 A2
A B C
Y0 CE
Device 1 ADDRESS = 0H
A0 A1 A2 A3
22-Aug-02
Digital Systems
l l l l l l
Controller path and Data path Controller controls the datapath at specific control points in the datapath Controllers are Finite State Machines (FSM) Controllers can be designed up from scratch or use a Microprocessor / Microcontroller Microprocessor based digital system controller design is essentially creating the software Microprocessors can also do some of the datapaths functions
22-Aug-02
Status / Feedback
22-Aug-02
10
One of the oldest (Intel MCS-51 in 1981) and probably the most popular microcontroller. Many derivatives are marketed by a number of vendors Common features,
8-bit processor 4 I/O ports each 8bits wide max of 64K on-chip ROM (usually 0k to 4k) max of 64K external data memory max of 64K external code memory 2 timers, one serial port 128 bytes of on-chip RAM various speeds from 12MHz
11
22-Aug-02
12
22-Aug-02
13
8031 No on-chip ROM 8751 With on-chip EPROM 8052 8051 with 128 bytes extra IRAM, extra 16 bit timer, additional SFRs to use the timer Atmel AT89C51 With on-chip Flash ROM Dallas Semicondustor DS5000
22-Aug-02
PCB board with microprocessor, memory, peripherals, I/O etc Development software Assemblers, compilers, debuggers, monitors, emulators, communication software, drivers Usually supplied by the vendor. Free and Open-source tools are also available. HW Prototyping facilities (free ports, address spaces, connectors, etc) Software design and testing Software download onto the dev. System and debugging Interface the Dev. System with a host PC for download and debugging
Common Features
22-Aug-02
15
l l l l
Easy to use Low-cost 8051 dev. System 87C52 at 22 MHz, 50 IO lines, LCD interface, 32K RAM, 30K Flash, Paulmon2 monitor, two serial ports, 8 LEDs Hardware prototyping area AS31 assembler, SDCC C compiler Source code available for monitor Complete Schematic available
From: http://www.pjrc.com/tech/8051/board4/index.html
22-Aug-02
16
l l l l
Think Mini Operating System Runs at startup (power-on) Provides a serial comm link to a Host PC. Terminal emulators (hyperterminal, minicom, seyon etc) can be used to talk with the monitor Provides facilities to download code and execute it Provides debugging facilities Has many functions that can be called by user programs as sub-routines Makes embedded system (HW and SW) design very easy and quick.
22-Aug-02
17
Need only a crystal and a RS232 interface (MAX232) At power-on talks to Host PC and code can be downloaded Reprogram with your code any number of times using a PROM programmer
Use Flash based or ISP or Use external (E)EPROM Program the (E)EPROM with your code, using a PROM programmer.
22-Aug-02
18
Class-1 : Review
l l l l l l l l
What is an embedded system ? Difference between Microprocessor and Microcontroller ? What is embedded system design ? How is microprocessor related to digital system design ? What is an 8051 ? What is an 8051 development system ? What are its components/features ? What is a monitor ? Why do you need it ? How to home-brew an 8051 development system ?
22-Aug-02
19
Class 1 : Thanks
22-Aug-02
20