You are on page 1of 16

Introduction to Assembly

Language and MpLab


Lecture No. 5
Computer Languages
• Purpose:
• Hierarchy of Computer Languages
• Machine
• Assembly
• Higher Level and Special Purposes
PIC Instruction Set Revisited
Introduction to Assembly Language
• Assembly Language:
• An assembly language is a low-level Programming Language designed for a
specific type of Processor.
• It may be produced by Compiling source code from a high-level programming
language (such as C / C++)
• It can also be written from scratch.
• Assembly code can be converted to machine code using an Assembler.
• One Line of Assembly Code may Comprises
• Label
• Mnemonic / Directive
• Operand
• Comments
Introduction to Assembly Language
• Seldom Used Nowadays
• Used primarily for
• Direct hardware manipulation,
• Access to specialized processor instructions,
• Or to address critical performance issues.
• Typical uses are
• Device drivers,
• Low-level embedded systems, and
• Real-time systems.
MP Assembler and Linker
• Assembler: The MPASM assembler (the assembler) is a
command-line or Windows-based PC application that provides a
platform for developing assembly language code for Microchip’s
PICmicro microcontroller (MCU) families.
• Linker: The software that takes one or more objects generated by
Assembler / Compiler and makes them into a Single Executable Code
MP Assembler and Linker
Assembler Input / Output Files
Assembler Interfaces
• Command Line
• Windows exe
• MpLab IDE through Project File
MpLab IDE
• Microcontroller remains the Heart of Embedded Systems
• Developing Embedded System Comprises:
• Selection of Hardware (Microcontroller)
• Firmware / Software running in Microcontroller
• We Need
• A development system for embedded controllers applications
• MpLab contains All Desired Components
• Target Selection
• Editor
• Assembler / Compiler
• Debugger
• Output Generations
MpLab
Typical Cycle Includes
• Picking the Microcontroller and Associated Hardware Circuitry
• Pick a Suitable Language and Write Code
• Compile / Assemble the Code
• Test and Debug the Code
• Burn the Code in Microcontroller and Attach with Desired Circuitry
The Design Cycle
MpLab IDE Project Manager
Compiler Function
Assembler Interfaces
• Command Line
• Windows exe
• MpLab IDE through Project File
Assembler Interfaces
• Command Line
• Windows exe
• MpLab IDE through Project File

You might also like