C programming for the PIC microcontroller : demystify coding with embedded programming /: demystify coding with embedded programming. (©2020)
- Record Type:
- Book
- Title:
- C programming for the PIC microcontroller : demystify coding with embedded programming /: demystify coding with embedded programming. (©2020)
- Main Title:
- C programming for the PIC microcontroller : demystify coding with embedded programming
- Further Information:
- Note: Hubert Henry Ward.
- Other Names:
- Ward, Hubert Henry
- Contents:
- Intro -- Table of Contents -- About the Author -- About the Technical Reviewer -- Introduction -- Chapter 1: Introduction -- Programmable Industrial Controllers -- Programming Languages -- Machine Code -- Assembler Language -- C Programming Language -- Different Programming Languages -- The IDE -- Summary -- Chapter 2: Our First Program -- The PORTS of the PIC -- Good Programming Practice -- The Algorithm -- The Flowchart -- The Program Listing -- Using MPLABX IDE -- Creating the Project in MPLABX -- The First Program Turning On and Off an Output -- The Main Aspects of a 'C' Program The Comments and PIC Configuration -- The TRISA and TRISB -- A TRIS Example -- Exercise 2-1 -- Setting the PORTS -- The ADC (Analogue to Digital Converter) -- Setting Up the Oscillator -- Exercise 2-2 -- Waiting for an Input -- Waiting to Turn the LED Off -- Exercise 2-3 -- Comments -- Testing the Program -- Compiling and Running the Program -- Testing the Program Practically -- Summary -- Exercise Answers -- Chapter 3: Updating the Program -- If This Then Do That -- Saving the Old Program -- Labels and the Goto Instruction -- Exercise 3-1 -- While vs. If Then -- Slowing the Micro Down T0CON Register -- Adding a One-Second Delay -- Exercise 3-2 -- Delaying the Turn Off -- Using Subroutines -- Defining and Calling a Subroutine -- The delay Subroutine -- Calling the Subroutine from Within the Main Program -- The Variable Delay and the For Do Loop -- Local and Global Variables and Data Types -- TypeIntro -- Table of Contents -- About the Author -- About the Technical Reviewer -- Introduction -- Chapter 1: Introduction -- Programmable Industrial Controllers -- Programming Languages -- Machine Code -- Assembler Language -- C Programming Language -- Different Programming Languages -- The IDE -- Summary -- Chapter 2: Our First Program -- The PORTS of the PIC -- Good Programming Practice -- The Algorithm -- The Flowchart -- The Program Listing -- Using MPLABX IDE -- Creating the Project in MPLABX -- The First Program Turning On and Off an Output -- The Main Aspects of a 'C' Program The Comments and PIC Configuration -- The TRISA and TRISB -- A TRIS Example -- Exercise 2-1 -- Setting the PORTS -- The ADC (Analogue to Digital Converter) -- Setting Up the Oscillator -- Exercise 2-2 -- Waiting for an Input -- Waiting to Turn the LED Off -- Exercise 2-3 -- Comments -- Testing the Program -- Compiling and Running the Program -- Testing the Program Practically -- Summary -- Exercise Answers -- Chapter 3: Updating the Program -- If This Then Do That -- Saving the Old Program -- Labels and the Goto Instruction -- Exercise 3-1 -- While vs. If Then -- Slowing the Micro Down T0CON Register -- Adding a One-Second Delay -- Exercise 3-2 -- Delaying the Turn Off -- Using Subroutines -- Defining and Calling a Subroutine -- The delay Subroutine -- Calling the Subroutine from Within the Main Program -- The Variable Delay and the For Do Loop -- Local and Global Variables and Data Types -- Type Char -- Type Unsigned char -- Type int -- Local Variables -- Global Variables -- Exercise 3-3 -- Summary -- Exercise Answers -- Chapter 4: Applying What We've Learned -- Controlling a Single Set of Traffic Lights -- The Algorithm -- The Configuration Words The Analysis of the Program -- Downloading the Program to a Prototype Board -- Extending the Program to the Crossroads Traffic Lights -- The Algorithm -- The Program Analysis -- Summary -- Chapter 5: Real-World Inputs -- Using Analogue Inputs -- The ADCON0 Control Register -- The ADCON1 Register -- The ADCON2 Register -- Creating the Required Acquisition Time -- Example 1 -- Example 2 -- Changing the ADC Input Channels -- A Basic Setup for the ADC -- A Basic Program for the ADC -- The Algorithm -- Analysis of the Program -- Summary -- Chapter 6: Using the LCD -- The LCD Controller Instruction or Command Mode -- Data Mode -- Initializing the LCD -- The Subroutine lcdOut () -- The Subroutine sendInfo () -- The New Aspects to PIC Programming in This LCD Program -- Arrays -- Using Pointers -- Connecting the LCD in 8-Bit Mode -- The Volt Meter Program -- The Algorithm -- The New Aspects of the Program -- The gohome Subroutine -- The sysVoltage Subroutine -- The displayVoltage Subroutine -- Changing the Main Part of the Program -- Creating Special Characters on the LCD -- Summary -- Chapter 7: Creating a Header File -- Header Files -- Creating a Header File … (more)
- Publisher Details:
- Berkeley, CA : Apress L.P
- Publication Date:
- 2020
- Copyright Date:
- 2020
- Extent:
- 1 online resource (282 pages)
- Subjects:
- 006.2/2
PIC microcontrollers
C (Computer program language)
C (Computer program language)
PIC microcontrollers
Electronic books - Languages:
- English
- ISBNs:
- 9781484255254
1484255259
9781484255261
1484255267 - Related ISBNs:
- 9781484255247
1484255240 - Notes:
- Note: Print version record.
- Access Rights:
- Legal Deposit; Only available on premises controlled by the deposit library and to one user at any one time; The Legal Deposit Libraries (Non-Print Works) Regulations (UK).
- Access Usage:
- Restricted: Printing from this resource is governed by The Legal Deposit Libraries (Non-Print Works) Regulations (UK) and UK copyright law currently in force.
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library HMNTS - ELD.DS.478503
- Ingest File:
- 03_029.xml