Sys Tec Electronic USB-CANmodul User guide

A Product of PHYTEC Technologie Holding AG
USB-CANmodul
Systems Manual
Edition March 2001

USB-CANmodul
2SYS TEC electronic GmbH 2001 L-487e_6
In this manual are descriptions for copyrighted products which are not explicitly
indicated as such. The absence of the trademark () and copyright () symbols
does not infer that a product is not protected. Additionally, registered patents and
trademarks are similarly not expressly indicated in this manual
The information in this document has been carefully checked and is believed to be
entirely reliable. However, SYS TEC electronic GmbH assumes no responsibility
for any inaccuracies. SYS TEC electronic GmbH neither gives any guarantee nor
accepts any liability whatsoever for consequential damages resulting from the use
of this manual or its associated product. SYS TEC Electronic GmbH reserves the
right to alter the information contained herein without prior notification and
accepts no responsibility for any damages which might result.
Additionally, SYS TEC electronic GmbH offers no guarantee nor accepts any
liability for damages arising from the improper usage or improper installation of
the hardware or software. SYS TEC electronic GmbH further reserves the right to
alter the layout and/or design of the hardware without prior notification and
accepts no liability for doing so.
Copyright 2001 SYS TEC electronic GmbH, D-07973 Greiz/Thueringen.
Rights - including those of translation, reprint, broadcast, photomechanical or
similar reproduction and storage or processing in computer systems, in whole or in
part - are reserved. No reproduction may occur without the express written consent
from SYS TEC electronic GmbH.
EUROPE NORTH AMERICA
Address: SYS TEC electronic GmbH
August-Bebel-Str. 29
D-07973 Greiz
GERMANY
PHYTEC America LLC
255 Ericksen Avenue NE
Bainbridge Island, WA 98110
USA
Ordering
Information: +49 (3661) 6279-0
info@systec-electronic.de 1 (800) 278-9913
Technical
Support: +49 (3661) 6279-0
support@systec-electronic.de 1 (800) 278-9913
Fax: +49 (3661) 63248 1 (206) 780-9135
Web Site: http://www.systec-electronic.de http://www.phytec.com
6nd English Edition March 2001

Contents
SYS TEC electronic GmbH 2001 L-487e_6
Table of Contents
Preface...........................................................................................................3
1 Introduction .........................................................................................5
2 Getting Started.....................................................................................9
2.1 Installation of the USB-CANmodul .............................................9
2.1.1 Software Installation........................................................9
2.1.2 Connecting the USB-CANmodul to the Host-PC .........10
2.1.3 Checking the Device Installation...................................11
2.1.4 Device Number Allocation............................................12
2.1.5 Connection to a CAN Network .....................................13
2.1.6 Starting PCANView (USBCAN) ..................................14
2.2 Status LEDs on the USB-CANmodul.........................................17
2.3 CAN Supply Voltage..................................................................17
3 Software Support...............................................................................21
3.1 Tools for the USB-CANmodul...................................................21
3.1.1 UCAN Config for Windows..........................................21
3.1.2 PCANView (USBCAN) for Windows..........................24
3.2 Dynamic Linked Library.............................................................29
3.2.1 The Attributes of the USBCAN32.DLL........................29
3.2.2 Functions of the USBCAN32.DLL...............................32
3.2.3 Error Codes of the Functions.........................................51
3.2.4 Baud Rate Configuration...............................................59
3.2.5 CAN Messages Filter Function .....................................60
3.2.6 Using the Callback Functions........................................63
Index............................................................................................................69

USB-CANmodul
2SYS TEC electronic GmbH 2001 L-487e_6
Index of Figures and Tables
Figure 1: Device Manager with the USB-CANmodul...............................11
Figure 2: USB Configuration Tool UCAN Config....................................12
Figure 3: Pin Layout of the DB-9 Connector.............................................13
Figure 4: Dialog Box with Hardware Configuration.................................14
Figure 5: Dialog Box Message Filter Configuration .................................15
Figure 6: PCANView (USBCAN) Main Window.....................................16
Figure 7: Location and Numbering of the Jumpers ...................................18
Figure 8: UCAN Config Utility.................................................................22
Figure 9: Dialog Box with Hardware Configuration.................................24
Figure 10: Dialog Box Message Filter Configuration .................................25
Figure 11: PCANView (USBCAN) with Messages....................................26
Figure 12: Software State Diagram..............................................................30
Table 1: States of the LEDs on the USB-CANmodul ..............................17
Table 2: Pinout of the DB-9 Connector....................................................17
Table 3: Configuration of the CAN Power Supply Jumpers....................19
Table 4: Software State Functions............................................................31

