uVision5 provides a debugger that allows us to suspend execution (by inserting a breakpoint), and examine/change values of variables used in our program.
debug_ADC
.ADC_StartConversion ( );
.ADCvalue
is assigned to 10 (0x0000000A). This value is shown in the Call Stack + Locals window.This chapter has introduced many more programming concepts than would normally be covered in the first few chapters of a programming textbook, and the text is really aimed at those readers with experience of other languages. Those who are new to programming will need to fill some of the gaps by reading an introductory programming text. Because C has been around for more than 30 years, there are plenty to choose from! However, most novices will find recently published or revised editions of standard texts, more accessible than books written in the 1980s and 90s. You may find it easier to learn C by writing programs for your PC rather than the evaluation board. In fact, some of my students develop and test their embedded algorithms using a PC before porting them to uVision5. This is perfectly feasible for programs (or parts of programs) that do not need to access peripherals such as the ADC, and the like. You will need to install a C compiler to enable you to do this; free options include Visual Studio Express, Open Watcom, and GCC. The graphical user environments available with most of these compilers provide a user interface very similar to that of uVision5.
3.16.137.117