The USB08 Project Page

USB plug

Motorola MC68HC908JB8
USB Reference Design

About USB08

The USB08 Project demonstrates, how data can be transferred between a Microcontroller and a Windows-PC over the Universal Serial Bus (USB).

Because USB08 serves as a Reference Design, it shows in detail, how to use the USB interface of the Motorola HC08 Mikrocontroller MC68HC908JB8.

Though the primary target audience of the USB08 Reference Design are Developers of Mikrocontroller Firmware and Hardware, Windows Driver and Application Software issues are also covered by the USB08 Project.

The USB08 Reference Design was created by Elektronikladen | ELMICRO (see below) for Motorola Semiconductor (now: Freescale Semiconductor).

What is USB?

USB (Universal Serial Bus) is a standardized bus interface to connect peripheral devices to a Host Computer. Since the build-in USB support of Win98/Win2k, USB has become available on nearly every new (Windows-based) PC.

The USB specification is an industry standard maintained by USB.org, which exactly defines this bus system beginning with the electrical interface up to the higher protocol layers to guarantee the inter-operability of all the different devices. A simple way of handling is the most important requirement for USB devices from the view of the user.

Several versions of the USB specification exist. The USB08 Reference Design is based on the already established USB Specification Revision 1.1 (local copy).

What is an HC908JB8?

The HC908JB8 (more precisly: MC68HC908JB8ADW) is the Microcontroller used for the USB08 Deference Design. It is a low-cost 8-Bit Mikrocontroller from Motorola. It belongs to the HC08 family, one of the most popular microcontroller families used worldwide. Despite the integrated USB interface, the 'JB8 has 8KByte internal Flash Memory, which is in-system programmable and erasable.

More information about the HC908JB8 can be found on the Motorola Microcontroller Website. Check out the CPU08 Reference Manual, the MC68HC908JB8 Technical Data Book (local copies).

What will I need to transfer data over the USB?

On the Device side:
  • Microcontroller with USB-Interface (SIE - Serial Interface Engine) like the HC908JB8
  • Surrounding Hardware (Input/Output, Power Supply etc.)
  • USB cable
  • Firmware to receive and transmit data over the SIE
  • unique Vendor- and Product-ID (VID/PID), assigned by the USB organization to identify the Device on the bus
On the Host side:
  • USB (Root-)Hub (the hardware needed to connect some USB stuff)
  • Win98/ME/2000 Operating System with USB support
  • Windows Device Driver, which is specific to the Device connected
  • Application Program (providing the User Interface)
Apart from the PC and Windows-OS, all of the above is included in the USB08 Reference Design!

The USB08 Evaluation Board

Features of the USB08 Evaluation Board include:
  • M68HC908JB8 MCU packaged in a 28-pin SO package (SOIC)
  • Three light-emitting diodes (LED)
  • Three push button switches
  • Three analog sensors:
    • Light
    • Temperature
    • Angle (potentiometer)
  • Power supply alternatively from USB or via on-board voltage regulator
  • Monitor mode interface for in-system programming and debugging
  • Additional RS232 interface for connection to PC or a serial LCD
  • Push buttons for reset and IRQ
  • Jumper for power-on reset (POR)
  • All MCU pins are accessible via a 26-pin universal expansion connector
  • Small user breadboard area reserved for customer circuit extensions
USB08 Eval Board
USB08 Evaluation Board

Check out the Schematic Diagram of the USB08 Eval Board. A bill of materials as well as the circuit description are included in the USB08 Designer Reference Manual.

The Microcontroller Firmware

The Firmware within the USB08 Reference Design consists of several source code modules which are embedded into a common compiler project.

Two ways of communication are implemented in the demonstration: RS232 and USB. Therefore, a developer experienced with RS232 communication will be able to migrate to USB easily.

The USB firmware resides in the Flash Memory of the HC08 microcontroller. The source codes of the original version 1.00 for Cosmic HC08 Compiler are reproduced in the USB08 Designer Reference Manual. A description of all source modules is also included in this document.

Here you can download the most recent version of the USB08 firmware files:

Note: The source files for both (Cosmic and Imagecraft) Compilers are the same - just some additional helper files (e.g. C-Startup Module, Linker File) are Compiler specific.

The following Codewarrior port was provided by Isabelle Giraud, Metrowerks Europe:

Brad Stewart of Freescale Semiconductor has sent in a version which adds some SPI-related code and an updated framework ("stationary") which is intended to work with newer versions of Codewarrior's debugger as well: Please note: the maintainer of this site is not able to answer any questions about the Codewarrior port, please contact a Metrowerks representative in case of any compiler specific issues.

The Windows Demo Application

Windows Demo App
Windows Demo Application

The Windows Demo Application shows, how to create a Windows user interface for the USB08 Device with just a few lines of C++ code.

The Demo was written using Inprise/Borland C++-Builder (BCB) V5. Both source as well as precompiled executable files are available. The Demo Application is running under Windows 98/ME and 2000.

Modification for other RAD tools should be quite simple, since most of the work on the host side is done by the Device Driver (see below). From the view of an application, communication with an USB08 Device is just simple file-I/O!

Download USB08 Windows Demo Application (Source Code and Executable files)

A note on BCB V6:

It was reported, that the demo app will not run if compiled with V6 and compiler default settings. You can get the project running by going to the BCB6 Menu Project/Options/Advanced_Compiler and changing the the Data Alignment from Quad Word to Byte. The program should compile and work fine now. Borland have obviously changed the data alignment mechanism in BCB6 which makes a Win32 API funcion call within the USB driver software fail (although exactly used as recommended by Microsoft). This might be a bug in BCB6 which might be corrected in a later version / update.