Preface
SYS TEC electronic GmbH 2001 L-487e_6 3
Preface
This USB-CANmodul Systems Manual describes the board's design
and function. Precise specifications for the on-board microcontrollers
can be found in the enclosed microcontroller Data Sheet/User's Man-
ual.
In this manual, and in the attached schematics, low active signals are
denoted by a "/" in front of the signal name (i.e.: /RD). A "0"
indicates a logic-zero or low-level signal, while a "1" represents a
logic-one or high-level signal.
Declaration of Electro Magnetic Conformity for the
PHYTEC USB-CANmodul
PHYTEC products are designed for installation in electrical
appliances or as dedicated Evaluation Boards (i.e.: for use as a test
and prototype platform for hardware/software development) in
laboratory environments.
Note:
PHYTEC products lacking protective enclosures are subject to dam-
age by Electro Static Discharge (ESD) and, hence, may only be
unpacked, handled or operated in environments in which sufficient
precautionary measures have been taken in respect to ESD dangers. It
is also necessary that only appropriately trained personnel (such as
electricians, technicians and engineers) handle and/or operate these
products. Moreover, PHYTEC products should not be operated
without protection circuitry if connections to the product's pin header
rows are longer than 3 m.

USB-CANmodul
4SYS TEC electronic GmbH 2001 L-487e_6
PHYTEC products fulfill the norms of the European Union’s
Directive for Electro Magnetic Conformity only in accordance to the
descriptions and rules of usage indicated in this hardware manual
(particularly in respect to the pin header row connectors, power
connector and serial interface to a host-PC).
Implementation of PHYTEC products into target devices, as well as
user modifications and extensions of PHYTEC products, is subject to
renewed establishment of conformity to, and certification of, Electro
Magnetic Directives. Only after doing so the devices are allowed to
be put into circulation.
PHYTEC's microcontroller modules allow engineers to shorten devel-
opment horizons, reduce design costs and speed project concepts from
design to market. Please contact PHYTEC for additional information:
EUROPE NORTH AMERICA
Address: SYS TEC electronic GmbH
August-Bebel-Str. 29
D-07973 Greiz
GERMANY
PHYTEC America LLC
255 Ericksen Avenue NE
Bainbridge Island, WA
98110
USA
Web Site: http://www.systec-electronic.de http://www.phytec.com/
e-mail: info@systec-electronic.de [email protected]
Voice: +(49) 3661-6279-0 1 (800) 278-9913
Fax: +(49) 3661-63248 1 (206) 780-9135

Introduction
SYS TEC electronic GmbH 2001 L-487e_6 5
1Introduction
Unveiled in 1995, the Universal Serial Bus (USB) connectivity
standard provides a simple and convenient way to connect various
peripheral devices to a host-PC. It will replace a wide variety of serial
and parallel connections. The USB standard allows up to 127 devices
to be connected to the PC without using multiple connector types,
without interrupt conflicts (IRQs), hardware address adjustments
(jumpers) or channel changes (DMA). USB provides powerful true
hot plug-and-play capability; i.e., dynamic attach and recognition for
new devices. It allows the user to work with those devices
immediately without restarting the operating system.
The USB-CANmodul takes advantage of this new communication
standard and provides an easy to use portal from a host-PC to a CAN
network. Connecting the USB-CANmodul to the host-PC is simple.
The included USB cable supports the two types of USB connectors,
type A and type B. The type A plug connects to the host computer or
an upstream hub. Type B plug connects downstream to the USB-
CANmodul. The USB interface enables data transfer with a rate of up
to 12 MBit/s. With a uniform connector for all device types, the
system is absolutely user friendly.
Once the USB-CANmodul is connected to the host-PC, the operating
system reads the configuration data and automatically loads the
device driver. All CAN messages are transferred transparently
through the USB Bus. CAN Baud Rates of up to 1 MBit/s are
supported. The transmitted and received CAN messages are buffered
by the USB-CANmodul. The device supports CAN messages
according to CAN 2.0A and 2.0B specifications (11- and 29-Bit
identifiers). Connection to the CAN bus meets the CiA Standard DS
102 (DB-9) and features optical isolation of the CAN signals.

