BAR1 Source Code
The program source code (Listing B.2) starts with a comment block containing the name of the project, author, date, version, and program description. Details of the compiler version, development system, and target hardware can be included. In other words, as much information as possible to allow the code to be modified, updated, and maintained effectively. In CCS C, the initialization phase includes a header file that defines the MCU for which the program is intended. This is necessary as every PIC processor has a different set of features: the number of ports, memory size, special input and output facilities, and so on. The include statement is defined as a compiler (preprocessor) directive by the leading hash symbol (#). The ...
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.
Read now
Unlock full access