Microprocessors: From Assembly Language to C Using thePIC18Fxx2

This chapter introduces the fundamental concepts of computer operation by implementing a controller both as a finite state machine and as a stored program machine.
After reading this chapter, you will be able to:
Compare and contrast controller designs using finite state machine and stored program machine approaches.
Describe the operation of a finite state machine via an algorithmic state machine chart.
Implement a finite state machine using a one-hot state encoding method.
Discuss the basic elements of a stored program machine.
Describe the meaning of the terms opcode, machine word, instruction mnemonic, address bus, data bus, instruction pointer, assembly, and disassembly.
Describe the fetch and execute sequence of a stored program machine.
Convert a simple assembly language program to machine code, and vice versa.
Follow the execution of a simple assembly language program.
Write a simple assembly language program to solve a specified problem.
The preceding tasks introduce you to the concept of stored program machines, of which the PIC18F242 microcontroller is a prime example, and is the principle focus of the rest of this book. The PIC18F242 microcontroller is simply a more complex version of the stored program machine discussed in the following sections. This chapter provides you with the first chance to dip your toes into the vast ocean of microprocessor operation, programming, and application.
Digital systems provide solutions for problems in which real-world inputs can be converted to a digital representation, which is then processed by...