USB-CANmodul
6SYS TEC electronic GmbH 2001 L-487e_6
The USB-CANmodul consists of a powerful microcontroller with
USB interface (Anchor Chips AN2131QC) and a CAN controller
(Philips SJA1000) which transmits and receives the CAN message.
Power for the USB-CANmodul is supplied through either the CAN
network or the USB bus. The module has two LEDs, one for status
display and one for power. Its small size (120x60x30mm) makes it
easily transportable.
Drivers for Windows 98 and 2000 are provided for the USB-
CANmodul. The USB configuration tool for Windows enables
connectivity and management of more than one device on the USB
bus. This USB network is configured using device numbers which
are assigned by the user and are stored in an EEPROM. The
functions for data exchange with the USB-CAN application are
available through a DLL (Dynamic Linked Library). The enclosed
demo program shows the easy handling of the DLL functions.
A host-PC with USB interface (Universal Serial Bus) is required.
You can find this USB interface on most newer IBM compatible PCs.
The operating systems MS-Windows 98 and 2000 support the USB
interface.
Contents of the Kit
•Completely tested device
•Systems Manual
•Software (Tools, Demos, Windows system software)
•USB cable (type A to type B; 1.5m)

Introduction
SYS TEC electronic GmbH 2001 L-487e_6 7
Technical Data:
!CAN interface:
-Meets CiA DS 102 Standard
-Optically isolated voltage supply
-2 jumpers for configuration of the CAN voltage supply (optically
isolated via CAN bus, or via USB bus)
-Connection to the CAN bus via DB-9 plug
-Supports CAN frame format according to specifications for CAN
2.0A and 2.0B (11- and 29- bit CAN identifier)
!USB interface:
-USB connector B in accordance to the USB standard
-Optional power supply through the USB bus (100mA in
operating mode)
-Transmission type: Bulk, 12MBit/s
!Power and Status LED
!Case size: 120 x 60 x 30 (L x W x H; in mm)
!Operating temperature 0°C...+55°C
!Conforms to CE standard
Software Support:
!Kernel-Mode driver for Windows 98/2000:
-USBCANLD.SYS for easy firmware download to the USB-
CANmodul
-USBCAN.SYS supports the various functions of the USB-
CANmodul
!User-Mode driver for Windows 98/2000:
-USBCAN.DLL for easy use of the USB-CANmodul functions
!Up to 10 USB-CANmoduls can be supported by these drivers
!Tools for Windows 98 / 2000:
-UCAN Config – administration of more than one USB-
CANmodul by allocation of device numbers
-PcanView(USBCAN) – CAN monitor program
!Demo program in C source code

USB-CANmodul
8SYS TEC electronic GmbH 2001 L-487e_6

Getting Started
SYS TEC electronic GmbH 2001 L-487e_6 9
2Getting Started
What you will learn with this Getting Started example:
•
••
•installing the USB-CANmodul
•
••
•software installation
•
••
•connecting the USB-CANmodul to the host-PC
•
••
•connecting the USB-CANmodul to a CAN network
•using PCANView (USBCAN)
2.1 Installation of the USB-CANmodul
Ensure that the individual components are not damaged. The contents
of the USB-CANmodul are:
•USB-CANmodul
•Installation discs
•Systems Manual (printed or as electronic version on the
installation discs)
•USB cable
2.1.1 Software Installation
Note: Install the software before connecting the
USB-CANmodul to the host-PC.
Installation and operation of the USB-CANmodul requires a host-PC
with a USB port that is running Microsoft Windows 98 or Windows
2000. The USB-CANmodul will not work under Windows NT
because there is no USB support in this operating system.
a) Insert the USB-CANmodul Utility Disc that corresponds to your
operating system. Use disc 1/2 if your computer runs Windows 98,
for Windows 2000 machines use disc 2/2.
b) Click on the “Start” button and choose “Run...”

