Microprocessor or Microcontroller Not just a case of

  • Slides: 28
Download presentation
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say

Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada

n Information taken from Analog Devices On-line Manuals with permission http: //www. analog. com/processors/resources/technical.

n Information taken from Analog Devices On-line Manuals with permission http: //www. analog. com/processors/resources/technical. Library/manuals/ n 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. 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 2/ 29

To be tackled today n n n Basic microprocessor Concept of a microcontroller Difference

To be tackled today n n n Basic microprocessor Concept of a microcontroller Difference between the Blackfin microcontroller and Blackfin Ez-Kit Lite evaluation board Capabilities of the ADSP-BF 533 Blackfin Ez. Kit Lite evaluation board Various acronyms that will be used in the course 13 September 2006 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

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 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 4/ 29

Micro. PROCESSOR – Basic CONTROL BUS concept ADDRESS BUS CPU contains CCU ALU data

Micro. PROCESSOR – Basic CONTROL BUS concept ADDRESS BUS 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 BUS Microprocessor, by-itself, completely useless – must have external peripherals to Interact with outside world 13 September 2006 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” to work ADDRESS BUS

Every external device needs this amount of support “glue logic” to work ADDRESS BUS DECODE LOGIC • Address strobe • CS – chip select • Data strobe External Device • Read/Write control OE Output Enable Device itself with all necessary internal logic to do the things it needs to do other signals such as interrupt signals, etc DATA BUS 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 6/ 29

Issues with external devices n Many pins q q q n Continually redesigning same

Issues with external devices n Many pins q q q n Continually redesigning same thing q q q n Mechanical failure rates increased Design time increased – routing issues Cost increased, board size increased Compatibility between parts Upgrade part Many similar options between different projects In Real-life -- Don’t need “ 100% flexibility” 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 7/ 29

Micro. CONTROLLER – Basic concept CONTROL ADDRESS BOOT ROM CPU contains CCU ALU data

Micro. CONTROLLER – 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 – a “limited” amount is often “enough” for many applications 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 8/ 29

Advantages of micro. CONTROLLER over micro. PROCESSOR n n n Pin count down Design

Advantages of micro. CONTROLLER over micro. PROCESSOR n n n Pin count down Design time down, Board layout size down Upgrade path easier – matching between peripherals for speed Cost down – bulk purchases Reliability up Common software / hardware design environment available from manufacturer 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 9/ 29

Issues when using microcontroller n n Two types of memory – speed issues when

Issues when using microcontroller n n Two types of memory – speed issues when using q On-chip – fast, easy to access, “almost as fast as using a register”, limited amount of on-chip memory available q Off-chip – slower to access – additional cost q Use on-chip memory in a “cache” mode (copy off-chip data to onchip when processing data, then copy back) External components still there q 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 q 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 to control power use 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 10/ 29

Components of the Blackfin Board From smallest to largest n Processor Core q q

Components of the Blackfin Board From smallest to largest n Processor Core q q n Processor itself q n One core on Blackfin ADSP-BF 533 processor Two cores on Blackfin ADSP-BF 561 processor core + some memory + some other built incapability Blackfin Evaluation board q Don’t forget the software development package Visual. DSP++ 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 11/ 29

Blackfin ADSP-BF 533 CORE THIS IS ANIMATED 13 September 2006 Differences between a microprocessor

Blackfin ADSP-BF 533 CORE THIS IS ANIMATED 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 12/ 29

Some key discussed elements from the previous slide n n Why did the processor

Some key discussed elements from the previous slide n n Why did the processor designers allow 2 loads from memory at the same time, a load and store at the same time, but not two stores at the same time? Why would the processor designers place 8 -bit ALUs operations available on a processor that has 32 -bit registers? Give an example of an instruction where four 8 -bit ALU operations occur at the same time Give an example of an instruction where two 16 -bit ALU operations occur at the same time 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 13/ 29

CORE 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University

CORE 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada The “chip” itself 14/ 29

Enter the key elements from previous slide n n n Will you learn to

