DEMO9S08QG8 APP Freescale Semiconductor Rev. 0.02, 09/2005 User Guide DEMO9S08QG8 APP Example Application User Guide Introduction This document describes how to set up and use the DEMO9S08QG8 APP example application that comes with the DEMO9S08QG8 demo board. This example application allows the user to try out several features on Freescales MC9S08QG8 microcontroller. Requirements To run this software, you will need the following: DEMO9S08QG8 demo board with an MC9S08QG8 in the 16 DIP socket DB9 serial cable PC with: CodeWarrior Development Studio for HC(S)08 CodeWarrior Service Pack for MC9S08QG8 (download from www.metrowerks.com) Terminal emulation program, e.g., HyperTerminal Setting up the Demo 1. Connect the DEMO9S08QG8 to the PC as described in the Quick Start Guide. The jumper configuration for this application is: COM EN jumper removed SW1, SW2, LED1, RV1, RZ1 jumpers installed LED2 jumper optional 2. Connect the DB9 serial cable and the USB cable between the DEMO9S08QG8 and the PC. 3. Open CodeWarrior IDE and open the DEMO9S08QG8 APP project. 4. Compile for the P&E ICD target and program the MCU by selecting P&E ICD from the pull-down menu beneath the project name. Then click the debugger icon, as shown in Figure 1). This will launch the debugger application and ask, Erase and program FLASH. Click on Yes. When the programmer pop-up window goes away, the MCU is programmed. Freescale Semiconductor, Inc., 2005. All rights reserved. Running the Demo First, Select P&E ICD 2. Then, Click Debugger Icon Figure 1. CodeWarrior Project Window (Step 4) After the MCU is programmed, launch the terminal emulator. The emulator must be configured to use the COM port that the DB-9 cable is plugged into, usually COM1. The COM port settings must be: 4800 baud 8 bits No parity 1 stop bit The demo is now ready to run. Running the Demo If necessary, open the True-Time Simulator. Select Run -> Start/Continue(F5) to launch the application. If everything is configured correctly, the terminal window will display the following as soon as the MCU is running: Welcome to the MC9S08QG8 Demo Application V1.0 Main Test Menu: 1: ICS setup 2: TPM PWM setup 3: MTIM setup 4: RTI setup 5: STOP test 6: ACMP test 7: ADC test Select number to execute: This demo relies on the internal clock reference to generate bus frequency and the communications baud rate. Therefore, the MCUs internal clock reference must be trimmed to 31.25 kHz and the trim value stored in DEMO9S08QG8 APP Example Application User Guide, Rev. 0.02 2 Freescale Semiconductor