Page 162 - Programming Microcontrollers in C
P. 162

Coding Tips for Microcontrollers   147

                          microcontrollers. These devices can be placed into a background
                          debug mode that facilitates development of the code. In all of the
                          above development boards, the monitor software must execute on
                          the microcontroller being developed. This operation means there must
                          be either memory bank switching or the monitor must occupy some
                          of the normal memory space of the microcontroller. In either case,
                          the presence of the monitor software can be seen in the operation of
                          the microcontroller. Also, development with the above systems will
                          require that other resources be used for the development operation.
                          For example, if control of the development is through a serial port to
                          a terminal, the SPI of the microcontroller will probably be used. In
                          the background debug mode (BDM) of the larger devices, this memory
                          and resource sharing between the monitor and the code being de­
                          bugged is unnecessary. When a device is placed into BDM, its normal
                          operation ceases and all communications with the device occurs
                          through a special serial port. Through this serial port, the condition
                          of the device can be examined, memory can be accessed and changed,
                          breakpoints can be established, etc., just like the invasive technique.
                          However, when the device is returned to operation, there is no way
                          the presence of the monitor can be seen by the running program.

























                              Figure 3-5: MC68HC16EVB Development System.
   157   158   159   160   161   162   163   164   165   166   167