USB-CANmodul
10 SYS TEC electronic GmbH 2001 L-487e_6
c) In the dialog field “Run”, enter “a:\setup.exe”. Click on “OK”to
start the setup program.
d) Follow the setup instructions to install the USB-CANmodul
software.
Note: You will need to restart your PC at the end of the
installation procedure.
2.1.2 Connecting the USB-CANmodul to the Host-PC
Connecting the USB-CANmodul to the host-PC is simple.
•Start the host-PC.
•Connect the USB-CANmodul to your computer using the included
USB cable
•Windows automatically detects the USB-CANmodul. A window
with the message “Unknown device” appears. Then the operating
system automatically searches for the appropriate driver. The
firmware will now be downloaded to the USB-CANmodul. The
red status LED blinks with a frequency of 10 hertz to indicate this
procedure.
•The USB-CANmodul now logs-on to the host-PC. Once more,
Windows detects an unknown device and searches for the device
driver automatically. At this time, the red status LED will stay on.

Getting Started
SYS TEC electronic GmbH 2001 L-487e_6 11
2.1.3 Checking the Device Installation
You can check to see if the module is logged-on properly to the host-
PC in the following way:
•Highlight the icon “My Computer” on the desktop and click the
right mouse key.
•A pop-up menu appears. Click on “Properties”. The dialog box
“System Properties” appears.
•Choose the tab “Device Manager” at the top. Click on the pull-
down menu “Universal Serial Bus Controller”. If the device
“Systec USB-CANmodul (usbcan.sys)”is shown in the list, the
new USB device has been detected properly. This is shown in the
figure below:
Figure 1: Device Manager with the USB-CANmodul

USB-CANmodul
12 SYS TEC electronic GmbH 2001 L-487e_6
If the installation was not successful, check the installation steps as
described above and try to re-install.
2.1.4 Device Number Allocation
With the help of device number allocation, it is possible to use more
than one USB-CANmodul simultaneously on the host-PC. The
device number identifies the individual USB-CANmodul.
•Start the configuration utility using the Windows Start button and
browse to Programs \ USB-CANmodul Utilities \ UCAN Config.
•This utility lists the USB-CANmodul’s by serial number and
device number. The device number is set to zero by the
manufacturer. It is not necessary to change this value if only using
one USB-CANmodul. We recommend to accept the default value
for the first installation.
Figure 2: USB Configuration Tool UCAN Config
•To exit the UCAN Configuration utility click on the Close button.

Getting Started
SYS TEC electronic GmbH 2001 L-487e_6 13
2.1.5 Connection to a CAN Network
The USB-CANmodul provides a DB-9 connector for connection to
the CAN network. The pin assignment on this connector is in
accordance to the CiA (CAN in Automation) specification. Connect
your CAN network to this connector with an appropriate CAN bus
cable.
Figure 3: Pin Layout of the DB-9 Connector
Note: A termination resistor of 120 Ohms at both ends of the
CAN cable between CAN_L (pin 2) and CAN_H (pin 7)
is required to ensure proper signal transmission.
The default setting of the USB-CANmodul at time of delivery
configures the CAN transceiver to operate optically isolated. For this
reason, the power for the CAN transceiver has to be supplied via the
CAN bus. This requires that the CAN cable consists of a power line
with a supply voltage in the range between 7 and 13V. Compare the
pinout of the DB-9 CAN connector as shown in Table 2 in section
2.3.
As an option, you can also supply the CAN transceiver circuitry via
USB. Refer to section 2.3 “CAN Supply Voltage” for more details.
Note: The CAN transceiver must be connected to a power
supply to ensure proper function of the USB-CANmodul.

