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.7. PIC16 C More Data Types

• Arrays and strings

• Pointers and indirect addressing

• Enumeration

The data in a C program may be most conveniently handled as sets of associated variables. Variables occur more frequently as the program data becomes more complex, but only the basics are mentioned here.

Arrays

Arrays are sets of variable values having the same type and meaning. For example, each word in a text file is stored as a character array, a sequence of ASCII codes. This is also referred to as a string. A numerical array might be a sequence of voltage readings from an analog input in a test system or controller. The program ARRAYS.C (Listing 2.18) shows how they can be created and displayed. The arrays are declared using a collective name and ...

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