The Windows Device Driver

You can tunnel your USB data through several software layers of the HID (Human Interface Device Class) mechanism, which is already build into Windows, or you may use a specialized device driver, which implements a direct communications channel. USB08 does the latter, and as a result, it simplifies requirements both on the firmware side as well as on the host PC side.

The Device driver for the USB08 project comes from Thesycon, a company specialized in high speed driver technology. Thesycon offers a universal high performance USB Device Driver called USBIO. The driver software for the USB08 project was derived from the original USBIO package. This special Light_EL version of USBIO supports all features of the USB interface of the HC908JB8 MCU. So, from the USB08 view, USBIO Light_EL sets no limits!

New Driver Version:
The newly released V1.51 driver package by Thesycon provides COM support (Visual Basic/Delphi) and can be used under WinXP. You may download USBIO Light_EL V1.51 and a new Visual Basic Demo Application. Please note, that this new version is not a part of the original Reference Design package.

The USBIO Light_EL Device Driver is available at no additional cost for users of the USB08 Evaluation Board. If you have any question about the license terms for USBIO Light_EL, please read this license file (PDF, 8KB).  

Where can I get the latest version of the USB08 Designer Reference Manual?

The USB08 Designer Reference Manual is an official Freescale/Motorola Document. The booklet can be ordered directly from Motorola. The product order number is DRM002/D. The RD68HC908USB Product Summary Page contains additional information about this Reference Design.

To speed up your research, you may wish to access this local copy of the DRM002 Manual (PDF,1882KB).

Where to buy the USB08 Evaluation Board?

The USB08 Designer Reference Manual (see above) contains all the information that is necessary to create your own HC908JB8 based USB Design from scratch.

However, if you want to minimize your design effort, you can purchase a prefabricated USB08 Evaluation Board. The board is equipped with a plug-and-play demo application (in the Flash of the MCU) and accompanied by cables and a CD-ROM with all the software for the Reference Design.

You can order the USB08 Evaluation Board from Elektronikladen | ELMICRO (see list of sales offices in Europe, USA, Australia, Korea). The price for the package is in the $150 range.

What's the meaning of VID/PID and why is that important?

Two identifiers are used to mark a USB device and make it possible for the host to assign a suitable driver: The vendor ID and the product ID. Both IDs are registered in the device descriptor of the USB equipment.

  1. The vendor ID (VID) marks the manufacturer. Normally, vendor IDs are assigned by the USB Implementers Forum. The requestor is charged for this registration.
  2. The product ID is (just like the VID) a 16-bit number. The PID marks a certain product. The allocation is done by the manufacturer of the device. Unlike the VID, for the PID there are no administrative restrictions from the USB Implementers Forum.

The USB08 reference design uses the vendor ID 0x0C70 which is registered under the name of "MCT Elektronikladen". The product ID for the demo application is 0x0000.

To avoid collisions and complications, every type of device is requested to have a unique vendor ID and/or product ID. Devices which have fantasy IDs cannot be used as that would lead to the immediate collapse of the compatibility of different devices at the USB.

Registered users of the USB08 evaluation board can receive their own PID out of the PID pool of the VID 0x0C70, which is exclusively allocated to the user. With these unique VID/PID combinations, the user can develop and sell USB equipment without having to request his own vendor ID beforehand.

Please [mailto:usb:at:elmicro:dot:com] providing a sales reference (date/location of purchase) in order to obtain a unique USB08 PID free of charge.

Where can I get an ANSI-C Compiler for the HC08?

The following companies offer ANSI-C Compilers for the HC08:

Where can I get download tools and/or debuggers for the HC08?

The following companies offer such tools:
  • NoICE is an easy-to-use source level debugger which also supports downloading S19 files via HC08 Monitor Mode
  • The ICS08 Development Kits from Motorola contain tools provided and maintained by P&E Micro
  • Cosmic Software offers HC08 versions of the ZAP debugger
  • The Metrowerks toolchain includes debugging features as well

USB08 in the press

  • Tom Cantrell wrote an online article for Circuit Cellar
  • Vincent Le Mieux published an article in French magazine Electronique Pratique
  • Gerald Kupris summerized the project in an article for Micro Control Journal
  • USB08 was featured in an article of EDN Asia
  • German c't magazine printed an article by Herbert Schmid, covering USB08: "Universal-Anschluss - Steuern und Messen am USB" (c't 17/02, page 176f.)
  • USB08 was honoured being part of The hot 100 products of 2003 by EDN magazine!

About the Authors, Credits

  • Project management, USB08 Evaluation Board and HC08 Firmware were made by Oliver Thamm, Elektronikladen | ELMICRO
  • The IO08 Windows Demo Application was implemented by Andreas Dannenberg, mailto: dannenbergelmicro.com

Special thanks to:

  • Dr. Günter Hildebrandt from Thesycon for providing the USBIO Light_EL Device Driver
  • Andreas Wertenauer from Cosmic Software for the Compiler support
  • Dr. Gerald Kupris from Freescale (ex Motorola) and a lot of nice guys there who helped a lot to make USB08 happen!

Please send suggestions and inquiries concerning this page to othc08web.de
The original URL of this page is http://hc08web.de/usb08/

Webspace courtesy of Elektronikladen | ELMICRO
Changed: 2005-10-31