USB-CANmodul
14 SYS TEC electronic GmbH 2001 L-487e_6
2.1.6 Starting PCANView (USBCAN)
The included program PCANView (USBCAN) is a CAN bus monitor
for Windows.
•Start the utility program using the Windows Start button and
browse to Programs \ USB-CANmodul Utilities \ PCANView
(USBCAN). It is recommended that you drag the PCANView
(USBCAN) icon onto the desktop of your PC. This enables easy
start of this utility program by double-clicking on the icon.
•The USB-CANmodul window will appear:
Figure 4: Dialog Box with Hardware Configuration
•Select the baudrate of your CAN network in the Baudrate box and
the Device Number. The entry any selects the USB-CANmodul
that is found first by Windows. Click on the OK button to enable
these settings.
•A new window PCANView – Connect to net will appear.

Getting Started
SYS TEC electronic GmbH 2001 L-487e_6 15
Figure 5: Dialog Box Message Filter Configuration
•In this message box you can select Standard (11-bit) or Extended
(29-bit) CAN identifier and message filters, if desired. Click on the
OK button to enable these settings.
•The PCANView (USBCAN) main window will appear:

USB-CANmodul
16 SYS TEC electronic GmbH 2001 L-487e_6
Figure 6: PCANView (USBCAN) Main Window
This screen is divided into two sections: Receive and Transmit
•Receive: monitors CAN signals that are received from a node
•Transmit: monitors CAN signals sent from the host-PC to the
CAN network via the USB-CANmodul
Refer to section 3.1.2 for complete and detailed description of the
PCANView (USBCAN) utility program.

Getting Started
SYS TEC electronic GmbH 2001 L-487e_6 17
2.2 Status LEDs on the USB-CANmodul
A description of the power and status LEDs is shown in the table
below:
USB-CANmodul
connected LED green
(Power) LED red
(Status) Description
no off off No voltage is supplied to
the USB-CANmodul.
yes on Blinking
(at. 10 Hz) USB-CANmodul logs in to
the host-PC
yes on on Log-in successful, CAN is
not initialized, no error.
yes on off CAN is initialized, no
error.
yes on Blinking
(at. 2 Hz) An error occurred on the
USB-CANmodul.
Table 1: States of the LEDs on the USB-CANmodul
2.3 CAN Supply Voltage
The default setting for the CAN supply voltage is optically isolated.
The voltage for the CAN transceiver and the opto-coupler must be
supplied via the CAN cable. A voltage in the range between +7V and
+13V is recommended. The pin assignment for the DB-9 CAN
connector is shown in the table below:
Pin Signal
1N/C
2 CAN-L
3 GND
4N/C
5 N/C (CAN shield, optional)
6 GND (optional)
7 CAN-H
8N/C
9 Vcc (+7 to +13 VDC)
Table 2: Pinout of the DB-9 Connector

USB-CANmodul
18 SYS TEC electronic GmbH 2001 L-487e_6
It is also possible to supply the CAN transceiver and the opto-coupler
on the USB-CAN module with the USB bus. In this case, no
additional power supply via the CAN bus is required. This simplifies
the structure of the CAN bus cable, as only two wires for CAN_L and
CAN_H are necessary.
To change between CAN power supply via USB or via the CAN bus,
two insertable jumpers are available on the USB-CANmodul.
Remove the four screws on the bottom of the module and remove the
upper part of the case carefully to configure the required jumpers.
Figure 7 shows the position and the numbering of both jumpers .
Table 3 describes the two configuration options.
Note: Only open the device when the USB-CANmodul is
powered down and both the USB and CAN cables are
disconnected.
USBCAN
JP1
JP2
1 2 3
1 2 3
Figure 7: Location and Numbering of the Jumpers
Table of contents
Other Sys Tec Electronic Control Unit manuals
Popular Control Unit manuals by other brands

Neumo
Neumo RIEGER N1 Operating and maintenance manual

RIEGLER
RIEGLER Variobloc operating instructions

Viessmann
Viessmann VITOTRONIC 100 Technical data manual

Valve Concepts
Valve Concepts 5500 Installation, operation and maintenance manual

Lenze
Lenze 9400 Series Communications manual

fakro
fakro ZTCi manual