
2.4 Structure of a Microcontroller-based C Program
The structure of a C program developed for a microcontroller is basically the
same as the structure of a standard C program, with a few minor changes. The
structure of a typical microcontroller-based C program is shown in Fig. 2.1. It
is always advisable to describe the project at the beginning of a program using
comment lines. The project name, ®lename, date, and the target processor type
should also be included in this part of the program. The register de®nition ®le
should then be included for the type of target processor used. This ®le is
supplied as part of the compiler and includes the de®nitions ...