USB HCS08/HCS12 Multilink Rev A Technical Summary

USB HCS08/HCS12 Multilink Rev A Technical Summary
P&E Microcomputer Systems, Inc.
P.O. Box 2044, Woburn, MA 01888, USA
TEL: (617) 353-9206
FAX: (617) 353-9205
http://www.pemicro.com
USB HCS08/HCS12 Multilink Rev A
Technical Summary
Document # PE3305, Version 1.1
1.
2.
3.
4.
5.
6.
7.
8.
9.
Introduction
Usage of the HCS08/HCS12 Multilink Interface
Driver Installation on Windows XP/2000
Computers running Windows 95, 98, ME, and NT
Using a USB Hub
Connecting to the target
Startup Reset Sequence
Interface Libraries
Firmware Updates
1.0 Introduction
P&E’s USB HCS08/HCS12 MULTILINK Interface provides access to the Background Debug Mode (BDM)
on Motorola HCS08, HC12 and HCS12 microcontrollers. It is the hardware interface between a USB port
on a Windows 2000 or XP machine and the standard 6 pin “Berg” debug connector on the target. By using
the USB HCS08/HCS12 MULTILINK, 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 pinouts of the connector as specified by Motorola are:
BKGD 1
• •
2 GND
NC 3
• •
4 RESET
NC 5
• •
6 VDD
2.0 Usage of the USB HCS08/HCS12 Multilink Interface
The USB HCS08/HCS12 MULTILINK can communicate with an HCS08, HC12, or HCS12 processor
whose bus frequency is between 32 KHz and 35 MHz. P&E’s software packages will automatically detect
the proper communications rate to establish a connection with the target. For HC12/HCS12 devices, the
BDM communications speed may be set (instead of being auto-detected) by setting the value of the
IO_DELAY_CNT variable. The proper IO_DELAY_CNT may be calculated by the equation:
IO_DELAY_CNT = (100000000 / Fbus) – 1
Fbus is the bus frequency in hertz. The HCS08 frequency is always detected automatically.
The Multilink interface will work with targets whose processor power supply is in the range of 1.6V to
5.25V. The Multilink interface derives it’s power from the USB port and as such draws less than 1mA from
the target.
The USB HCS08/HCS12 Multilink has a female type B USB connector. Use a Type A to Type B USB
extension cable to connect the interface to the PC.
The USB HCS08/HCS12 Multilink is a high power USB device. If a USB HUB is used, it must be a self
powered hub (i.e. with a power supply). By default, the USB protocol used is 1.1.
There are two LEDs which protrude through the housing of the USB HCS08/HCS12 Multilink interface.
The Blue LED indicates that the Multilink interface is powered and running. The Yellow LED indicates
that target power has been detected.
The 6-pin ribbon cable, which allows connection to the target debug connector, is fixed within the Multilink
housing. The pin 1 is denoted by the red stripe running down the ribbon cable. The proper orientation of
this ribbon cable is shown in the following picture.
3.0 Driver Installation on Windows XP/2000
Before connecting the USB HCS08/HCS12 Multilink to the PC, the appropriate drivers need to be installed
on the PC. The drivers are automatically installed when installing any of P&E’s HCS08/HC12/HCS12
development packages built after July 1, 2003. A copy of the driver installation program may also be
downloaded from the “downloads” section of P&E’s “Support Center” located at http://www.pemicro.com.
P&E installs the following USB drivers/files on your system:
PEUSBFTDUN.EXE
PEUSBV1.DLL
PEUSBV1.SYS
PEMICRO_USBCABLE_AUTO.INF
--->
--->
--->
--->
[Windows\System]
[Windows\System]
[Windows\System]\Drivers
[Windows]\inf
Note: In general [Windows\System] = \WINNT\SYSTEM32 for XP,2000
When the USB HCS08/HCS12 Multilink is detected, the operating system will automatically scan all the
.INF files in the [Windows]\inf directory to try and find a match for the detected hardware. The operating
system should then indicate that it has found a driver for the attached “P&E USB Device”. Follow the
instructions in the “Found New Hardware Wizard” dialog for having windows automatically install the
driver.
If you connected the Multilink interface prior to installing the drivers, Windows will not have been able to
find the appropriate driver and may have disabled the device. If you unplug and re-plug in the device,
Windows will automatically disable it even if you have installed the drivers. To force windows to try and
load the driver again, perform the following steps while the USB HCS08/HCS12 Multilink interface is
plugged into the computer:
1.)
2.)
3.)
4.)
5.)
Open the Control Panel (Start Button->Settings->Control Panel)
Double Click the “System” Icon
Select the “Hardware” tab
Click the “Device Manager” Button
The “P&E HCS08/HCS12 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 for having windows
automatically install the driver.
If you have purchased one of P&E’s software development packages prior to July 1, 2003, contact P&E to
obtain the latest version which supports the USB HCS08/HCS12 Multilink interface (support for the cable
is separate from the Windows USB drivers). If you are using third party software, make sure you have a
version which supports the USB HCS08/HCS12 Multilink interface.
4.0 Computers running Windows 95, 98, ME, and NT
The USB HCS08/HCS12 Multilink is not supported under Windows 95, Windows 98, Windows Millenium
Edition (ME), and Windows NT. For these operating systems, P&E produces the BDM Multilink which
connects the parallel port on the PC to the 6-pin debug connector on the target. For more information, visit
http://www.pemicro.com.
5.0 Using a USB Hub
The USB HCS08/HCS12 Multilink is classified as a high power USB device which is powered from the USB
bus. A high power device requires that if a USB hub is used, it must be a self powered hub. This means that
it has a separate power supply from which it derivers it’s operating power (as opposed to deriving it’s
power from the PC). It must be able to supply 500mA per port (a high power USB device may derive up to
500mA from the port). P&E has made a powered hub available as an accessory which has been tested with
the USB HCS08/HCS12 Multilink. Details may be found at http://www.pemicro.com.
6.0 Connecting to the target
The following is the proper connection sequence to connect the PC to the target system via the USB
HCS08/HCS12 Multilink interface:
1) Make sure the target power is OFF and the USB HCS08/HCS12 Multilink is not connected to either
the target or the PC
2) Connect the Multilink to the target via it’s ribbon cable. Make sure that the ribbon cable is plugged
into the target with the proper orientation. The pin 1 is denoted by the red stripe running down the
ribbon cable.
3) Connect the Multilink to the PC via a USB extension cable. The Blue LED on the Multilink should
become lit.
4) Turn the target power on. The Yellow LED on the Multilink should become lit.
Before disconnecting the setup, turn the target power off.
7.0 Startup Reset Sequence
In order to use the Background Debug Mode of the microcontroller, it is initialized into debug mode via a
reset sequence. This is accomplished by P&E’s software via the following reset sequence:
RST
5msec
BKGD
a)
b)
c)
d)
10msec
20msec
Initially the BKGD (pin-1) and Reset (pin-4) are pulled low.
After 5 milliseconds, the RESET (pin-4) goes high.
After 10 milliseconds, the BKGD (pin-1) goes high.
Wait for 20milli second followed by activities on BKGD (pin-1).
8.0 Interface Libraries
One of the products P&E produces is a set of interface libraries which allows the user to directly control the
USB HCS08/HCS12 Multilink from any Windows Development environment which can interact with a
DLL. The interface libraries come with examples for controlling the Multilink interface from Microsoft
Visual C as well as Borland Delphi. Details of the libraries for the HCS08 may be found at
http://www.pemicro.com/products/68hcs08.html. Details of the libraries for the HCS12 and HC12 may be
found at http://www.pemicro.com/products/68hc12.html.
9.0 Firmware Updates
The latest version of the firmware for the Multilink interface is included in the P&E software development
kits. When the debugger or programmer is run, if it detects that the Multilink interface firmware needs to
be updated, it will ask the user’s permission to do this. If given, the update happens automatically.
Alternately, the latest version of the firmware may be downloaded from the “Firmware Updates” section of
the “Support Center” located at http://www.pemicro.com. This firmware includes a utility which may be
used to run the firmware update.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising