Page 412 - Introduction to Microcontrollers Architecture, Programming, and Interfacing of The Motorola 68HC12
P. 412

Appendix! Using the HIW ARE CD-ROM                                  389



        toolbox. Type the source file's name, Program .asm, in the assembler's top center
        window. If the file name is already in the window, instead of retyping the file name,
        click on the icon immediately to the right of this window. The status of the assembly,
        including error messages, is output into the bottom window. When you have no errors,
        the Program.abs file is written. Program.abs can then be simulated as in §A2.3.

        A2.5 Downloading to a 'B32 Board

        You can use the HIW ARE software to download and debug a program in a file, such as
        p. 1 Labs or program.abs, on the Motorola M68HC12B32EVB board as your target.
        Before you attempt to run your first program on a target, you should begin by
        simulating the program on the HIWAVE simulator, as in §A2.4. After you are
        comfortable with the simulator's operation, you should run it on actual hardware. First,
        make sure that W3 and W4 are in their 0 position to configure the board for EVB mode.
        Then connect the target's DB-9 connector to the personal computer COM! port. Apply 5
        volt power to the target. You should always apply the 5V power after all connections are
        made, and you should never change a connector while power is applied to the 'B32 board.
        Pull the Component menu to the Select_Target item, which brings up a dialog box. In
        that box, select the Asciimon target name. (If COM1 is not available, use another
        COM port, but change HIWAVE's communictations by pulling the Monitor menu to
        the Communication item, and change the port in the dialog box that appears).
            HIWAVE behaves the same when used as a downloader/debugger as when used as a
        simulator. Follow §A2.4's procedures to run an example on the target microcontroller.
            Having changed HIWAVE from a simulator to a downloader/debugger, you can pull
        the File menu to the Save Project item and release. This will save the current
        configuration so that when you restart HIWAVE it will start as a downloader/debugger,
        and you won't have to repeat the above procedure each time you use HIWAVE as a
        downloader/debugger. To change HIWAVE back to a simulator, pull the Components
        menu to the Set Target item, and click on the Sim entry.

        A2.6 POD-Mode BDM Interface

        You can run your program on a target, such as an Technological Arts Adapt-812 board,
        or an Axiom PB68HC12A4 board. This technique utilizes the state-of-the-art background
        debug module BDM in your target, providing a debugger that runs in the
        M68HC12B32EVB board (called the POD) that is isolated from the target.
            Begin by running a program on the HIWAVE simulator, and then running it on the
         'B32 board, as described in §A2.5. After you are comfortable with the simulator's and
         'B32 board's operation, reconnect the W3 to its 0 position and W4 to its 1 position to
        configure the board for POD mode, and reset the POD. Plug the 6-wire cable into the
        POD's Wll connector and the target's BDM connector. Match pin 1 with the
        cable/connector pin 1. Restart HIWAVE. You should be able to duplicate what you did
        In the 'B32 board, nmning it on the Adapt-812 or PB68HC12A4 board as a target. You
   407   408   409   410   411   412   413   414   415   416   417