ECE 447: Lecture 1
description
Transcript of ECE 447: Lecture 1
ECE 447: Lecture 1
Microcontroller Concepts
ECE 447: Basic Computer System
CPUMemoryProgram + Data
I/O Interface
ParallelI/O Device
SerialI/O Device
Data Bus
Address Bus
Control Bus
Parallel Data
Serial Data
ECE 447: Microprocessor vs. Microcomputer
Microprocessor – A processor unit typically with only basic I/O interface, off-chip memory.
e.g.: Intel 8008, 8086, 80486, Pentium, Pentium 4, Core2Duo, PowerPC
Single-chip Microcomputer – A processor unit with on-chip memory, I/O devices, and often other peripheral devices such as timers and A to D.
e.g.: Intel 8048, 8051, Motorola 68HC11/12
ECE 447: Microcontroller
An I/O oriented single-chip microcomputer
• Extended I/O capabilitiesSynchronous and asynchronous communication devices, A/D and
D/A converters, timers, counters, watchdogs.
• Interrupt HandlingIncreased ability to prioritize levels of interrupts and mask
individual interrupts.
• Instruction SetInstructions oriented toward bit manipulation, operations on single
bits of memory words or I/O ports.
ECE 447: Processor Evolution
Early microcroprocessors
performance integration
General-purposemicroprocessors
Single-chip microcomputers
- small price- low power consumption- built-in memory- built-in I/O devices
- high speed- long word size
x 1 x 10
(e.g., Pentium, Athlon, Power PC) (e.g., MC68HC11, 8051)
(8080, 6800, Z80)
volumesold
ECE 447: Microcontroller Applications
• Cars– Engine fuel injection– Transmission control– Suspension and ride control– Instrument display– Braking system
• Home Appliances– Washing machine– Microwave oven– Refrigerator
• Sports Equipment– Exercise Machine– Heart Rate Monitor
ECE 447: Microcontroller Applications
• Consumer Electronics– Digital/Film cameras– Remote Controls– Televisions– CD players– Telephone
• Computer Peripherals– Printers– Scanners– Disk drive controllers
• Robots– The Brains
ECE 447: Architecture vs. Organization vs. Realization
Architecture: The instruction set and input/output capabilities available to the programmer
Organization: The implementation of the architecture in block diagram form
Realization: Actual implementation of an organization in a given technology, eg: CMOS
High
Level of Abstraction
LOW
ECE 447: Organization of MC68HC11
CPU
RAM
ROM
EEPROM
TIMER A/DSPI
SCI
PORT A PORT B PORT C PORT D PORT E
8 8 (4)8
24
6
8 (4)8
3 3 2
ECE 447: Acronyms Used
• CPU - Central Processing Unit := ALU (Arithmetic Logic Unit) + Control
• RAM - Random Access Memory := Read/Write Memory
• ROM - Read Only Memory (non-volatile)
• EPROM – Erasable Programmable ROM
• EEPROM - Electrically Erasable Programmable ROM
• SCI - Serial Communication Interface (asynchronous serial communication interface)
• SPI - Serial Peripheral Interface (synchronous serial communication interface)
• A/D - analog-to-digital converter
• Port –Parallel I/O providing digital data lines (A,B,C,D,E)
ECE 447: Memory Types
volatile non-volatile
ROM
PROM
EPROM
EEPROM
Flash EEPROM
FRAM
RAM
ECE 447: Area for Single Bit Cell
Assumes 0.8 µm technology
20 10 14 14 14 20 40
humanhair
ROM EPROMFlash
EPROM FRAM EEPROM RAM
ECE 447: Memory Technology Features
Type Number of write/erase
cycles
Writingtime
Typical cell sizein 0.8 m technology
RAM
EEPROM
EPROM
Flash EPROM
FRAM
PROM
ROM
unlimited
10,000-1,000,000
1
100,000
1010
1
0 70 ns
3-10 ms
50 ms
50 ms
100 ns
100 ms
N/A 1, 700 m2
400 m2
200 m2
200 m2
100 m2
200 m2
200 m2
ECE 447: Memory Map of MC68HC11E9
$0000
$1000
$B600
$0000-$01FF 512 bytes RAM
$1000-$103F 64 bytes I/O registers
$B600-$B7FF 512 bytes EEPROM
Single-chip mode
$FFFF
$D000$D000-$FFFF 12 kbytes ROM
ECE 447: Input/Output Ports
PortInput Pins
Output Pins
Bidirectional Pins
SharedFunctions
Port A
Port B
Port C
Port D
Port E
3
–
–
–
8
3
8
–
–
–
2
–
8
6
–
Timer
High Order Address
Low Order Address and Data Bus
SCI and SPI
A/D Converter
ECE 447: Organization of MC68HC11 in Expanded Bus Mode
CPU RAM
ROM
EEPROM
TIMERA/D
SPI
SCI
PORT A PORT D PORT E8 (4)
24
6
8 (4)8
3 3 2
EXTERNAL RAM
EXTERNAL ROM
EXTERNAL EPROM
EXTERNAL I/O
ECE 447: Memory Map of MC68HC11E9
$0000
$1000
$B600
$0000
$1000
$B600
EXT
EXT
EXT
$0000-$01FF 512 bytes RAM
$1000-$103F 64 bytes I/O registers
$B600-$B7FF 512 bytes EEPROM
Single-chip mode Expanded bus mode
$FFFF
$D000
$FFFF
$D000
ECE 447: Memory sizes per device type
ECE 447: New Micros Board Configuration
68HC11E9
68HC24 - Port Replacement Unit
RAM32 kB
B
C
B
C
A
DE
RAM512B
EEPROM 512B
ROM 12kB
RAM32 kB
ECE 447: Memory Map of MC68HC11E9 with External RAM
$0000
$1000
$B600
$FFFF
$0000-$01FF 512 bytes RAM
$1000-$103F 64 bytes I/O registers
$B600-$B7FF 512 bytes EEPROM
Expanded bus mode
$D000$D000-$FFFF 12 kbytes ROM
RAM
RAM
RAM
ECE 447: Recommended Memory Map Setting of MC68HC11E9
$0000
$1000
$2000
$B600
$6000
$FFFF
$0000-$01FF 512 bytes RAM
$1000-$103F 64 bytes I/O registers
$B600-$B7FF 512 bytes EEPROM
Expanded bus mode
$D000
$2000-$5fff16 kB Program RAM
$D000-$FFFF 12 kbytes ROM
$6000-$B5ff 21.5 kB Data RAM