Lecture 1 Introduction to Microcontrollers Dr Konstantinos Tatas

  • Slides: 9
Download presentation
Lecture 1 Introduction to Microcontrollers Dr. Konstantinos Tatas ACOE 343 - Real-Time Embedded Processor

Lecture 1 Introduction to Microcontrollers Dr. Konstantinos Tatas ACOE 343 - Real-Time Embedded Processor Systems Frederick University 1

Components of a microprocessor/controller • • CPU: Central Processing Unit I/O: Input /Output Bus:

Components of a microprocessor/controller • • CPU: Central Processing Unit I/O: Input /Output Bus: Address bus & Data bus Memory: RAM & ROM Timer Interrupt Serial Port Parallel Port ACOE 343 - Real-Time Embedded Processor Systems Frederick University 2

General-purpose microprocessor: • CPU for Computers • Commonly no RAM, ROM, I/O on CPU

General-purpose microprocessor: • CPU for Computers • Commonly no RAM, ROM, I/O on CPU chip itself Many chips on motherboard Data Bus CPU General. Purpose Microprocessor RAM ROM I/O Port Timer Serial COM Port Address Bus ACOE 343 - Real-Time Embedded Processor Systems Frederick University 3

Microcontroller : • A single-chip computer • On-chip RAM, ROM, I/O ports. . .

Microcontroller : • A single-chip computer • On-chip RAM, ROM, I/O ports. . . • Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z 8 and PIC 16 X CPU I/O Port RAM ROM Serial Timer COM Port A single chip Microcontroller ACOE 343 - Real-Time Embedded Processor Systems Frederick University 4

Microprocessor vs. Microcontroller Microprocessor • CPU is stand-alone, RAM, ROM, I/O, timer are separate

Microprocessor vs. Microcontroller Microprocessor • CPU is stand-alone, RAM, ROM, I/O, timer are separate • designer can decide on the amount of ROM, RAM and I/O ports. • expensive • versatility • general-purpose • High processing power • High power consumption • Instruction sets focus on processing-intensive operations • Typically 32/64 – bit • Typically deep pipeline (5 -20 stages) Microcontroller • CPU, RAM, ROM, I/O and timer are all on a single chip • fixed amount of on-chip ROM, RAM, I/O ports • for applications in which cost, power and space are critical • single-purpose (control-oriented) • Low processing power • Low power consumption • Bit-level operations • Instruction sets focus on control and bit-level operations • Typically 8/16 bit • Typically single-cycle/two-stage pipeline ACOE 343 - Real-Time Embedded Processor Systems Frederick University 5

Some Popular Microcontrollers… • • 8051 Microchip Technology PIC Atmel AVR Texas Instruments MSP

Some Popular Microcontrollers… • • 8051 Microchip Technology PIC Atmel AVR Texas Instruments MSP 430 (16 -bit) ACOE 343 - Real-Time Embedded Processor Systems Frederick University 6

Review questions • What are the main differences between a microprocessor and a microcontroller

Review questions • What are the main differences between a microprocessor and a microcontroller in terms of – Architecture – Applications – Instruction set ACOE 343 - Real-Time Embedded Processor Systems Frederick University 7

Example • A u. P running at 600 MHz has an average CPI of

Example • A u. P running at 600 MHz has an average CPI of 1. 2 and a average power consumption of 400 m. W, while a u. C running at 12 MHz with a two cycle datapath has a power consumption of 24 m. W. – Calculate their respective MIPS – Which one is more efficient in MIPS/m. W? ACOE 343 - Real-Time Embedded Processor Systems Frederick University 8

Example 2 • The previous u. P costs 100$, while the respective u. C

Example 2 • The previous u. P costs 100$, while the respective u. C costs 0. 96 $ – Which is more efficient in MIPS/$? ACOE 343 - Real-Time Embedded Processor Systems Frederick University 9