Freescale MC9S08MP16VLF Demo9s08mp16 user manual Datasheet

Purchase Agreement
P&E Microcomputer Systems, Inc. reserves the right to make changes without further notice to any
products herein to improve reliability, function, or design. P&E Microcomputer Systems, Inc. does not
assume any liability arising out of the application or use of any product or circuit described herein.
This software and accompanying documentation are protected by United States Copyright law and
also by International Treaty provisions. Any use of this software in violation of copyright law or the
terms of this agreement will be prosecuted.
All the software described in this document is copyrighted by P&E Microcomputer Systems, Inc.
Copyright notices have been included in the software.
P&E Microcomputer Systems authorizes you to make archival copies of the software and
documentation for the sole purpose of back-up and protecting your investment from loss. Under no
circumstances may you copy this software or documentation for the purpose of distribution to others.
Under no conditions may you remove the copyright notices from this software or documentation.
This software may be used by one person on as many computers as that person uses, provided that
the software is never used on two computers at the same time. P&E expects that group programming
projects making use of this software will purchase a copy of the software and documentation for each
user in the group. Contact P&E for volume discounts and site licensing agreements.
P&E Microcomputer Systems does not assume any liability for the use of this software beyond the
original purchase price of the software. In no event will P&E Microcomputer Systems be liable for
additional damages, including any lost profits, lost savings or other incidental or consequential
damages arising out of the use or inability to use these programs, even if P&E Microcomputer Systems
has been advised of the possibility of such damage.
By using this software, you accept the terms of this agreement.
© 2009 P&E Microcomputer Systems, Inc. “MS-DOS” and “Windows” are registered trademarks of
Microsoft Corporation. “Freescale” and “ColdFire” are registered trademarks of Freescale, Inc. “IBM”
and “PowerPC” are registered trademarks of IBM corporation.
P&E Microcomputer Systems, Inc.
98 Galen St.
Watertown, MA 02472
617-923-0053
http://www.pemicro.com
Manual version 1.01
1
2
INTRODUCTION ............................................................................................ 1
1.1
Overview ........................................................................................................ 1
1.2
Package Contents .......................................................................................... 1
1.3
Supported Devices ......................................................................................... 1
1.4
Recommended Materials On The Getting Started DVD-ROM ....................... 1
1.5
Handling Precautions ..................................................................................... 2
HARDWARE FEATURES............................................................................... 2
2.1
DEMO9S08MP16 Features............................................................................ 2
2.2
On-Board Logic Analyzer ............................................................................... 4
2.3
On-Board Virtual USB Port............................................................................. 4
2.4
DEMO9S08MP16 Jumper/Connector Quick Reference ................................ 5
3
GETTING STARTED WITH THE DEMO9S08MP16 ...................................... 6
4
SYSTEM SETUP ............................................................................................ 7
5
6
7
4.1
Overview ........................................................................................................ 7
4.2
Operating System Requirements .................................................................. 7
4.3
Software Setup............................................................................................... 7
4.4
Quick Startup.................................................................................................. 8
4.5
Hardware Setup ............................................................................................. 8
OPERATING MODES................................................................................... 12
5.1
Overview ...................................................................................................... 12
5.2
Debug Mode................................................................................................. 12
5.3
Run Mode..................................................................................................... 13
5.4
External BDM Mode ..................................................................................... 13
P&E EMBEDDED MULTILINK TOOLKIT PC APPLICATIONS .................... 13
6.1
Logic Analyzer Application ........................................................................... 13
6.2
Terminal Application..................................................................................... 14
6.3
DEMO9S08MP16 Unsecure Application ...................................................... 15
6.4
Serial Grapher Application ........................................................................... 16
JUMPER SETTINGS .................................................................................... 20
7.1
System Power .............................................................................................. 20
DEMO9S08MP16 User Manual
ii
8
9
10
iii
7.2
Virtual Serial Port ..........................................................................................21
7.3
LED Display Port ..........................................................................................21
7.4
External Crystal Circuitry ..............................................................................22
7.5
Input and Reset Switches .............................................................................22
7.6
Buzzer...........................................................................................................24
7.7
IIC Pull-up .....................................................................................................24
7.8
Analog Input Potentiometer ..........................................................................24
7.9
Optional Jumpers For Various VDD And VSS ..............................................25
DEMO9S08MP16 CODE DEVELOPMENT SOFTWARE ............................ 25
8.1
Using CodeWarrior With The DEMO9S08MP16 ..........................................25
8.2
Using P&E Software With The DEMO9S08MP16 ........................................26
TRANSITIONING TO YOUR OWN TARGET ............................................... 26
9.1
Hardware Solutions At A Glance ..................................................................27
9.2
Working With P&E’s USB Multilink ...............................................................28
9.3
Working With P&E’s Cyclone PRO ...............................................................29
TROUBLESHOOTING.................................................................................. 30
10.1
DEMO9S08MP16 Is Undetected ..................................................................30
10.2
CodeWarrior Installation Fails (WinDriver Error)...........................................31
DEMO9S08MP16 User Manual
1
1.1
INTRODUCTION
Overview
The DEMO9S08MP16 is a low cost development system supporting
Freescale MC9S08MP16 microcontrollers. P&E’s Embedded Multilink
circuitry on the DEMO9S08MP16 board allows the on-board processor
connected to the DEMO9S08MP16 to be debugged and programmed via
USB from a PC. In addition, the demo board can be powered using the USB
bus.
1.2
Package Contents
The DEMO9S08MP16 package includes the following items:
1.3
•
DEMO9S08MP16 Demonstration Board
•
Getting Started DVD - Getting started with the series of
microcontrollers
•
USB A-to-B Cable
•
Quick Start Guide
•
Freescale Warranty Card
Supported Devices
The DEMO9S08MP16 supports the following devices:
•
1.4
MC9S08MP16VLF
Recommended Materials On The Getting Started DVD-ROM
•
Freescale MC9S08MP16 reference manual and datasheet
•
DEMO9S08MP16 schematic
DEMO9S08MP16 User Manual
1
1.5
•
P&E Embedded Multilink Toolkit applications
•
P&E Embedded Multilink driver installation guide and resources
Handling Precautions
Take care to handle the package contents in a manner such as to prevent
electrostatic discharge.
2
HARDWARE FEATURES
The DEMO9S08MP16 is a demonstration and development system for
Freescale’s MC9S08MP16 microcontrollers. Application development is quick
and easy using P&E’s Embedded Multilink circuitry and the included software
tools and examples. An optional BDM port is provided to allow the use of an
external BDM interface such as P&E’s Cyclone PRO automated programmer
or USB Multilink. The USB Multilink is functionally comparable to the
DEMO9S08MP16’s Embedded Multilink circuitry.
Note:
2.1
The DEMO board’s onboard Embedded Multilink circuitry is intended to
function with the onboard processor only. It cannot be used to communicate
with other devices.
DEMO9S08MP16 Features
•
On-board Logic Analyzer
•
On-board Virtual Serial Port
•
P&E’s Embedded Multilink circuitry populated on the underside
•
SCI signals connected to P&E’s Embedded Multilink through jumpers
•
ON/OFF Power Switch (and power input source selector) w/ LED
indicator
•
A 6VDC power supply input barrel connector
•
Power Input Selection Jumpers for selecting the input voltage source:
•
2
•
5V from Embedded Multilink or LDO regulator
•
Power from APMOTOR Port which might be 5V or 3.3V
RESET Push Button and LED indicator w/ Enable
DEMO9S08MP16 User Manual
•
•
User Features:
•
Opto-coupler isolated RS232 physical interface and DB9
connector w/Enable
•
6 LEDs driven by logic inverter 74AC04
•
4 User LED’s w/ Enable
•
4 User Push Buttons w/ Enable
•
1 Piezo Buzzer w/ Enable
•
1 temperature sensor connected to differential signals w/Enable
•
1 I/O signal slide switch
•
IIC Pullups w/ Enable
•
15K Ohm multi-turn POT w/ Enable
Specifications:
•
Board Size 3.5 x 4.0
•
Power Input:
•
USB Cable: 5VDC, 500mA max
•
DC Power Jack: 2.1/5.5mm barrel connector, 6VDC to Center
Positive
DEMO9S08MP16 User Manual
3
Figure 2-1: DEMO9S08MP16 Top Component Placement
2.2
On-Board Logic Analyzer
The DEMO9S08MP16 board has a built-in 2-channel logic analyzer which
may be used to display captured data in real-time on a host PC. The logic
analyzer channels (IN0/IN1) are connected to the PTA2 and PTA3 signals on
the DEMO9S08MP16 board by default via the J9 jumpers. The channels may
be connected to any of the processor pins via wire jumpers (not included).
The Logic Analyzer Utility, included in the P&E Embedded Multilink Toolkit on
the accompanying DVD-ROM, displays the logic analyzer signals on a PC.
2.3
On-Board Virtual USB Port
The DEMO9S08MP16 board has a built-in virtual serial port which may be
connected to the MP16 processor’s SCI RXD/TXD. This allows certain PC
applications to be able to connect in a serial fashion to the microcontroller
without the actual use of serial port hardware.
The Terminal Window Utility, included in the P&E Embedded Multilink Toolkit
on the accompanying DVD-ROM, is a generic serial port utility which works
with the DEMO9S08MP16 virtual serial port or actual serial port hardware.
4
DEMO9S08MP16 User Manual
2.4
DEMO9S08MP16 Jumper/Connector Quick Reference
Default Jumper Settings
The following is a list of default jumper settings for DEMO9S08MP16 board.
The settings listed indicate the “on” (or installed) position.
Default Jumper Settings
JUMPERS
DEMO9S08MP16 User Manual
SETTINGS
J3
2&4
J4
1&2
J5
1&2
J6
ALL ON
J7
ALL OFF
J8
ON
J9
1&2, 3&4
J10
1&2, 3&4
J11
2&3
J12
ALL ON
J13
ALL ON
J14
ON
J15
ON
J16
ON
J17
ON
J21
1&2, 3&4, 5&6
J22
1&2, 3&4
J23
1&2, 3&4
5
APMOTOR Port Connector Pinout
The following is the pinout for the APMOTOR connector on the
DEMO9S08MP16 board.
Figure 2-2: APMOTOR Port Connector Pinout
3
GETTING STARTED WITH THE DEMO9S08MP16
The DEMO9S08MP16 is a low-cost board targeting quick microcontroller
evaluation. The board includes a power terminal to measure the ultra-low
power consumption of the MP devices.
Please refer to the DEMO9S08MP16 Quick Start Guide and Labs for
instructions on how to install software, connect the DEMO9S08MP16 to your
6
DEMO9S08MP16 User Manual
PC, and run quick demonstrations.
4
4.1
SYSTEM SETUP
Overview
P&E’s Embedded Multilink driver is required to operate the DEMO9S08MP16
using a PC. The Embedded Multilink driver should be installed with the
CodeWarrior Development Studio software or from the DEMO9S08MP16
Resources in the Getting Started DVD-ROM before the PC is connected to
the DEMO9S08MP16.
4.2
Operating System Requirements
The following are the resources required to run the CodeWarrior Development
Studio and the DEMO9S08MP16:
4.3
4.3.1
•
A PC-compatible system running Windows 2000, Windows XP, or
Windows Vista
•
128MB of available system RAM, and 1GB of available hard disk
space
•
A DVD-ROM drive for software installation
•
A USB port
Software Setup
Installing CodeWarrior Development Studio
To install the CodeWarrior Development Studio, follow the instructions on the
DVD-ROM.
4.3.2
Installing P&E Resources
Use the DEMO9S08MP16 Resources in the DVD-ROM to access and install
P&E resources for the DEMO9S08MP16. These materials are not required for
operation. The DEMO9S08MP16 Resources in the Getting Started DVDROM contains the following support materials:
•
DEMO9S08MP16 Embedded Multilink hardware interface driver
DEMO9S08MP16 User Manual
7
4.4
•
DEMO9S08MP16 User Manual (this document)
•
DEMO9S08MP16 Board Schematics
•
DEMO9S08MP16 Component Breakdown List
•
P&E Embedded Multilink Toolkit PC Applications
•
P&E Evaluation Software
•
Links to Freescale documentation, P&E Discussion Forums, and
DEMO9S08MP16 FAQs.
Quick Startup
Only a few steps are required to get the DEMO9S08MP16 up and running.
Please reference the Quick Start Guide.
4.5
4.5.1
Hardware Setup
First-Time Connection
The DEMO9S08MP16 may be connected to a PC through a USB port.
Connection steps are listed below in typical order:
1. Install the required software, as described in the previous section.
2. Make sure the power switch for USB_PWR for VDD_SEL is installed.
3. Plug the USB cable A-M connector into a free USB port of the PC.
4. Plug the USB cable B-M connector into the USB connector on the
DEMO9S08MP16 Base Board.
5. The operating system will recognize P&E’s Embedded Multilink circuitry and P&E’s USB to Serial circuitry. Depending on the operating
system, you may see the “Found New Hardware Wizard” dialog to
assist you with software installation for “PEMicro USB Multilink (i0).”
On Windows XP (SP2), the following dialog will appear:
8
DEMO9S08MP16 User Manual
Figure 4-1: Found New Hardware Wizard Dialog (1 of 4)
Select the “Install the software automatically (Recommended)” option
and click the “Next” button.
6. Windows will install the driver files to your system. At the end of the
installation, the following dialog box will appear:
DEMO9S08MP16 User Manual
9
Figure 4-2: Found New Hardware Wizard Dialog (2 of 4)
Click the “Finish” button to exit the current “Found New Hardware
Wizard”.
7. Depending on the operating system, you may see the “Found New
Hardware Wizard” dialog again to assist you with software installation
for “PEMicro USB Serial Port (i1).” On Windows XP (SP2), the following dialog will appear:
10
DEMO9S08MP16 User Manual
Figure 4-3: Found New Hardware Wizard Dialog (3 of 4)
Select the “Install the software automatically (Recommended)” option
and click the “Next” button.
8. Windows will install the driver files to your system. At the end of the
installation, the following dialog box will appear:
DEMO9S08MP16 User Manual
11
Figure 4-4: Found New Hardware Wizard Dialog (4 of 4)
Click the “Finish” button to exit the “Found New Hardware Wizard.”
If the DEMO9S08MP16 hardware interface driver is now properly installed on
your system, the green USB LED on the DEMO9S08MP16 Base Board
should be illuminated. In addition, if you turn on the system power of the
DEMO9S08MP16 you will see the red Power LED illuminate.
5
5.1
OPERATING MODES
Overview
The DEMO9S08MP16’s Embedded Multilink circuitry, featured hardware
components, and optional external BDM header make it a versatile
development tool. Below are some of the featured operating modes of the
DEMO9S08MP16.
5.2
Debug Mode
A host communicates with the DEMO9S08MP16 through the Embedded
Multilink circuitry. Either the CodeWarrior Development Studio or P&E’s
HCS08/CFV1 software tools will work with the DEMO9S08MP16. Please refer
12
DEMO9S08MP16 User Manual
to Section 8 - DEMO9S08MP16 CODE DEVELOPMENT SOFTWARE for
more information.
5.3
Run Mode
The DEMO9S08MP16’s rich component list empowers it to perform a variety
of tasks. Once an application is developed, debugged, and programmed
properly into the MP internal flash memory, it can run with or without
connecting to a host.
5.4
External BDM Mode
The DEMO9S08MP16 has an optional BDM header for debugging and
programming the on-board MP device using an external BDM hardware tool,
such as P&E’s USB Multilink or Cyclone PRO. Please refer to Section 9 TRANSITIONING TO YOUR OWN TARGET for more information. A user can
take advantage of this mode to develop a target-specific MP system and
compare it with the DEMO9S08MP16 when necessary.
6
P&E EMBEDDED MULTILINK TOOLKIT PC APPLICATIONS
P&E provides several Windows PC-based applications which work with the
DEMO9S08MP16 board. These applications are collectively referred to as the
P&E Embedded Multilink Toolkit. The following applications are included in
the toolkit:
6.1
Logic Analyzer Application
The DEMO9S08MP16 board has a built-in two-channel logic analyzer. This
analyzer allows the IN0 and IN1 signals to be captured by the PC and
displayed for the user. The IN0 and IN1 signals may be connected to any of
the MCU signals which the user would like to view. By default, they are
connected to the PTA2 and PTA3 pins of the MCU by jumper J9. At the time of
this release, the logic analyzer runs at a capture rate of 10khz.
DEMO9S08MP16 User Manual
13
Figure 6-1: Logic Analyzer Application
This PC-based application is used to display the logic analyzer data on the
PC. The logic analyzer data is displayed in real-time and each waveform may
be paused, zoomed, and printed.
To start using this application, please plug in a USB cable into the
DEMO9S08MP16 board. Once the USB and Power LEDs light up, indicating
the proper enumeration on the USB port, click on the Open DEMO and Graph
Pins button. The logic channel graphs should be reflecting data captured from
the IO pins connected to the IN0 and IN1 header pins on the
DEMO9S08MP16 evaluation board.
This PC-based application is included on the DVD-ROM that accompanies
the DEMO9S08MP16, and may also be found at:
http://www.pemicro.com/fixedlinks/demotoolkit.cfm.
6.2
Terminal Application
This PC-based application acts as a standard serial port terminal application
on the PC. It works with standard serial ports as well as the virtual serial port
on the DEMO9S08MP16 board. The application includes settings to adjust
the COM port number, baud rate, parity, and number of data bits. There is a
button to take a file on the PC and transmit it out of the serial port. There are
also delays which are automatically inserted into the transmission output to
prevent overruns. It is recommended that these defaults not be changed.
14
DEMO9S08MP16 User Manual
Figure 6-2: Terminal Application
The terminal window may be set for full duplex or half duplex. In full duplex
mode, only received characters are displayed in the terminal window. In half
duplex mode, both transmitted and received characters are displayed.
To start using this application, please choose COM or virtual USB COM
settings from the drop down Port menu. This specifies the port on the
evaluation board that will be used for serial data transmission. Please make
sure that the jumpers on header J4 are set accordingly. Prior to starting serial
data capture, please specify the Baud, Parity and Bits settings to reflect the
parameters at which your serial communication interface is operating. Once
your port settings are configured, please plug a USB or DB9 serial cable into
the evaluation board and click on the Open Serial Port button.
This PC-based application is included on the DVD-ROM that accompanies
the DEMO9S08MP16, and may also be found at:
http://www.pemicro.com/fixedlinks/demotoolkit.cfm.
6.3
DEMO9S08MP16 Unsecure Application
This application allows secure CFV1 and HCS08 microcontrollers to be
unsecured. The Unsecure application will erase a secure device to make it
unsecure. This application works with the DEMO9S08MP16 board as well as
other user hardware connected to the PC via the USB Multilink or Cyclone
PRO hardware interfaces.
DEMO9S08MP16 User Manual
15
Figure 6-3: Unsecure Application
In order to unsecure a device with this application, please specify the
hardware interface that you are using. If your P&E Multilink or Cyclone PRO is
successfully detected, the name of a corresponding device will appear in the
Port text box. Please select HCS08 or CFV1 from the Select Architecture drop
down menu and press the Perform Unsecure button. The application will
finish unsecuring and erasing the device shortly thereafter.
This PC-based application is included on the DVD-ROM that accompanies
the DEMO9S08MP16, and may also be found at:
http://www.pemicro.com/fixedlinks/demotoolkit.cfm.
6.4
Serial Grapher Application
This PC-based application is a serial graphing utility that may be used with
microcontroller code which transmits data in the correct format. It allows
incoming data on the PC serial port (or one of P&E’s virtual serial ports) to be
automatically graphed in time or displayed as a series of bar graphs. The
virtual serial port exists on several of P&E’s Embedded Multilink designs
including the DEMO9S08MP16 board.
To start using this application, please choose COM or virtual USB COM
settings from the drop-down Port menu. By doing so, you are specifying the
port on the evaluation board that will be used for transmitting captured
accelerometer data via a COM or USB serial port. Please make sure that
jumpers J4 and J5 are set accordingly. Prior to starting serial data capture,
please specify the Baud setting to reflect the parameter at which your serial
communication interface is operating. Once your port settings are configured,
please plug a USB or DB9 serial cable into the evaluation board and click on
the Open Serial Port and Start Demo buttons. The graphing of data can be
16
DEMO9S08MP16 User Manual
paused and the scale of the X and Y axes can be changed via a tool bar
located in the top right corner of the Serial Grapher Application.
All data to be displayed must be in hexadecimal format. The data can be
accepted and displayed either as incoming byte values ($00-$FF) or word
values ($0000-$FFFF). The data format indicates whether the data is byte or
word data. The graphical components automatically size their range
depending upon the incoming data.
This PC-based application is included on the DVD-ROM that accompanies
the DEMO9S08MP16 and may also be found at:
http://www.pemicro.com/fixedlinks/demotoolkit.cfm.
6.4.1
Visual Components
The Bar Graph has four separate bars A, B, C, and D. On each bar a
percentage value is displayed which indicates the current value relative to the
full range. A byte value of $7F (max is $FF) would show up as approximately
50% as would a word value of $7FFF (max is $FFFF). As can be seen in the
data formatting section, all four bars must be written at the same time. The
bars are shown here:
DEMO9S08MP16 User Manual
17
Figure 6-4: Serial Grapher Bar Graph
The graphing component shows four waveforms, X, Y, Z, and W. The
magnitude axis either has a range of $00-$FF (if byte values are incoming on
the serial port) or $0000-$FFFF (if word values are incoming). Each new set
of values which comes through the serial port is added to the far right side of
the graph and the rest of the data values are moved to the left. The vertical
axis displays the incoming data as the magnitude of each waveform, and the
horizontal axis displays the number of samples. The graph has a limited size,
so older samples will eventually fall off the left part of the graph. As can be
seen in Data Format, each incoming data command affecting the graphing
component must have new data for all four waveforms. An example graph is
shown here:
18
DEMO9S08MP16 User Manual
Figure 6-5: Serial Grapher Graphing Component
6.4.2
Data Format
The data format is broken into two sections depending upon whether the
incoming data is in byte format or word format.
6.4.2.1
Byte Formatted Data
There are two commands which may be accepted. Both commands must end
in the special characters #$0D and #$0A which are CR (carriage return) and
LF (line feed). The accepted commands are:
WnnZnnYnnXnn
The nn values are 00-FF and correspond in order to the data displayed on the
following graph lines: W, Z, Y, X.
AnnBnnCnnDnn
The nn values are 00-FF and correspond in order to the data displayed on the
following bar graphs lines: A, B, C, D.
DEMO9S08MP16 User Manual
19
6.4.2.2
Word Formatted Data
There are three commands which may be accepted. All commands must end
in the special characters #$0D and #$0A which are CR (carriage return) and
LF (line feed). The accepted commands are:
nnnn,nnnn,nnnn,nnnn
The nnnn values are 0000-FFFF and correspond in order to the data
displayed on both the graph and bar graphs as follows: X/A, Y/B, Z/C, W/D.
nnnn:nnnn:nnnn:nnnn
The nnnn values are 0000-FFFF and correspond in order to the data
displayed the graphing component as follows: X, Y, Z, W.
nnnn=nnnn=nnnn=nnnn
The nnnn values are 0000-FFFF and correspond in order to the data
displayed on the bar graph component as follows: A, B, C, D.
7
7.1
7.1.1
JUMPER SETTINGS
System Power
J3 - Power Source Selection
The MP16 processor may obtain its power from the on-board regulator, USB
port, or through APMOTOR_PORT J2. The on-board regulator obtains its
input from a 2.1mm barrel connector and can regulate the output to 5V. The
power switch K1 selects 5V from the on-board regulator or USB port. The J3
header further selects 5V from the power switch or from the APMOTOR
connector. A jump wire may be used to connect TP1 and Pin 1 of the J3
header if the user wants to provide 5V to the APMOTOR connector.
Selects 5V to supply microcontroller VDD. This is the default setting.
Figure 7-1: VDD_SELECT Option Header (J3)
20
DEMO9S08MP16 User Manual
7.2
Virtual Serial Port
The DEMO9S08MP16 board has a built-in virtual serial port which may be
connected to the MP16 processor’s SCI RXD/TXD. This allows certain PC
applications to be able to connect in a serial fashion to the microcontroller
without the actual use of serial port hardware. It can be enabled or disabled
by installing or removing the jumpers of J4 and J5.
Figure 7-2: Virtual Serial Port Header (J4 and J5)
7.3
LED Display Port
The DEMO9S08MP16 has 6 LEDs connected to signals PTC0 to PTC5 via
logic invertors 74AC04. They can be enabled or disabled by installing or
removing the corresponding jumper, J16, in the LED_ENABLE header.
7.3.1
J6 - Enable Port for LED Display (driven by Logic Invertor 74AC04)
Enables all LED outputs. This is the default setting.
Figure 7-3: LED Display Enable Header LED_ENABLE (J6)
7.3.2
User LED Display Enable Port LED_EN
The DEMO9S08MP16 has implemented 4 user LEDs that connect to signals
PTA4 to PTA7. they are enabled by header J13.
DEMO9S08MP16 User Manual
21
7.4
External Crystal Circuitry
The DEMO9S08MP16 design has incorporated an external crystal circuitry,
but its components are not populaTED. The user may populate the
components and use the jumpers in header J7 to connect the crystal circuitry
to the processor.
7.5
Input and Reset Switches
The DEMO9S08MP16 has 4 switches that are connected to signals PTD4,
PTD5, PTD6, and PTD7 respectively, and are enabled or disabled by the 4
corresponding jumpers KEY_ENABLE (J12).
The DEMO9S08MP16 has an option to connect two signals, PTA2 and PTA3,
to the Embedded Multilink for signal processing. The two signals are
connected or disconnected to IN0 or IN1 correspondingly via jumper P&E
INPUT_EN (J9).
The DEMO9S08MP16 has one Reset switch and one Reset LED associated
with it. These are enabled or disabled by the two corresponding jumper
RESET_EN (J23).
7.5.1
J9 - P&E’s Logic Analyzer Inputs IN0/IN1
The logic analyzer inputs are marked on one side of the J9 jumper. The inputs
allow P&E’s PC-based logic analyzer application to display these signals in
real-time.
By installing both jumpers, the logic analyzer pins IN0 and IN1 will be
connected to PTA2 and PTA3 respectively.
By removing these jumpers IN0 and IN1 will be unconnected. The
user may connect these signals, via wires, to any other signals on the
processor which they wish to view on the PC.
Figure 7-4: Jumper Settings for Input Signals to P&E’s Embedded Multilink, P&E
22
DEMO9S08MP16 User Manual
INPUT_EN (J9)
7.5.2
J12 - Light Touch Switch Enable Jumper KEY_ENABLE
Enables the corresponding switch. Each jumper may be individually
installed or removed. By default, all jumpers are installed to enable all
the switches.
Figure 7-5: Jumper Settings for Light Touch Switches KEY_ENABLE (J12)
7.5.3
J11 - I/O Signal Slide Switch Voltage Level Setting
The DEMO9S08MP16 has connected an I/O signal (PTE0) to a slide switch
(K2). Jumper J11 is used to select a voltage level of 5V or GND for the switch.
when slide switch K2 is turned on, PTE) will be connected to the voltage level
set by jumper J11. When the slide switch K2 is turned off, PTE0 is not
connected and is floating.
Figure 7-6: I/O Signal Slide Switch Voltage Level Setting (J11)
7.5.4
J23 - Reset Switch Enable and Reset LED Display Enable Jumper
RESET_EN
Enables the Reset Switch and the Reset LED Display. Each jumper
may be individually installed or removed. This is the default setting.
Figure 7-7: Reset Switch and Reset LED enable Jumper (J23)
DEMO9S08MP16 User Manual
23
7.6
Buzzer
The DEMO9S08MP16 integrates a Piezo Transducer whose resonant
frequency is 4.0 KHz. Jumper J8 connects to PTA2 to control this buzzer.
7.6.1
J8 - Buzzer enable jumper BUZ_EN
Enables Buzzer to be controlled by PTA2. This is the default setting.
Figure 7-8: Buzzer Enable Jumper Settings BUZ_EN (J8)
7.7
IIC Pull-up
The DEMO9S08MP16 provides external pull-up resistors for SCL and SDA
lines, enabled by installing the corresponding jumpers on J10. By default both
jumpers are installed.
7.7.1
J10 - IIC Pullup Enable Jumpers IIC_EN
Enables IIC external pullup. This is the default setting.
Figure 7-9: IIC External Pullup Enable IIC_EN (J10)
7.8
Analog Input Potentiometer
The DEMO9S08MP16 provides an easy access 5KOhm multi-turn
potentiometer whose output may be connected to PTE4, enabled by J22,
POT_EN.
24
DEMO9S08MP16 User Manual
7.8.1
J22 - Potentiometer Output Selection Jumpers POT_EN
Selects the potentiometer output connection. By default they are both
connected.
Figure 7-10: Potentiometer Output Selection Jumpers POT_EN (J22)
7.9
Optional Jumpers For Various VDD And VSS
The DEMO9S08MP16 provides 5 jumpers, J14 through J17, for different VDD
and VSS connections on the bottom of the board. By defualt, they are all
shorted with jumpers except J17, which is not populated and directly shorted
by a zero Ohm resistor.
8
DEMO9S08MP16 CODE DEVELOPMENT SOFTWARE
The DEMO9S08MP16 includes P&E’s Embedded Multilink circuitry, so no
external hardware BDM tool is needed to debug and program the
DEMO9S08MP16. A user only needs to connect the DEMO9S08MP16 to
their PC to start developing code for it.
The DEMO9S08MP16 package comes with a special edition of Freescale’s
CodeWarrior studio. In addition, P&E’s evaluation software for HCS08 and
ColdFire® V1 is available in the DEMO9S08MP16 Resources section of the
Getting Started DVD, or online at www.pemicro.com. A user may use either
CodeWarrior or P&E software tools to develop code for the DEMO9S08MP16.
8.1
Using CodeWarrior With The DEMO9S08MP16
The CodeWarrior studio supports Freescale’s HCS08 and ColdFire V1
devices. It offers C, C++, and assembly-level support, and provides
debugging capabilities based on P&E’s debug and programming
technologies.
A programming or debug session with the project-based CodeWarrior IDE
DEMO9S08MP16 User Manual
25
may be launched by double-clicking on the project name (the format is
projectname.mcp) from your file storage. Its tutorials, FAQs, and quick start
guides are easy to follow and will allow you use pre-built templates to begin
creating a new project in a short time. Codewarrior tutorials can be followed
based on the instructions provided.
8.2
Using P&E Software With The DEMO9S08MP16
P&E offers software tools for Freescale’s HCS08 and ColdFire V1 devices
that can be used to develop code for the DEMO9S08MP16 board.
8.2.1
P&E Software Tools for HCS08 Microcontrollers
For Freescale’s HCS08 devices, P&E offers an integrated development
environment, which combines a command-line assembler, in-circuit debugger,
and flash memory programmer. The assembler includes features such as a
full string replacement macro, conditional assembly, include files, and more.
The debugger supports both assembly and C source-level debugging. The
programmer can program/reprogram both internal and external flash devices
in-circuit.
8.2.2
P&E’s Software Tools for ColdFire® V1 Microcontrollers
P&E offers an integrated development environment for Freescale’s ColdFire
V1 devices, which combines a GNU C compiler, in-circuit debugger, and flash
memory programmer. The debugger supports both assembly and C sourcelevel debugging. The programmer can program/reprogram both internal and
external flash devices in-circuit.
9
TRANSITIONING TO YOUR OWN TARGET
Once you have finished working with the DEMO9S08MP16 and are ready to
build your own target, you will need a hardware tool to allow you to develop
using your own board. P&E’s USB Multilink and P&E’s Cyclone PRO offer two
effective solutions, depending on your needs. Both work with Freescale’s
CodeWarrior as well as P&E software, and both provide a seamless transition
to working with your own hardware.
The USB Multilink is a development tool that is functionally comparable to the
Embedded Multilink circuitry on the DEMO9S08MP16. It will enable you to
debug your code and program it onto your target. The Cyclone PRO is a more
26
DEMO9S08MP16 User Manual
versatile and robust development tool with advanced features and production
capabilities.
More information is available below to assist you in choosing the appropriate
development tool for your needs.
9.1
Hardware Solutions At A Glance
The USB Multilink offers an affordable and compact solution for your
development needs, and allows debugging and programming to be
accomplished simply and efficiently. Those doing rapid development will find
the USB Multilink easy to use and fully capable of fast-paced debugging and
programming.
The Cyclone PRO is a more complete solution designed for both development
and production. The Cyclone PRO features automated power switching,
multiple communications interfaces (including USB, Ethernet, and Serial),
stand-alone programming functionality, and many other advanced
capabilities.
Below is an overview of the features and intended use of the USB Multilink
and Cyclone PRO.
9.1.1
9.1.2
USB Multilink Key Features
•
Direct user control of target’s execution
•
Programming and debugging capabilities
•
Read/write registers and memory values
•
Compact and lightweight
•
Communication via USB 2.0
•
Supported by P&E software and Freescale’s CodeWarrior
Cyclone PRO Key Features
Advanced programming and debugging capabilities, including:
•
•
PC-Controlled and User-Controlled Stand-Alone Operation
•
Interactive Programming via Host PC
•
In-Circuit Debugging, Programming, and Testing
Compatible with Freescale’s ColdFireV1, HCS08, RS08, and
DEMO9S08MP16 User Manual
27
HC(S)12(X) microcontroller families
9.2
•
Communication via USB, Serial, and Ethernet Ports
•
Multiple image storage
•
LCD screen menu interface
•
Supported by P&E software and Freescale’s CodeWarrior
Working With P&E’s USB Multilink
Figure 9-1: P&E’s USB Multilink (USB-ML-12 shown)
9.2.1
Product Features & Implementation
P&E’s USB Multilink Interface (USB-ML-12) connects your target to your PC
and allows the PC access to the Background Debug Mode (BDM) on
Freescale’s ColdFireV1, HCS08, RS08, and HC(S)12(X) microcontrollers. It
connects between a USB port on a Windows 2000/XP/2003/Vista machine
and a standard 6-pin debug connector on the target.
By using the USB Multilink Interface, the user can take advantage of the
background debug mode to halt normal processor execution and use a PC to
control the processor. The user can then directly control the target’s
execution, read/write registers and memory values, debug code on the
processor, and program internal or external FLASH memory devices.The
USB Multilink enables you to debug, program, and test your code on your
board.
9.2.2
Software
The USB Multilink Interface works with Codewarrior as well as P&E’s in-circuit
debugger and flash programmer to allow debug and flash programming of the
target processor. P&E’s USB Multilink Development Packages come with the
28
DEMO9S08MP16 User Manual
USB Multilink Interface, as well as flash programming software, in-circuit
debugging software, Windows IDE, and register file editor.
9.3
Working With P&E’s Cyclone PRO
Figure 9-2: P&E’s Cyclone PRO
9.3.1
Product Features & Implementation
P&E’s Cyclone PRO is an extremely flexible tool designed for debugging,
testing, and in-circuit flash programming of Freescale’s ColdFireV1, HC08,
HCS08, RS08, and HC(S)12(X) microcontrollers. The Cyclone PRO connects
your target to the PC via USB, Ethernet, or Serial Port and enables you to
debug your code, program, and test it on your board. After development is
complete the Cyclone PRO can be used as a production tool on your
manufacturing floor.
For production, the Cyclone PRO may be operated interactively via Windowsbased programming applications as well as under batch or .dll commands
from a PC. Once loaded with data by a PC it can be disconnected and
operated manually in a stand-alone mode via the LCD menu and control
buttons. The Cyclone PRO has over 3Mbytes of non-volatile memory, which
allows the on-board storage of multiple programming images. When
connected to a PC for programming or loading it can communicate via the
ethernet, USB, or serial interfaces.
9.3.2
Software
The Cyclone PRO comes with intuitive configuration software and interactive
programming software, as well as easy to use automated control software.
The Cyclone PRO also functions as a full-featured debug interface, and is
supported by Freescale’s CodeWarrior as well as development software from
DEMO9S08MP16 User Manual
29
P&E.
P&E’s Cyclone PRO is also available bundled with additional software as part
of various Development Packages. In addition to the Cyclone PRO, these
Development Packages include in-circuit debugging software, flash
programming software, a Windows IDE, and register file editor.
10
10.1
TROUBLESHOOTING
DEMO9S08MP16 Is Undetected
Q: The connection assistant indicates that my DEMO9S08MP16 is
undetected even though I have connected the hardware to my USB port.
What should I do?
A: The connection assistant, which displays in either Codewarrior or P&E’s
development software, is a dialog which allows the user to connect to the
DEMO9S08MP16 hardware. If this dialog indicates that the DEMO9S08MP16
hardware is not connected to the PC, the first step is to make sure that the
DEMO9S08MP16 hardware is connected to the PC via a USB 2.0 high-speed
cable. If it is connected, unplug and then plug in the USB cable on the
DEMO9S08MP16 board and click refresh in the connection assistant. If the
hardware still does not show up, try the following remedies:
(A) Re-Enable the USB driver
If you connected the DEMO9S08MP16 interface prior to the installation of
P&E’s Embedded Multilink drivers, Windows will not have been able to find
the appropriate driver and may have disabled the device. The
DEMO9S08MP16 board shows up in Window’s device manager as a “P&E
Multilink,” since it contains P&E’s Embedded Multilink circuitry. If you unplug
and then plug in the device, Windows will automatically disable it even if you
have installed the drivers. To force windows to try to load the driver again,
perform the following steps while the DEMO9S08MP16 interface is connected
to the computer:
1. Open the Control Panel (Start Button->Settings->Control Panel)
2. Double Click the "System" Icon
3. Select the "Hardware" tab
4. Click the "Device Manager" Button
30
DEMO9S08MP16 User Manual
5. The "P&E Multilink" device will be shown with an exclamation mark
next to it. Double-click this device.
6. Click the "Reinstall Driver…" button and follow the dialog instructions
to have Windows automatically install the driver.
(B) Re-Install the USB driver
If the Multilink device does not show up in the device manager, use the driver
installation utility located in the DEMO9S08MP16 Resources on the DVDROM. After driver installation, unplug the DEMO9S08MP16 from the PC and
reboot the PC. When the reboot has completed, connect the interface to the
PC with the USB 2.0 cable. Run the software again to see if the interface is
now detected.
If you have an error attempting to install the drivers, please view the
installation troubleshooting FAQ on P&E’s website at:
http://www.pemicro.com/faqs/faq_view.cfm?id=89.
(C) Test for installation of the USB driver files
To test the driver installation, use the driver test utility in the DEMO9S08MP16
Resources of the DVD-ROM to make sure all files were properly installed.
This may give some indication of what the problem is.
(D) Using a USB Hub
The DEMO9S08MP16 is a high-power USB device. If a USB Hub is used, it
must be a self-powered hub (i.e., with its own power supply). If the Hub is not
self-powered the DEMO9S08MP16 will not work. In general, USB ports
located directly on the PC are high-power (self-powered) ports.
10.2
CodeWarrior Installation Fails (WinDriver Error)
Q: When I try to install the Codewarrior or P&E software, installation fails with
this message: “There are currently 2 open applications using WinDriver.
Please close all applications and press Retry. To reload WinDriver, press
Cancel and reboot.” How do I solve this?
A: Some software applications on your PC are connected to the WinDriver
system driver which manages P&E's USB connections. This system driver
needs to be disabled for the installation to continue. Directions to disable
Windriver are as follows:
In Windows Explorer, right-click on My Computer and select Properties from
the drop-down menu.
DEMO9S08MP16 User Manual
31
1. Select the Hardware tab.
2. Click on the Device Manager button.
3. Select the "System Devices" in the Device Manager window.
4. Expand the tree index (+) for System Devices.
5. At the bottom of the System Devices list you should see the WinDriver item.
6. Right-click on WinDriver and select Disable from the drop-down
menu.
7. Click Yes/OK when the confirmation dialog appears.
WinDriver is now disabled and you should be able to complete the installation.
After the installation finishes, you should re-enable the WinDriver system
driver using the following steps:
In Windows Explorer, right-click on My Computer and select Properties from
the drop-down menu.
1. Select the Hardware tab.
2. Click on the Device Manager button.
3. Select the "System Devices" in the Device Manager window.
4. Expand the tree index (+) for System Devices.
5. At the bottom of the System Devices list, you should see a WinDriver
item.
6. Right-click on WinDriver and select Enable from the drop-down
menu.
Reboot your PC after the installation finishes.
If you are unable to disable the WinDriver system driver in the above fashion,
you can delete the file c:\windows\system32\windrvr6.sys and then reboot
your machine. You should then re-run the installer and complete the
procedure. Reboot your machine after the installation has finished.
32
DEMO9S08MP16 User Manual
Similar pages