SW006010 Microchip Technology, SW006010 Datasheet - Page 21

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
2.1
2.2
2.3
 2002 Microchip Technology Inc.
Chapter 2. Differences Between MPLAB C17 and ANSI C
INTRODUCTION
HIGHLIGHTS
MPLAB C17 vs. ANSI C
This chapter discusses the differences between MPLAB C17 and ANSI C.
Items discussed in this chapter are:
• MPLAB C17 vs. ANSI C
• Components of a Basic MPLAB C17 Program
• Keyword Differences
• Statement Differences
• Oddities of Standard Functions
Most C programmers have gained their experience programming C on computers
where there was an operating system to handle such things as memory management,
input/output, interdevice communications, etc. Microcontrollers, by their very nature,
do not have the memory overhead for an operating system. Therefore, the compiler
expects the user to implement memory allocation, I/O operation through a peripheral,
and other specialized tasks. Libraries and precompiled object files are available with
MPLAB C17 to aid the programmer in this endeavor.
An MPLAB C17 program is a collection of declarations, statements, comments and
preprocessor directives that typically do the following:
• Declare data structures
• Allocate data space
• Evaluate expressions
• Perform program control operations
• Control PICmicro MCU peripherals
Additionally, after source code is compiled, it must be programmed into a device. In
the device environment, RAM is in an undefined state on power-up. The program
must take care of initializing any variables that are set in the code. This is
accomplished by storing the variable values in program memory and then moving
them to RAM before the
pre-execution items that may be necessary, such as setting up a software stack.
These specialized items may be written in C or assembly code. In either case, the
programmer must decide what is needed.
main()
function executes. There are other
MPLAB
®
C17 C COMPILER
USER’S GUIDE
main()
apRNOVM^-page 15
Part
Part
Part
Part
1
2
3
4

Related parts for SW006010