mikroC
making it simple...
mikroC - C Compiler for Microchip PIC microcontrollers
To facilitate PIC programming, mikroC implements a number of predefined globals and constants.
All PIC SFR registers are implicitly declared as global variables of volatile unsigned short. These identifiers have external linkage, and are visible in the entire project. When creating a project, mikroC will include an appropriate .def file, containing declarations of available SFR and constants (such as T0IE, INTF, etc). Identifiers are all in uppercase, identical to nomenclature in Microchip datasheets. For the complete set of predefined globals and constants, look for “Defs” in your mikroC installation folder, or probe the Code Assistant for specific letters (Ctrl+Space in Editor).
Device Clock Constants
There are two
mikroC allows you to access individual bits of
//If RB0 is set, set RC0: if (PORTB.F0) PORTC.F0 = 1;
There is no need for any special declarations; this kind of selective access is an intrinsic feature of mikroC and can be used anywhere in the code. Identifiers
Provided you are familiar with the particular chip, you can access bits by their name:
INTCON.TMR0F = 0; // Clear TMR0F
|
| page |
MikroElektronika: Development tools - Books - Compilers | 33 | |
|