Skip to Content
Programming 8-bit PIC Microcontrollers in C
book

Programming 8-bit PIC Microcontrollers in C

by Martin P. Bates
August 2008
Beginner to intermediate
304 pages
6h 2m
English
Newnes
Content preview from Programming 8-bit PIC Microcontrollers in C

2.2. PIC16 C Program Basics

• Variables

• Looping

• Decisions

The purpose of an embedded program is to read in data or control inputs, process them, and operate the outputs as required. Input from parallel, serial, and analog ports are held in the file registers for temporary storage and processing; and the results are output later on, as data or a signal. The program for processing the data usually contains repetitive loops and conditional branching, which depends on an input or calculated value.

Variables

Most programs need to process data in some way, and named variables are needed to hold their values. A variable name is a label attached to the memory location where the variable value is stored. When working in assembly language, a register label ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming 16-Bit PIC Microcontrollers in C, 2nd Edition

Programming 16-Bit PIC Microcontrollers in C, 2nd Edition

Lucio Di Jasio

Publisher Resources

ISBN: 9780750689601