Microprocessors: From Assembly Language to C Using thePIC18Fxx2

Chapter 3: Introduction to the PIC18Fxx2

This chapter introduces the PIC18Fxx2 instruction set architecture by exploring the PIC18's banked data memory structure and data transfer instructions. The use of MPLAB for assembly and simulation of PIC18 programs is also discussed.

3.1 LEARNING OBJECTIVES

After reading this chapter, you will be able to:

  • Describe the basic data and program memory architecture of the PIC18.

  • Convert PIC18 instruction mnemonics to machine code, and vice versa.

  • Describe the operation of the movwf, movlb, addwf, subwf, incf, decf, and goto instructions.

  • Write PIC18 instructions to perform data transfer between memory locations in the same bank, or in different banks.

  • Translate (manually compile) a simple C program into PIC18 assembly language.

  • Compute the number of clock cycles and the amount of time required to execute simple instruction sequences for the PIC18.

3.2 INTRODUCTION TO MICROPROCESSORS AND MICROCONTROLLERS

In the previous chapter, a computer was defined as a digital system composed of control, input/output, and memory components whose operation is controlled by instructions stored in memory. The first computers were designed in the early 1940s and filled entire rooms, with total processing capability that was less than a modern digital watch. Early computers used vacuum tubes (grossly, a current amplifier within a glass tube) to implement logic, and a logic gate could take up an entire board. Transistors were invented by Bell Labs in 1947 [1], allowing an order of magnitude size reduction in logic implementation. However, transistors were packaged individually,...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programmable Logic Controllers (PLC)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.