ECE 447 Lecture 1 Microcontroller Concepts ECE 447

  • Slides: 21
Download presentation
ECE 447: Lecture 1 Microcontroller Concepts

ECE 447: Lecture 1 Microcontroller Concepts

ECE 447: Basic Computer System Parallel I/O Device Serial I/O Device Parallel Data CPU

ECE 447: Basic Computer System Parallel I/O Device Serial I/O Device Parallel Data CPU Data Bus Address Bus Control Bus Memory Program + Data Serial Data I/O Interface

ECE 447: Microprocessor vs. Microcomputer Microprocessor – A processor unit typically with only basic

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 4, Core 2 Duo, Power. PC Single-chip Microcomputer – A processor unit with onchip memory, I/O devices, and often other peripheral devices such as timers and A to D. e. g. : Intel 8048, 8051, Motorola 68 HC 11/12

ECE 447: Microcontroller An I/O oriented single-chip microcomputer • Extended I/O capabilities Synchronous and

ECE 447: Microcontroller An I/O oriented single-chip microcomputer • Extended I/O capabilities Synchronous and asynchronous communication devices, A/D and D/A converters, timers, counters, watchdogs. • Interrupt Handling Increased ability to prioritize levels of interrupts and mask individual interrupts. • Instruction Set Instructions oriented toward bit manipulation, operations on single bits of memory words or I/O ports.

ECE 447: Processor Evolution Early microcroprocessors (8080, 6800, Z 80) integration performance General-purpose microprocessors

ECE 447: Processor Evolution Early microcroprocessors (8080, 6800, Z 80) integration performance General-purpose microprocessors (e. g. , Pentium, Athlon, Power PC) - high speed - long word size volume sold x 1 Single-chip microcomputers (e. g. , MC 68 HC 11, 8051) - small price - low power consumption - built-in memory - built-in I/O devices x 10

ECE 447: Microcontroller Applications • Cars – – – Engine fuel injection Transmission control

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

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

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 MC 68 HC 11 RAM CPU ROM EEPROM TIMER SPI

ECE 447: Organization of MC 68 HC 11 RAM CPU ROM EEPROM TIMER SPI 8 4 PORT A 3 3 A/D 2 PORT B 8 PORT C 8 SCI 8 (4) 2 PORT D 6 PORT E 8 (4)

ECE 447: Acronyms Used • CPU - Central Processing Unit : = ALU (Arithmetic

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 RAM non-volatile ROM PROM EEPROM Flash EEPROM FRAM

ECE 447: Memory Types volatile RAM non-volatile ROM PROM EEPROM Flash EEPROM FRAM

ECE 447: Area for Single Bit Cell Assumes 0. 8 µm technology Flash human

ECE 447: Area for Single Bit Cell Assumes 0. 8 µm technology Flash human ROM EPROM FRAM EEPROM hair 20 14 14 20 RAM 40

ECE 447: Memory Technology Features Type Number of write/erase cycles Writing time RAM ROM

ECE 447: Memory Technology Features Type Number of write/erase cycles Writing time RAM ROM unlimited 0 70 ns N/A PROM 100 ms Flash EPROM 1 1 10, 0001, 000 100, 000 FRAM 1010 EPROM EEPROM Typical cell size in 0. 8 m technology 1, 700 m 2 100 m 2 50 ms 200 m 2 3 -10 ms 400 m 2 50 ms 200 m 2 100 ns 200 m 2

ECE 447: Memory Map of MC 68 HC 11 E 9 $0000 $1000 Single-chip

ECE 447: Memory Map of MC 68 HC 11 E 9 $0000 $1000 Single-chip mode $B 600 $0000 -$01 FF 512 bytes RAM $1000 -$103 F 64 bytes I/O registers $B 600 -$B 7 FF 512 bytes EEPROM $D 000 -$FFFF 12 kbytes ROM $FFFF

ECE 447: Input/Output Ports Port Input Pins Output Pins Bidirectional Pins Shared Functions Timer

ECE 447: Input/Output Ports Port Input Pins Output Pins Bidirectional Pins Shared Functions Timer Port A 3 3 2 Port B – 8 – High Order Address Port C – – 8 Low Order Address and Data Bus Port D – – 6 SCI and SPI Port E 8 – – A/D Converter

ECE 447: Organization of MC 68 HC 11 in Expanded Bus Mode RAM CPU

ECE 447: Organization of MC 68 HC 11 in Expanded Bus Mode RAM CPU ROM EEPROM SPI TIMER 8 4 3 SCI 8 (4) 2 PORT D PORT A 3 A/D 2 6 EXTERNAL RAM EXTERNAL EPROM EXTERNAL I/O PORT E 8 (4)

ECE 447: Memory Map of MC 68 HC 11 E 9 Single-chip mode $0000

ECE 447: Memory Map of MC 68 HC 11 E 9 Single-chip mode $0000 $1000 Expanded bus mode $0000 EXT $1000 $0000 -$01 FF 512 bytes RAM $1000 -$103 F 64 bytes I/O registers EXT $B 600 -$B 7 FF 512 bytes EEPROM EXT $D 000 $FFFF

ECE 447: Memory sizes per device type

ECE 447: Memory sizes per device type

ECE 447: New Micros Board Configuration 68 HC 11 E 9 RAM EEPROM E

ECE 447: New Micros Board Configuration 68 HC 11 E 9 RAM EEPROM E A 68 HC 24 - Port Replacement Unit 512 B 12 k. B B B C C D RAM 32 k. B

ECE 447: Memory Map of MC 68 HC 11 E 9 with External RAM

ECE 447: Memory Map of MC 68 HC 11 E 9 with External RAM Expanded bus mode $0000 RAM $1000 $0000 -$01 FF 512 bytes RAM $1000 -$103 F 64 bytes I/O registers RAM $B 600 $D 000 RAM $B 600 -$B 7 FF 512 bytes EEPROM $D 000 -$FFFF 12 kbytes ROM $FFFF

ECE 447: Recommended Memory Map Setting of MC 68 HC 11 E 9 Expanded

ECE 447: Recommended Memory Map Setting of MC 68 HC 11 E 9 Expanded bus mode $0000 -$01 FF 512 bytes RAM $1000 -$103 F 64 bytes I/O registers $2000 -$5 fff 16 k. B Program RAM $6000 $B 600 $6000 -$B 5 ff 21. 5 k. B Data RAM $B 600 -$B 7 FF 512 bytes EEPROM $D 000 -$FFFF 12 kbytes ROM $FFFF