23.10.2013 Views

M68HC05 Family — Understanding Small Microcontrollers

M68HC05 Family — Understanding Small Microcontrollers

M68HC05 Family — Understanding Small Microcontrollers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Freescale Semiconductor, Inc...<br />

Table of Contents<br />

Freescale Semiconductor, Inc.<br />

Half-Carry Bit (H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101<br />

Interrupt Mask Bit (I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101<br />

Negative Bit (N). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101<br />

Zero Bit (Z) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102<br />

Carry/Borrow Bit (C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102<br />

Program Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103<br />

Stack Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103<br />

Addressing Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104<br />

Inherent Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105<br />

Immediate Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . .107<br />

Extended Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108<br />

Direct Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110<br />

Indexed Addressing Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112<br />

Indexed, No Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112<br />

Indexed, 8-Bit Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114<br />

Indexed, 16-Bit Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116<br />

Relative Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118<br />

Bit Test and Branch Instructions . . . . . . . . . . . . . . . . . . . . . . . . . .120<br />

Instructions Organized by Type . . . . . . . . . . . . . . . . . . . . . . . . . .120<br />

Instruction Set Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125<br />

Review. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133<br />

CPU Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133<br />

Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133<br />

Instruction Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134<br />

Programming<br />

Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135<br />

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136<br />

Writing a Simple Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136<br />

Flowchart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137<br />

Mnemonic Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139<br />

Software Delay Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141<br />

Assembler Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143<br />

Object Code File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147<br />

<strong>M68HC05</strong> <strong>Family</strong> <strong>—</strong> <strong>Understanding</strong> <strong>Small</strong> <strong>Microcontrollers</strong> <strong>—</strong> Rev. 2.0<br />

10 Table of Contents<br />

For More Information On This Product,<br />

Go to: www.freescale.com<br />

MOTOROLA

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!