Cargando…

Intermediate C programming for the PIC microcontroller : simplifying embedded programming /

Delve into the exciting world of embedded programming with PIC microcontrollers in C. The key to learning how to program is to understand how the code works - and that is what you'll learn here. Following C Programming for the PIC Microcontroller, this book continues exploring the coding requir...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Ward, Hubert Henry
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Berkeley, CA : Apress L.P., [2020]
Colección:Technology in Action Press book.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Intro
  • Table of Contents
  • About the Author
  • About the Technical Reviewer
  • Introduction
  • Chapter 1: Creating a Header File
  • Creating a Header File
  • Creating a Project in MPLABX
  • Including the Header File
  • Creating the Project Source File
  • Creating a Global Header File
  • The PICSetUp.h Header File
  • Analysis of Listing 1-1
  • Synopsis
  • Answer to Exercise
  • Chapter 2: Controlling a Seven-Segment Display
  • Controlling a Seven-Segment Display
  • Common Anode Seven-Segment Display
  • Common Cathode Seven-Segment Display
  • Controlling the Display with the PIC
  • The Seven-Segment Display Program
  • The Algorithm
  • The Flowchart
  • The Listing for the Seven-Segment Display Program
  • The Analysis of Listing 2-1
  • Improving the Seven-Segment Display Program
  • The Problem with the Program
  • Arrays
  • Using Pointers
  • Analysis of The Pointer Example
  • The Improved Program
  • Synopsis
  • Answers to the Exercises
  • Chapter 3: The 24-Hour Clock
  • The Seven-Segment Display
  • The Algorithm for the 24-Hour Clock Using Seven-Segment Displays
  • The Initialization of the PIC
  • Analysis of Listing 3-1
  • A 24-Hour Clock with the LCD Display
  • Analysis of the Header File for the LCD
  • The Analysis of Listing 3-2
  • Improvements for the 24-Hour Clock LCD Program
  • Using Switch and Case Keywords
  • Analysis of the New Subroutine
  • Synopsis
  • Chapter 4: Creating a Square Wave
  • Why Create a Square Wave?
  • Musical Notes
  • The Speed of the Simple DC Motor
  • Pulse Width Modulation
  • Creating a Square Wave with the PWM Mode
  • Creating a 500Hz Square Wave
  • The Mark Time or Duty Cycle
  • Analysis of Listing 4-1
  • Creating Two Square Wave Outputs
  • Setting the Speed of a DC Motor
  • Driving the Motor
  • Creating a Three-Speed DC Motor Program
  • Using a Variable Input Voltage to Change the Speed of a DC Motor
  • Analysis of Listing 4-5
  • Creating a Musical Note
  • Creating the Middle C Note
  • Creating a Musical Keyboard
  • The Analysis Of Listing 4-7
  • Summary
  • Answers to the Exercises
  • Chapter 5: DC Motors
  • The Stepper Motor
  • The Servo Motor
  • Using the CCPM to Produce the Pulse Train Signal
  • Controlling the Positions of the Servo Motor with a Variable Resistor
  • Improving The Servo Motor Program
  • The Algorithm for the Improved Program
  • Summary
  • Solution to the Exercise
  • Chapter 6: Interrupts
  • What Are Interrupts?
  • The Fetch and Execute Cycle
  • The Program Counter
  • The Sources of Interrupts
  • The Process for a Simple Interrupt with No Priorities
  • Setting Up the PIC to Respond to the Interrupts
  • The PIE1 Register
  • The Algorithm for the Interrupt Test Program
  • Compiler Software Version Issue
  • The Analysis of Listing 6-1
  • Using the Compare Function of the CCP Module
  • The Algorithm for the Compare Function
  • The Analysis Of Listing 6-2
  • Using Priority Enabled Interrupts
  • The Algorithm for the High/Low Priority Program