The Art of Assembly Language Programming Using PIC® Technology - 1st Edition - ISBN: 9780128126172, 9780128126189

The Art of Assembly Language Programming Using PIC® Technology

1st Edition

Core Fundamentals

Authors: Theresa Schousek
eBook ISBN: 9780128126189
Paperback ISBN: 9780128126172
Imprint: Newnes
Published Date: 25th April 2019
Page Count: 458
Sales tax will be calculated at check-out Price includes VAT/GST
Price includes VAT/GST

Institutional Subscription

Secure Checkout

Personal information is secured with SSL technology.

Free Shipping

Free global shipping
No minimum order.


The Art of Assembly Language Programming Using PICmicro® Technology: Core Fundamentals thoroughly covers assembly language used in programming the PIC Microcontroller (MCU). Using the minimal instruction set characteristic of all PICmicro® products, the author elaborates on how to execute loops, control timing and disassemble code from C mnemonics. Detailed memory maps assist the reader with tricky areas of code, and appendices on basic math supplement reader background. In-depth coverage is further provided on paging techniques that are unique to PICmicro® 16C57. This book is written for a broad range of skill levels, and is relevant for both the beginner and skilled C-embedded programmer.

In addition, a supplemental appendix provides advice on working with consultants, in general, and on selecting an appropriate consultant within the microchip design consultant program. With this book, users you will learn the symbols and terminology used by programmers and engineers in microprocessor applications, how to program using assembly language through examples and applications, how to program a microchip microprocessor, how to select the processor with minimal memory, and more.

Key Features

  • Teaches how to start writing simple code, e.g., PICmicro® 10FXXX and 12FXXX
  • Offers unique and novel approaches on how to add your personal touch using PICmicro® ‘bread and butter’ enhanced mid-range 16FXXX and 18FXXX processors
  • Teaches new coding and math knowledge to help build skillsets
  • Shows how to dramatically reduce product cost by achieving 100% control
  • Demonstrates how to gain optimization over C programming, reduce code space, tighten up timing loops, reduce the size of microcontrollers required, and lower overall product cost


Electrical, Mechanical, Industrial engineers. Software Programmers trained in a higher level language, with no electrical engineering or embedded control background; Embedded/Firmware or Hardware designers, and Undergraduate Engineering students

Table of Contents


    • Purpose
    • Scope
    • Author’s Note
    • Dare we call it fun?

Chapter F1:


    • Practical Applications
    • Why Assembly?
    • Core Families (‘Baseline,’ ‘ Midrange,’ enhanced ‘Midrange’)
    • Data Sheet Walk Through
    • Straightline Program Implementation
    • Practice Exercise – Walk Through
    • Microchip Microcontroller Course Information
    • Jargon Introduction – italics
    • Further Reading

Chapter F2:


    • The Microprocessor
    • System Clock
    • Bus for Data and Program
    • Hardware Interfaces
    • Hardware Organization of Memory Address Space
    • Memory Interface
    • Program Data Storage Memory Circuits
    • Input/output Interface
    • Further Reading

Chapter F3:


    • Fields of an Instruction (See Table 2-1 in 6809)
    • Instruction Set for PICmicro® Controllers
    • General Purpose Registers
    • Special Function Registers
    • Addressing: Direct, Indirect, Indexed, and Relative
      • Compare and Status Flags
      • Calculating Relative Offsets
      • Conditional Branches

    • Code Example
    • Further Reading

Chapter F4:


    • 8-bit Data Transfer
    • 8-bit Addition
    • 8-bit Subtraction
    • Shift left 1 bit (Multiply by two)
    • Shift left 2 bits (Multiply by four)
    • Clear a Memory Location
    • Set a Memory Location to All Ones
    • Find Larger of Two Numbers
    • Find Smaller of Two Numbers
    • Further Reading

Chapter F5:


    • 8-bit Sum of Data
    • 16-bit Sum of Data
    • Maximum Value
    • Minimum Value
    • Check-sum of Data
    • Number of Zero, Positive, and Negative Numbers
    • Count ‘1’ Bits
    • Further Reading

Chapter F6:


    • Electrical Wiring Diagrams (how to read diagrams)
    • Breadboards (how to use standard breadboards)
    • Basic GPIO I/O
    • Specialized I/O
    • Timer Modules and Registers
    • Comparator Module
    • Paging Consideration
    • Evaluation Boards
    • Further Reading

Chapter F7:


Program Development

    • Structured Programming
    • Concept of Design Patterns and Interfaces
    • Pseudocode
    • Using Include files to Create Reusable Code

Program Design and Documentation

    • Programming Flow Charts
    • Warnier-Orr Diagrams

Systems Development

    • State Machine Diagrams
    • SYSML Systems Definition Language
    • Further Reading

Chapter F8:


Assembly Language Concepts

    • Arrays: String Handling and Character Operations
    • Pointer Constructs
    • Procedures
    • Functions

Assembly Language Basics

    • Simple Instructions
    • Config Word
    • Flags
    • Subroutines
    • Indexing

Assembly Language Advanced

    • Interrupts
    • Jump tables
    • Stack processing
    • Using DEFINE
    • Creating MACROS
    • Further Reading

Chapter F9:


Logical Operators

    • Sets and Truth Tables
    • AND
    • OR
    • Exclusive OR
    • Mask Off Most Significant 4 bits
    • Mask Off Least Significant 4 bits
    • Conditional functions (>,<,=,!=,>=,<=)
    • Complementing

Mathematical Numbering Systems

    • Binary, Hex and Decimal (with a mention of the existence of octal)
    • Multi-byte Integer Types
    • Signed Integers – cover 2s compliment extensively, but mention 1s compliment and sign-magnitude, because these still come out of some sensors and FPGAs.
    • Unsigned Integers
    • Floating Point (I doubt many people will want to use it in a PIC, but they may be given it and need to deal with it.)
    • BCD as a Type
    • Further Reading

Chapter F10:


    • Arithmetic Operations on Bytes
    • Arithmetic Operations on Multi-byte Numbers (Using carry properly, detecting overflow, how to treat signed and unsigned differently)
    • 16-bit Data Transfer
    • 16-bit Addition
    • 16-bit Ones Complement
    • 16-bit Twos Complement

Advanced Mathematical Operations

    • Shifting and Rotating, and How to Use Instructions in a Multi-Byte Shift
    • Application Notes Review:

            • Multiplication Algorithms, Both Signed and Unsigned
            • Division Algorithms
            • Floating Point

    • Further Reading


A: Instruction Set Reference Tables

B: Datasheet for PICmicro 10F

C: Decimal-Hexadecimal-Binary Tables

D: ASCII Table


No. of pages:
© Newnes 2019
eBook ISBN:
Paperback ISBN:

About the Author

Theresa Schousek

Theresa Schousek has been a Microchip (R) Design Partner for 20 years as President, Chief Engineer, and Owner of Vital Innovations LLC. She began her work with computers in 1983 with a Commodore (R) 64. Prior to working as an independent design consultant, she worked for nearly 10 years in the automotive industry for General Motors Delphi Delco Electronics. She thrives on innovative design and has three process and sensor patented designs, plus one international patent. She is the sole inventor of General Motor's first infant seat and occupant detection system to inhibit airbag deployment. This system, and its derivatives, have 223 citations and is currently in production, 22 years later. Theresa earned a BSCEE from Purdue University, a dual accredited degree in Electrical Engineering and Computer Engineering. She earned a Master of Business Administration, with a practicum in operational process design, from University of Wisconsin, River Falls, in 2011.

Affiliations and Expertise

Vital Innovations LLC

Ratings and Reviews