You are on page 1of 20

EE4380 Microprocessor Design Project

Fall 2002 Class 1

Pari vallal Kannan


Center for Integrated Circuits and Systems University of Texas at Dallas

Introduction
l l

What is a Microcontroller ? Microcontroller Vs Microprocessor

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

System design Issues

22-Aug-02

Embedded Systems
l

Do one specialized task


Efficiently Cost effective manner

l l

Microcontroller based system + Software Embedded software


Usually small code footprint Assembly Language everywhere RTOS and HLLs are available Need special tools for development, debugging etc

22-Aug-02

Embedded Systems (contd.)


l

Embedded system design is unique

Normal software design usually targets fixed hardware


l

gcc, gdb, gprof and you are (usually) done !

Both hardware and software have to be engineered together Engineering decisions:


l l l

Hardware/Software partitioning (open problem) Device/Peripheral selection (memory size, vendor etc) Software development environment

22-Aug-02

Embedded Systems Design Styles


l l

Full Manual

Design hardware and software manually Sophisticated (high $) CAD tools


l l

Vendor tool assisted flow

HLL compilers Simulators, source level debuggers, ICE etc

Major engineering decisions are still manual Wish list item #1

Fully Automated Flow

22-Aug-02

Review of Logic Circuits


l l l l

Hex system
1000 1010 0011 1111b = 8A3FH

Hex arithmetic needed to calculate jump addresses Hex addition

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

Review of Logic Circuits (contd.)


l

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

Review of Logic Circuits (contd.)


l l

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

AD0 AD1 AD2 AD3 74LS573

A0 A1 A2 A3

Y7 CE 74LS138 Device 2 ADDRESS = 7H


D0 D1 D2 D3

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

ALU units, IO units, special units for comm, dsp, etc

22-Aug-02

Digital Systems (contd.)


l

Controller and Datapath Illustration


Control Lines Input External Control Inputs Controller Datapath Output

Status / Feedback

22-Aug-02

10

Overview of the 8051 Family


l

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

Clones may have different on-chip memory, timers etc


22-Aug-02

11

8051 Block Diagram

22-Aug-02

12

8051 Pinout Diagram From Intel 87C51


datasheet

DIP package Data lines and lower 8


address lines are muxed

Two ports P0 and P2 are


used by AD buses

Clones may not be pin


compatible

22-Aug-02

13

Some 8051 clones


l l l l l l l l

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

On-chip NV-RAM and In system programmable via serial-port

Philips Corp. 8051 cores from FPGA vendors

Xilinx, Altera, etc Triscend etc


14

8051 with programmable logic

22-Aug-02

8051 Development System


l

Components of a dev. System


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

8051 Dev. System Paulmon System


l l

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

8051 Dev. System - Monitor


l l l

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

8051 Dev. System Home Brew


l

Breadboard or Wire-wrap designs

DS 5000 in system programmable


l l

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

Atmel 89C51(52) and other Flash based clones


l

Design and etch your own PCB


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

You might also like