Skip to Content
Interfacing PIC Microcontrollers
book

Interfacing PIC Microcontrollers

by Martin P. Bates
April 2011
Intermediate to advanced
312 pages
9h 32m
English
Newnes
Content preview from Interfacing PIC Microcontrollers
Variable Types
In high-level languages, such as C, the variables to be used in a program must
be declared in advance, and the correct storage space allocated before running
the program. In PIC programs, all data locations (GPRs) are 8 bits, so they will
need to be used in groups to represent 16-bit (2 bytes) or even 32-bit
(4 bytes) numbers. In assembly language, these registers can be assigned using
label equates at the top of the program.
Integer
An 8-bit location can only store numbers from 0 to 255 in binary. This is an
obvious limitation in programs that may need to calculate results up to say, four
significant decimal digits (0–9999), with negati ...
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

Interfacing PIC Microcontrollers, 2nd Edition

Interfacing PIC Microcontrollers, 2nd Edition

Martin P. Bates

Publisher Resources

ISBN: 9780750680288