C Programming Language
Dogan Ibrahim · 2012
This chapter is about the programming of PIC microcontrollers using the C high level language. There are several C languages for the PIC microcontrollers. The one chosen and described in this chapter is the highly popular mikroC (or mikroC PRO for PIC). This chapter provides an introduction to programming using the mikroC language. All the necessary building blocks of a C program are described in the chapter, including variables, constants, arrays, structures, unions, conditional operators, user functions, and built-in library functions. Examples are given to show how to use various features of the mikroC language. In addition, the use of the mikroC compiler is explained with examples, including how to create a file, how to compile a file, and how to program the target microcontroller. Finally, the use of the mikroC simulator is described in detail and with an example.