Enter the key elements from previous slide n n n Will you learn to “flash” memory in this class, and how would you do it and why? What does a watch-dog timer do – and “how do you find out how to feed it? ” What does the acronym MMU stand for? What does the acronym SPI stand for, and in what labs will we be using the SPI? When is the PPI used? What’s a real time clock? 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 15/ 29

13 September 2006 Differences between a microprocessor and EVALUATION a microcontroller M. Smith, University

13 September 2006 Differences between a microprocessor and EVALUATION a microcontroller M. Smith, University of Calgary, Canada BOARD 16/ 29

Lab. 1 – demonstration of microcontroller capability n Use the microcontroller q Configure the

Lab. 1 – demonstration of microcontroller capability n Use the microcontroller q Configure the FLASH memory n q q Contains memory and also I/O components (input / output) Use the FLASH memory I/O capability to control the LED Configure the PF I/O lines (Programmable flags) n n Used to control many of the external devices (chip select and timing lines) Used as input (Lab. 2) and / or interrupt lines (Lab. 3) 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 17/ 29

Push-button switches (PF lines) LED (controlled by FLASH memory logic) 13 September 2006 Differences

Push-button switches (PF lines) LED (controlled by FLASH memory logic) 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 18/ 29

Need to learn how to “configure” the flash memory so that We can control

Need to learn how to “configure” the flash memory so that We can control the LEDs If we can control the LED’s then we have signals that could be used for a “radio-controlled” car Parallel interfaces present on the FLASH memory chips 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 19/ 29

Configure the PF lines (Programmable Flags – Input and output pins) Animated Replace one

Configure the PF lines (Programmable Flags – Input and output pins) Animated Replace one button input with the input of a temperature transducer and you have designed a “Software controlled thermometer” TMP 03 will be used in Laboratory 2 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 20/ 29

Control of the PF lines – how / why? FIO_FLAG_D – Data register FIO_EDGE

Control of the PF lines – how / why? FIO_FLAG_D – Data register FIO_EDGE -- Edge register FIO_DIR -- Direction register FIO_POLAR -- Polarity register 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 21/ 29

PF lines being used already to control other devices – “We are not alone!!”

PF lines being used already to control other devices – “We are not alone!!” n n n When we change the PF registers bits, we must ONLY change those over which we have control PF 8, PF 9, PF 10, PF 11 FIO_FLAG_D register has 16 I/O pins (Flag pins) available Must learn the instructions to safely change some register bits and not others (AND and OR instructions) 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 22/ 29

Enter the key elements from previous slide n n Which A/D is used on

Enter the key elements from previous slide n n Which A/D is used on the Blackfin board? Why are the signals that control the LED’s coming from the FLASH? What does SPORT 1 means, and what external device is being controlled by it? How does the SPORT device allow “time sharing” of the bus by several different external devices? 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 23/ 29

Audio-Video Interaction of ADSPBF 533 Ez-Kit Lite with the outside world 13 September 2006

Audio-Video Interaction of ADSPBF 533 Ez-Kit Lite with the outside world 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 24/ 29

13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of

13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 25/ 29

Review quiz n CPU stands for n CCU stands for n ALU stands for

Review quiz n CPU stands for n CCU stands for n ALU stands for n DMA stands for 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 26/ 29

Review Quiz n How come the FLASH memory must be used to control the

Review Quiz n How come the FLASH memory must be used to control the LEDs and not the GPIO register pins (general purpose I/O)? n Why can’t we use PF 0 line in Lab. 2 to read temperature transducer input signals? n Why will AND and OR operations be necessary when we control the PF I/O lines? n What does PF stand for? 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 27/ 29

Tackled today n n n Basic microprocessor Concept of a microcontroller Difference between the

Tackled today n n n Basic microprocessor Concept of a microcontroller Difference between the Blackfin microcontroller and Blackfin Ez-Kit Lite evaluation board Capabilities of the ADSP-BF 533 Blackfin Ez. Kit Lite evaluation board Various acronyms that will be used in the course 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada 28/ 29