Book provides you from basic to advanced approach to program PIC18F microcontroller using Assembly Language and
C Compiler. Which are widely used to develop embedded systems development.
This book teaches you fundamental principles of Assembly Language and interfacing hardware methods and techniques to connect external devices like LCD, Printers, Keyboards, Memories, Seven Segment Leds, Serial Communication etc.
Various examples are given, from basic to advanced interfacing techniques like switches, Liquid Crystal Displays, LEDs, Analog to Digital Converters, Digital to Analog Converters, PWM etc.
Table of contents
1. Introduction to Microcontrollers
Explanation of Terms, Microcontroller Data Types, Unsigned and Signed Binary Numbers, ASCII and EBCDIC, Codes, Unpacked and Packed Binary-Coded-Decimal Numbers, Evolution of the Microcontroller, Embedded Controllers.
Basic Blocks of a Microcomputer, System Bus, Clock Signals, Microcontroller architectures, Central Processing Unit (CPU). Register Section, Control Unit, Arithmetic and Logic Unit (ALU), Simplified Explanation of Control Unit design, Basic concept of pipelining, RISC vs. CISC, Functional Representation of a Typical Microcontroller- The PIC8F4334 Questions and Problems.
3. Microcontroller Memory and Input/Output (I/O)
Introduction to Microcontroller Memory 37, Main memory, READ and WRITE Timing Diagrams, Main Memory Organization, Microcontroller Input/Output (I/O), Overview of digital output circuits, Simple I/O Devices, Programmed I/O, Unconditional and Conditional Programmed I/O, Interrupt I/O.
Computer Programming Languages, Machine Language, Assembly Language, Types of Assemblers, Assembler Delimiters, Specifying Numbers by Typical Assemblers, Assembler Directives or Pseudoinstructions, Assembly Language Instruction Formats, Typical Instruction Set, Typical Addressing Modes, Subroutine Calls in Assembly Language, High-Level Language, Introduction to C Language, Data types, Bit manipulation operators, Control structures, The if-else construct, The switch construct, The while construct, The for construct , The do-while construct, Structures, and Unions, Functions in C, Arrays, Macros, Choosing a programming language, Flowcharts.
5. PIC8F Architecture and Addressing Modes
Basic features of the PIC8F family, PIC8F Register Architecture, PIC8F Memory Organization, PIC8F Program Memory, PIC8F Data Memory, PIC8F Addressing Modes, Literal or Immediate Addressing Mode, Inherent or Implied Addressing Mode, Direct or Absolute Addressing Mode, Indirect Addressing Mode, Relative Addressing Mode, Bit Addressing Mode. Questions and Problems.
6.Assembly Language Programming With the PIC8F:
Introduction to the PIC8F MPLAB assembler, PIC8F Instruction Format, PIC8F Instruction Set 2, Data Movement Instructions, Arithmetic Instructions, Logic Instructions, Rotate Instructions, Bit Manipulation Instructions, Questions and Problems.
7.Assembly Language Programming With the PIC8F:
PIC8F Jump/Branch instructions, PIC8F Test, Compare, and Skip instructions, PIC8F Table Read/Write instructions, PIC8F Subroutine instructions, PIC8F System Control instructions, PIC8F Hardware vs. Software stack, Multiplication and Division algorithms, Signed Multiplication algorithm, Unsigned Division algorithm, Signed Division algorithm, Advanced Programming Examples, PIC8F Delay Routine.
8.PIC8F Programmed I/O Using Assembly & C
PIC8F Pins and Signals, Clock, PIC8F Reset, High Voltage and Low Voltage Programming (HVP and LVP), “pragma config” and “config” directives 205, A simplified setup for the PIC8F43206, Downloading programs into the PIC8F43 using the PICKit interface, PIC8F43 Programmed I/O, I/O instructions in PIC8F assembly, Configuring PIC8F43I/O ports using PIC8F assembly, Configuring PIC8F43I/O ports using C, Interfacing LED’s (Light Emitting Diodes) and Seven-segment displays, Programmed I/O examples using PIC8F assembly, Programmed I/O examples using C Language.
9.PIC8F Interrupt I/O, LCD, and Keyboard Interfacing
Basics of Polled I/O vs. Interrupt I/O 23, PIC8F Interrupts, Interrupt Procedure, PIC8F Interrupt Types, Programming the PIC8F External Interrupts, Programming PIC8F external interrupts using assembly, Programming PIC8F external interrupts using C, Accessing PIC8F on-chip peripheral devices using Polled I/O vs. Interrupt I/O, PIC8F Interface to a typical LCD (Liquid Crystal Display), Interfacing PIC8F43to a hexadecimal keyboard and a seven-segment display, Basics of Keyboard and Display Interface to a Microcontroller. PIC8F43Interface to a Hexadecimal Keyboard and a Seven-Segment Display 26
10. PIC8F Timers and Analog Interface 273
PIC8F Timers, Timer0, Timer1, Timer2, Timer3,Analog Interface, PIC8F on-chip ADC (A/D Converter), Interfacing an external D/A (Digital to Analog) Converter using C.
11.PIC8F CCP and Serial I/O
PIC8F CCP (Capture/Compare/PWM (Pulse Width Modulation) Module, CCP Registers, CCP modules and associated timers, PIC8F43 Capture mode, PIC8F43Compare mode, PIC8F43PWM (Pulse Width Modulation) mode, DC Motor Control, Serial Interface, Synchronous Serial Data Transmission, Asynchronous Serial Data Transmission, Basics of SPI and I2C, PIC8F Serial I/O, PIC8F SPI mode,PIC8F I2C (Inter-Integrated Circuit) mode.
Appendix A: Answers to Selected Problems 363
Appendix B: Glossary 37
Appendix C: PIC8F Instruction Set (Alphabetical Order) 383
Appendix D: PIC8F Instruction Set — Details 389
Appendix E: PIC8F43 Special Function Registers 433
Appendix F: Tutorial for Assembling and Debugging a PIC8F Assembly Language Program Using the MPLAB
Appendix G: Tutorial for Compiling and Debugging a C-Program Using the MPLAB 465
Appendix H: Interfacing the PIC8F43to a Personal Computer or A Laptop Using PICKIT™ 493
H. Initial Hardware Setup for the PIC8F43493
H. Connecting The Personal Computer (PC) or The Laptop to the PIC8F43via PICkit494
H. Programming The PIC8F43 from a Personal Computer or a Laptop Using the PICkit495