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.8. PIC16 C Compiler Directives

• Include, use directives

• Header file listing and directives

Complier directives are typically used at the top of the program to set up compiler options, control project components, define constant labels, and so on before the main program is created. They are preceded by the hash symbol to distinguish them from other types of statement and do not have a semicolon to end the line.

Program Directives

Examples using the directives encountered thus far follow. Refer to the compiler reference manual for the full range of options.

♯include “16F877A.h”

The include directive allows source code files to be included as though they had been typed in by the user. In fact, any block of source code can be included in this way, ...

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