Microprocessor or Microcontroller Not just a case of “you

Download Report

Transcript Microprocessor or Microcontroller Not just a case of “you

Microprocessor or
Microcontroller
Not just a case of “you say tomarto and I say tomayto”
M. Smith, ECE
University of Calgary, Canada

Information taken from Analog Devices On-line
Manuals with permission
http://www.analog.com/processors/resources/technicalLibrary/manuals/

Information furnished by Analog Devices is believed
to be accurate and reliable. However, Analog
Devices assumes no responsibility for its use or for
any infringement of any patent other rights of any
third party which may result from its use. No license
is granted by implication or otherwise under any
patent or patent right of Analog Devices. Copyright
 Analog Devices, Inc. All rights reserved.
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
2/ 29
Tackled today





Basic microprocessor
Concept of a microcontroller
Difference between the Blackfin
microcontroller and Blackfin Ez-Kit Lite
evaluation board
Capabilities of the ADSP-BF533 Blackfin EzKit Lite evaluation board
Various acronyms that will be used in the
course
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
3/ 29
Microprocessor – Basic concept
ADDRESS BUS
32-bit / 64-bit wide
CPU
contains
CCU
ALU
data registers
and
pointer registers
CONTROL BUS
Timing signals, ready signals,
interrupts etc
DATA BUS – bidirectional
8-bit / 16-bit / 32-bit / 128-bit
Microprocessor, by-itself, completely useless – must have external peripherals to
Interact with outside world
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
4/ 29
Microprocessor – Basic concept
CONTROL
ADDRESS
CPU
contains
CCU
ALU
data registers
and
pointer registers
BOOT
ROM
Used at
startup
Instruction
(program)
ROM
Data
RAM
Keyboard
Screen
UART
Transducers
Parallel
interface
etc
DATA
Microprocessor, by-itself, completely useless – must have external peripherals to
Interact with outside world
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
5/ 29
Every external device needs this amount
of support “glue logic”
ADDRESS BUS
DECODE LOGIC
•Address strobe
•CS – chip select
•Data strobe
External
Device
•Read/Write
control
Device itself with all necessary internal logic
•OE – output enable
DATA BUS
29 August 2004
•Interrupt signals, etc
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
6/ 29
Issues with external devices

Many pins




Continually redesigning same thing




Mechanical failure increased
Design time increased – routing issues
Cost increased, board size increased
Compatibility between parts
Upgrade part
Many similar options between different projects
Don’t need “100% flexibility”
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
7/ 29
Microcontroller – Basic concept
CONTROL
ADDRESS
BOOT
ROM
CPU
contains
CCU
ALU
data registers
and
pointer registers
Used at
startup
Instruction
(program)
ROM
Data
RAM
UART
Parallel
interface
Transducers
Etc
DATA
Microcontroller – put a limited amount of most commonly used resources
“inside” the chip
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
8/ 29
Advantages of microcontroller






Pin count down
Design time down, Board layout size down
Upgrade path easier – matching between
peripherals
Cost down – bulk purchases
Reliability up
Common software / hardware design
available from manufacturer
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
9/ 29
Issues




Two types of memory
 On-chip – fast, easy to access, “almost like a register”, limited
amount available
 Off-chip – slower
 Use on-chip memory in a “cache” mode
External components still there
 E.g. Video CODECs – need to use DMA – Direct Memory Access
– so that the controller can get on with the “processing” and let
something else worry about moving data in and out of the chip
Real time environment
 Event driven – can’t WAIT for a device to become ready, can’t
POLL to see if device is ready, interrupt handling is key
All these resources are “power hungry” and compete for
resources (data busses etc) – special features
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
10/ 29
From smallest to largest

Processor Core




One core on Blackfin ADSP-BF533
Two cores on Blackfin ADSP-BF561
Processor itself
Blackfin Evaluation board

Don’t forget the software development package
VisualDSP++
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
11/ 29
Blackfin ADSP-BF533
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
12/ 29
Enter the key elements from previous slide
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
13/ 29
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
14/ 29
Enter the key elements from previous slide
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
15/ 29
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
16/ 29
Enter the key elements from previous slide
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
17/ 29
Audio-Video Interaction of ADSP-BF533
Ez-Kit Lite with the outside world
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
18/ 29
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
19/ 29
Enter the key elements from previous slide
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
20/ 29
Push-button switches (PF lines)
LED (controlled by FLASH memory logic)
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
21/ 29
Lab. 2 – demonstration of microcontroller
capability

Use the microcontroller

Configure the FLASH memory



Contains memory and also I/O components (input /
output)
Use the FLASH memory I/O capability to control
the LED
Configure the PF lines (Programmable flags)


29 August 2004
Used to control many of the external devices (chip select
and timing lines)
Used as input (Lab. 2) and / or interrupt lines (Lab. 3)
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
22/ 29
Need to learn how to “configure” the flash memory so that
We can control the LEDs
Parallel
interfaces
present on
the
FLASH
memory
chips
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
23/ 29
Need to configure the PF lines
(Programmable Flags)
Replace one button input
with the input of a
temperature transducer
TMP03 as used in
Assignment 1
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
24/ 29
Control of the PF lines – how / why?
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
25/ 29
PF lines being used by other devices


When we
change the PF
registers, we
must ONLY
change those
over which we
have control
PF8, PF9,
PF10, PF11
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
26/ 29
Review quiz

CPU stands for

CCU stands for

ALU stands for

DMA stands for
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
27/ 29
Review Quiz

How come the FLASH memory can be used to
control the LEDs?

Why can’t we use PF0 line in Lab. 1 to read
temperature transducer signals?

Why will AND and OR operations be necessary
when we control the PF lines?

What does PF stand for?
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
28/ 29
Tackled today





Basic microprocessor
Concept of a microcontroller
Difference between the Blackfin
microcontroller and Blackfin Ez-Kit Lite
evaluation board
Capabilities of the ADSP-BF533 Blackfin EzKit Lite evaluation board
Various acronyms that will be used in the
course
29 August 2004
Differences between a microprocessor and a microcontroller
M. Smith, University of Calgary, Canada
29/ 29