Download Introduction to Microcontrollers in Microprocessor System Design | ECE 473 and more Study notes Microprocessors in PDF only on Docsity!
ECE473/ 1
Introduction to Microcontrollers
ECE473/ 2
Introduction
- It is hard to imagine the present world of electronic devices without the microprocessor. - Cash register, scales, ovens, washing machine, alarm clock, thermostats, and ignition system, etc.
- 1971 (Microprocessors)
- Intel 8080, Motorola 6800, RCA 1801, MOS Technology and Zilog Z80.
- 1976 (Microcontrollers)
- Intel 8748 (MCS-48 family)? 17,000 transistors
- CPU, 1KB EPROM, 64B RAM, 27 I/O pins, and an 8-bit timer.
- Used in washing machines and traffic light controllers.
- 1980 (Microcontrollers)
- Intel 8051 (MCS-51 family)? 60,000 transistors
- CPU, 4KB ROM, 128B RAM, 32 I/O Pins, a serial port, two 16-bit timers.
- Siemens SAB
- 68-pin parade with six 8-bit I/O ports, 13 interrupt sources, and an 8-bit A/D converter with 8 input channels.
ECE473/ 4
Block Diagram of A Microcomputer System
CPU Address bus (16 lines)
Data bus (8 lines) Control bus (6 lines)
RAM ROM Interface
Circuitry
Peripheral devices
- CPU? fetching instructions and executing instructions.
- Instruction Set
- Add, subtract, multiply, divide, AND, OR, NOT, data movement, branch operations? represented by a set of binary codes called the Instruction Set.
ECE473/ 5
The Central Processing Unit (CPU)
CPU
Instruction Register (IR)
Instruction decode and control unit
Arithmetic and logic unit (ALU)
Program counter (PC)
Registers
- Register for the temporary storage of information.
- ALU for performing operations on this information.
- Instruction decode and control unit that determine the operation to perform.
- IR holds the binary code for each instruction as it is executed.
- PC holds the memory address of the next instruction to be executed.
ECE473/ 7
RAM and ROM
- RAM is read/write memory. It is volatile (the contents are
lost when power is removed).User program and data are
loaded into RAM for execution.
- ROM is read-only memory. It is nonvolatile. ROM is used
to hold the short, frequently used software routines that
perform input/output operations.
ECE473/ 8
The Buses: Address, Data, Control
- Address Bus
- 16-bit address can access 2^16 = 65,536 locations. 2^16 =2^6 *2^10 = 64K locations. The address bus is unidirctional.
- Data Bus
- Evidently computers spend up to 2/3 of their time simply moving data. Since the majority of move operations are between a CPU register and external RAM or ROM, the number of lines (width) of the data bus is important for overall performance.
- 16-bit computer refers to a computer with 16 lines on its data bus.
- The overall computing power increasing as the width of the data bus increases. The limitation by-width is bottleneck!!
- The data bus is bidirectional. (Read or Write)
- Control Bus
- Contol signals are timing signals supplied by CPU to synchronize the movement of the information on the address bus and data bus. Such as CLOCK, READ and WRITE.
ECE473/ 10
Hardware vs. Software
- Whereas the early days of computing witnessed the
materials, manufacturing, and maintenance costs of
computer hardware far surprising the software costs.
- Today, with the mass-produced LSI (Large-Scale
Integrated) chips. Hardware costs are less dominant. It is
the labor-intensive job of writing, documenting,
maintaining, updating, and distributing software that
constitutes the bulk of the expense in automating a process
using computers.
ECE473/ 11
Three Levels of Software
- Input/output subroutines
- Directly manipulate the hardware of the system
- Reading characters from the keyboard.
- Writing characters to the CRT.
- Reading blocks of information from the disk.
- Since these subroutines are so intimately linked to the hardware, they are written by the hardware designers and are stored in ROM (They are the BIOS – basic input/output system – on the IBM PC for example).
- The operating system
- Is a large collection of programs that come with the computer system and provide the mechanism to access, manage, and effectively utilize the computer’s resources.
- These abilities exists through the operating system’s command language and utility programs which in turn facilitate the development of application software.
- Application software (user interface).
ECE473/ 13
Microprocessors vs. Microcontroller
- Instruction set features
- Microprocessor instruction sets are ‘processing intensive’ implying they have powerful addressing modes with instructions catering to operations on large volumes of data. Microcontrollers, on the other hand, have instruction sets catering to the control of inputs and outputs.
- Microcontrollers have built-in circuitry and instructions for input/output operations, event timing, and enabling and setting priority levels for interrupts caused by external stimuli. Microprocessors often require additional circuitry (serial interface Ics, interrupt controllers, timers, etc. ) to perform similar operations.
- A tight encoding scheme for the instruction set is essential for microcontrollers. This is rarely a feature of microprocessors; their powerful address modes bring with them a less-than-compact encoding of instructions.
ECE473/ 14
New Concepts
- Consider an examples microwave ovens, programmable
thermostats, electronic scales, and even cars.
- The electronics within each of these products typically incorporates a microcontroller interfacing to push buttons, switches, lights, and alarms on a front panel.
- Computer systems have a high RAM-to-ROM ratio, with
user programs executing in a relatively large RAM space
and hardware interfacing routines executing in a small ROM
space.
- Microcontrollers, on the other hand, have a high ROM-to-
RAM ratio. The control program is stored in ROM, while
RAM is used only for temporary storage.