Sei sulla pagina 1di 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 What is a Microcontroller ?
l Microcontroller Vs Microprocessor
– Level of Integration
l Processor, memory, timer, UART, I/O ports etc
– Cost
l System cost, per unit cost
– Application domain
l General purpose Vs specialized
l System design Issues

22-Aug-02 2
Embedded Systems
l Do one specialized task
– Efficiently
– Cost effective manner
l Microcontroller based system + Software
l Embedded software
– Usually small code footprint
– Assembly Language everywhere
– RTOS and HLLs are available
– Need special tools for development, debugging etc

22-Aug-02 3
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 Hardware/Software partitioning (open problem)
l Device/Peripheral selection (memory size, vendor etc)
l Software development environment

22-Aug-02 4
Embedded Systems – Design Styles
l Full Manual
– Design hardware and software manually
l Vendor tool assisted flow
– Sophisticated (high $) CAD tools
l HLL compilers
l Simulators, source level debuggers, ICE etc
– Major engineering decisions are still manual
l Fully Automated Flow
– Wish list item #1

22-Aug-02 5
Review of Logic Circuits
l Hex system
1000 1010 0011 1111b = 8A3FH
l Hex arithmetic needed to calculate jump
addresses
l Hex addition
– Simple TBT addition with 1 carry for every 16
l Hex subtraction
– If subtrahend smaller than minuend then simple
TBT subtraction
– Else, swap and then find 2’s complement of result

22-Aug-02 6
Review of Logic Circuits (contd.)
l Logic gates
– For loose random logic
– Inverter, AND, OR, XOR, NAND, NOR, Tri-state buffer
l Decoders
– Used for address decoding
l Sequential elements
– Used for demuxing address/data lines, latches etc
– Flip-flops, latches
– Edge and level triggered
l Discrete components
– TTL devices (74xxx series), CMOS devices (CD4000, 74C etc)
– Linear devices (Op-amps, regulators, etc)

22-Aug-02 7
Review of Logic Circuits (contd.)
l Common use of a decoder - Address
generation
l Common use of a latch - Bus Demuxing
ALE

A0 A Y0 Device 1 AD0 A0
A1 B CE AD1 A1
AD2 74LS573 A2
A2 C ADDRESS = 0H
AD3 A3

Y7
CE Device 2 D0
D1

74LS138 ADDRESS = 7H D2
D3

22-Aug-02 8
Digital Systems
l Controller path and Data path
l Controller controls the datapath at specific control
points in the datapath
l Controllers are Finite State Machines (FSM)
l Controllers can be designed up from scratch or use a
Microprocessor / Microcontroller
l Microprocessor based digital system controller design
is essentially creating the software
l Microprocessors can also do some of the datapath’s
functions
– ALU units, IO units, special units for comm, dsp, etc

22-Aug-02 9
Digital Systems (contd.)
l Controller and Datapath Illustration

Control Lines
Input
External

Control Controller Datapath


Inputs
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
l 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
l 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 8031 – No on-chip ROM
l 8751 – With on-chip EPROM
l 8052 – 8051 with 128 bytes extra IRAM, extra 16 bit
timer, additional SFRs to use the timer
l Atmel AT89C51 – With on-chip Flash ROM
l Dallas Semicondustor DS5000
– On-chip NV-RAM and In system programmable via serial-port
l Philips Corp.
l 8051 cores from FPGA vendors
– Xilinx, Altera, etc
l 8051 with programmable logic
– Triscend etc

22-Aug-02 14
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.
l Common Features
– 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

22-Aug-02 15
8051 Dev. System – Paulmon System
l Easy to use Low-cost 8051
dev. System
l 87C52 at 22 MHz, 50 IO
lines, LCD interface, 32K
RAM, 30K Flash, Paulmon2
monitor, two serial ports, 8
LEDs
l Hardware prototyping area
l AS31 assembler, SDCC C
compiler
l Source code available for From: http://www.pjrc.com/tech/8051/board4/index.html
monitor
l Complete Schematic
available

22-Aug-02 16
8051 Dev. System - Monitor
l Think “Mini Operating System”
l Runs at startup (power-on)
l Provides a serial comm link to a Host PC. Terminal
emulators (hyperterminal, minicom, seyon etc) can be
used to “talk” with the monitor
l Provides facilities to download code and execute it
l Provides debugging facilities
l Has many functions that can be called by user
programs as sub-routines
l 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 Need only a crystal and a RS232 interface (MAX232)
l At power-on talks to Host PC and code can be downloaded
– Atmel 89C51(52) and other Flash based clones
l Reprogram with your code any number of times using a
PROM programmer
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 What is an embedded system ?
l Difference between Microprocessor and
Microcontroller ?
l What is embedded system design ?
l How is microprocessor related to digital system design
?
l What is an 8051 ?
l What is an 8051 development system ? What are its
components/features ?
l What is a monitor ? Why do you need it ?
l How to home-brew an 8051 development system ?

22-Aug-02 19
Class 1 : Thanks

22-Aug-02 20

Potrebbero piacerti anche