Confirming Pages
7.1 Microprocessors and Microcomputers 259
4. Understand the basic concepts of assembly language programming
5. Understand the basics of higher level programming languages such as
PicBasic Pro
6. Be able to write programs to control PIC microcontrollers
7. Be able to interface microcontrollers to input and output devices
8. Be able to design microcontroller-based mechatronic systems
9. Be aware of several practical considerations that will help you prototype,
program, and debug microcontroller-based systems
10. Be able to select an appropriate source of power for a microcontroller-based
system
7.1 MICROPROCESSORS AND
MICROCOMPUTERS
The digital circuits presented in Chapter 6 allow the implementation of combina-
tional and sequential logic operations by interconnecting ICs containing gates and
flip-flops. This is considered a hardware solution because it consists of a selection
of specific ICs, which when hardwired on a circuit board, carry out predefined func-
tions. To make a change in functionality, the hardware circuitry must be modified
and may require a redesign. This is a satisfactory approach for simple design tasks
(e.g., the security system presented in Section 6.6 and the digital tachometer pre-
sented in Design Example 6.1). However, in many mechatronic systems, the control
tasks may involve complex relationships among many inputs and outputs, making
a strictly hardware solution impractical. A more satisfactory approach in complex
digital design involves the use of a microprocessor-based system to implement a
software solution. Software is a procedural program consisting of a set of instruc-
tions to execute logic and arithmetic functions and to access input signals and con-
trol output signals. An advantage of a software solution is that, without making
changes in hardware, the program can be easily modified to alter a mechatronic
system’s functionality.
A microprocessor is a single, very-large-scale-integration (VLSI) chip that con-
tains many digital circuits that perform arithmetic, logic, communication, and control
functions. When a microprocessor is packaged on a printed circuit board with other
components, such as interface and memory chips, the resulting assembly is referred
to as a microcomputer or single-board computer. The overall architecture of a
typical microcomputer system using a microprocessor is illustrated in Figure 7.1 .
The microprocessor, also called the central processing unit (CPU) or micro-
processor unit (MPU), is where the primary computation and system control
operations occur. The arithmetic logic unit (ALU) within the CPU executes math-
ematical functions on data structured as binary words. A word is an ordered set of
bits, usually 8, 16, 32, or 64 bits long. The instruction decoder interprets instructions
alc80237_ch07_258-345.indd 259alc80237_ch07_258-345.indd 259 12/01/11 12:52 PM12/01/11 12:52 PM