Programmer's Notes 6/2003 Getting Started with the M68DEMO908GB60 The following steps provide a basic procedure to run the M68DEMO908GB60 demo board. Please refer to the demo board user manual (M68DEMO908GB60man.pdf) in the Documentation folder of the demo board CD for more detailed information. 1. Unpack demo board. 2. Ensure that the power switch (slide switch) is in OFF position. 3. Install batteries if necessary. 4. Set jumpers. PWR_SEL jumper installed in positions 1-2. (Battery operation). VRH_SEL jumpers -- all off except jumper 5 (positions 9 and 10). COM_EN jumpers -- all installed. LED_EN jumpers -- all installed. JP1 jumpers -- positions 1-2 and 3-4. Stop3 Demo Paced Loop Demo ATD/Timer Demo 1. Slide power switch to ON position. 2. Observe LED1. LED1 will quickly flash twice a second. For more detail, refer to the Stop3 Demo in the demo board user manual. 3. Press any pushbutton (SW1 through SW4) and observe the corresponding LED. If any switch is held low for at least 0.5 second, the corresponding LED will stay lit for about 3 seconds after the switch is released. 4. Slide power switch to OFF position. 1. Hold SW2 low while switching power ON. 2. Observe LEDs 1 and 4 toggling at different rates. For more detail, refer to the Paced Loop Demo in the demo board user manual. 3. Slide power switch to OFF position. 1. Hold SW3 low while switching power ON. 2. Observe LED5. For more detail, refer to the ATD/Timer Demo in the demo board user manual. 3. Momentarily hold SW1 low and observe the brightness of LED5 decrease. Subsequently, momentarily hold SW2 low and observe the brightness of LED5 increase. 4. Slide power switch to OFF position. (c) Motorola, Inc., 2003 Serial Monitor Demo The following procedure shows how to load code into the demo board using the serial monitor program that resides in the MC9S08GB60 memory. 1. Before running this demo, please install CodeWarrior for HCS08 Release 3.0 on your PC. Also, please copy the M68DEMO908GB60demo.zip file from the demo board CD to your PC and extract the files into a working folder. The M68DEMO908GB60demo.zip file can be found on the demo board CD in the Documentation directory. 2. Connect a straight-through DB-9 serial cable between COM1 on the PC and the SCI1 connector (DB9 connector closest to power switch) on the demo board. If you are using a different PC COM port, you will need to adjust the settings within the CodeWarrior IDE. 3. Navigate to the working folder and double click the M68DEMO908GB60demo.mcp project. The CodeWarrior IDE will launch. 4. Hold SW4 low while sliding the power switch to ON. 5. Double click on the DEMO.ASM file in the Sources folder in the project window. 6. Select Debug from the Project menu, or press F5, or click the green arrow on the CodeWarrior toolbar. The True-Time Simulator & Real-Time Debugger initiates serial communications with the demo board. The demo code is erased and re-programmed in the 9S08GB60 FLASH memory. The serial monitor code is not erased. (If the debugger is launched when the board is not powered, you will see a series of error notifications. Cancel and close these messages; close the debugger window; and go back to step 4.) 7. Hold SW2 low. While holding SW2 low select Start/Continue from the Run menu or click the green arrow icon. The paced loop demo will be running. (Release SW2.) 8. Power down the demo board. 9. Close the debugger window. 10. Hold SW4 low while sliding the power switch to ON. 11. Return to the Metrowerks CodeWarrior IDE window if it is not the active window. 12. Scroll down to the bottom of the DEMO.ASM window and change include "PACED_LOOP.ASM" to include "PACED_LOOP2.ASM" 13. This will modify the behavior of the paced loop demo without affecting the Stop3 or ATD/Timer demos. Select Make from the Project menu. 14. Select Debug from the Project menu, or press F5, or click the green arrow on the CodeWarrior toolbar. The True-Time Simulator & Real-Time Debugger will re-load the project with the changed software. 15. Hold SW2 low. While holding SW2 low select Start/Continue from the Run menu or click the green arrow icon. (Release SW2.) The new paced loop demo will be running. This demo continually sequences LEDs 1 through 4 in 1 second steps. 16. Disconnect the serial cable from the demo board. 17. Power down the board. 18. Repeat the Stop3, Paced Loop, and ATD/Timer demos mentioned above if you would like to verify that the demo code was loaded properly. The serial monitor can be used for much more than just programming new code without a special debug pod. Many debug operations (memory modify, breakpoints, real-time bug traces, etc.) can also be run over the serial cable while in this mode. Refer to application note AN2140 for more information on the serial monitor. 2 Getting Started with the M68DEMO908GB60 MOTOROLA