2. Getting Started
Page 14
2
The sample application reads the position of the potentiometer (connected to the
microcontroller’s ADC peripheral) and displays this value on the LEDs.
To execute the sample application, follow the next steps:
1. Ensure that the PK-HCS12E128 board is connected to the PC (via the USB cable).
2. Start the CodeWarrior HC(S)12 IDE by selecting
Start > Programs > Metrowerks
CodeWarrior > CW12 > CodeWarrior IDE
. The CodeWarrior HC(S)12 IDE will open.
3. From the main menu, choose
File > Open
. Select the
“adc.mcp”
workspace file that is
located under the
“\Program Files\Metrowerks\CodeWarrior
CW12\(CodeWarrior_Examples)\MC9S12\SofTec Microsystems\PK-
HCS12E128\C\Adc”
directory. Click
“Open”
. The following window will appear.
The
Project
Window
4. The C code of this example is contained in the
“main.c”
file. Double click on it to open.
The following window will appear.