PEAK System PCAN-USB CAN USB Adapter User Manual
- June 12, 2024
- PEAK System
Table of Contents
PEAK System PCAN-USB CAN USB Adapter
Product Information
The PCAN-USB interface enables simple connection to CAN networks. Its compact
plastic casing makes it suitable for mobile applications. The opto-decoupled
version guarantees galvanic isolation of up to 500 Volts between the PC and
the CAN side. The monitor software PCAN-View and the programming interface
PCAN-Basic for the development of applications with CAN connection are
included in the scope of supply and support CAN FD. Device drivers exist for
different operating systems, so programs can easily access a connected CAN
bus.
This manual describes the use of the CAN interface with Windows. Device
drivers and application information for Linux: www.peak-system.com/quick/DL-
Driver-E
Imprint
PCAN is a registered trademark of PEAK-System Technik GmbH. CiA® is a
registered community trade mark of CAN in Automation e.V. All other product
names in this document may be the trademarks or registered trademarks of their
respective companies. They are not explicitly marked by ™ or ®. © 2022 PEAK-
System Technik GmbH Duplication (copying, printing, or other forms) and the
electronic distribution of this document is only allowed with explicit
permission of PEAK-System Technik GmbH. PEAK-System Technik GmbH reserves the
right to change technical data without prior announcement. The general
business conditions and the regulations of the license agreement apply. All
rights are reserved.
PEAK-System Technik GmbH Otto-Röhm-Straße 69 64293 Darmstadt
Germany
Phone: +49 6151 8173-20
Fax: +49 6151 8173-29
www.peak-system.com
info@peak-system.com
Introduction
The PCAN-USB interface enables simple connection to CAN networks. Its compact
plastic casing makes it suitable for mobile applications. The opto-decoupled
version guarantees galvanic isolation of up to 500 Volts between the PC and
the CAN side.
The monitor software PCAN-View and the programming interface PCAN-Basic for
the development of applications with CAN connection are included in the scope
of supply and support CAN FD. Device drivers exist for different operating
systems, so programs can easily access a connected CAN bus.
- This manual describes the use of the CAN interface with Windows. Device drivers and application information for Linux: www.peak-system.com/quick/DL-Driver-E
- At the end of this manual you can find a Quick Reference with brief information about the installation and operation of the PCAN-USB interface.
Properties at a Glance
- CAN interface for the USB connection (Full-Speed mode, compatible with USB 1.1, USB 2.0, and USB 3.0)
- High-speed CAN connection (ISO 11898-2)
- Compliant with CAN specifications ISO 11898-1 for CAN
- Bit rates from 5 kbit/s up to 1 Mbit/s
- Time stamp resolution 42 µs
- NXP CAN controller SJA1000, 16 MHz clock frequency
- NXP CAN transceiver PCA82C251
- Galvanic isolation on the CAN connection up to 500 V (only PCAN-USB opto-decoupled)
- CAN termination can be activated through a solder jumper
- 5-Volt supply to the CAN connection can be connected through a solder jumper, e.g. for external bus converter
- Voltage supply via USB
- Extended operating temperature range from -40 to +85 °C (-40 to +185 °F)
System Requirements
- Computer with
- operating system Windows® 11 (64 bit), 10 (32/64 bit) or Linux (32/64-bit)
- a vacant USB port (USB 1.1, USB 2.0, or USB 3.0) or
- a vacant USB port at a self-powered USB hub
Scope of Supply
- PCAN-USB
Downloads
- Device drivers for Windows® 11 (64 bit), 10 (32/64 bit) and Linux (32/64-bit)
- CAN monitor PCAN-View for Windows
- Programming interface PCAN-Basic for developing applications with CAN connection
- Programming interfaces for standardized protocols from the automotive sector
Settings
The following describes the settings for the power supply of external devices and the internal termination. If you do not need any of these settings, skip this chapter.
Voltage Supply of External Devices
Optionally, an external power supply can be connected via the D-Sub connector
using solder bridges at pin 1 and/or pin 9 on the D-Sub connector. This allows
external devices to be supplied with a voltage of 5 V DC, such as the PCAN-
TJA1054 bus converter for Low-speed CAN. Pin 1 and pin 9 are not assigned at
delivery and with the PCAN-USB opto-decoupled only pin 1 is available up to
S/N 199999. The opto-decoupled model of the CAN interface contains an
interconnected DC/DC converter. Therefore, the current output is limited to 50
mA.
Activate Power Supply
- Risk of short circuit! Soldering on the CAN interface may only be performed by qualified electrical engineering personnel.
- Attention! Electrostatic discharge (ESD) can damage or destroy components on the card. Take precautions to avoid ESD.
- Open the CAN interface casing. Push the latches on both sides cautiously with a slotted screwdriver.
- Remove the circuit board.
- Set the solder bridges according to the model of the PCAN-USB on the intended position on the circuit board (see below).
- For assembly, place the circuit board on the upper half of the housing. The strain relief and the LED must be in the corresponding recesses.
- Press the lower half of the housing onto the upper half of the housing until the latches engage.
Attention! The voltage supply for external devices is not protected separately. Therefore, turn off the computer before you connect and disconnect CAN cables or peripheral systems. Consider that some computers still supply the USB ports with power even when they are turned off (standby operation).
Internal Termination
- Only applicable from S/N 200000
The internal termination can be activated by solder jumpers on the circuit board to terminate one end of the CAN bus. At delivery the termination is not activated.
Tipp: We recommend to do termination at the CAN cabling, for example with the terminating resistors PCAN-Term (IPEK-003002) or PCAN-MiniTerm (IPEK-003002-Mini). Thus, CAN nodes can be flexibly connected to the bus.
Activate Internal Termination
Risk of short circuit! Soldering on the CAN interface may only be performed
by qualified electrical engineering personnel.
Attention! Electrostatic discharge (ESD) can damage or destroy components
on the card. Take precautions to avoid ESD.
- Open the CAN interface casing. Push the latches on both sides cautiously with a slotted screwdriver.
- Remove the circuit board.
- Set the solder bridges according to the model of the PCAN-USB on the intended position on the circuit board (see below).
- For assembly, place the circuit board on the upper half of the housing. The strain relief and the LED must be in the corresponding recesses.
- Press the lower half of the housing onto the upper half of the housing until the latches engage.
Installation
This chapter covers the software setup for the PCAN-USB interface under
Windows and the connection of the CAN interface to the computer.
Note: For installation on Linux, see Appendix D Linux. Install the driver
before you connect the CAN interface.
Install Device Driver Setup
- Download the device driver setup from our website: www.peak-system.com/quick/DL-Driver-E
- Unpack the file PEAK-System_Driver-Setup.zip
- Double-click the file PeakOemDrv.exe The driver setup starts.
- Follow the program instructions.
Connecting the CAN Interface
Malfunction! Do not use a USB extension cable to connect the CAN interface
to the computer. Extension cables does not comply with the USB specification.
- Connect the CAN interface to a USB port of the computer or of a connected USB hub. The computer can remain powered on. Windows detects the new hardware and completes the driver installation.
- Check the LED on the CAN interface. If the LED is on, then the driver was initialized successfully.
Check Operational Readiness
- Open the Windows Start menu.
- Type Peak Settingsand press |Enter|. The window PEAK Settings appears.
- Select CAN Hardware. The connected CAN interface is displayed.
Connecting the CAN Bus
Connection over D-Sub Connector
After the CAN interface is connected, a CAN bus can be connected to the D-Sub
connector. The pin assignment for CAN corresponds to the specification CiA®
106:
Low power devices can be supplied directly with 5 Volts over pin 1 and pin 9 of the CAN connector, for example bus converters. Pin 1 and/or pin 9 are not in use at the delivery state. For more information see section 2.1 Voltage Supply of External Devices.
Tip: Connect a CAN bus with a different transmission standard via a bus converter. PEAK-System offers different bus converter modules like the PCAN- TJA1054 for a Low-speed CAN bus according to ISO 11898-3.
Cabling
-
Termination
The High-speed CAN bus (ISO 11898-2) must be terminated with 120 Ω on both ends. The termination prevents interfering signal reflections and ensures the proper operation of the transceivers of the connected CAN nodes (CAN interfaces, control devices).
The PCAN-USB interface to S/N 199999 does not have an internal termination. From S/N 200000 it has an optional internal termination with 120 Ω. See the previous section 2.2 Internal Termination for information about activation. -
Example of a Connection
This example shows a connection between the PCAN Interface and a control unit (ECU). The upper example shows a connection with a cable which is terminated with 120 Ω at both ends. At the lower example the connection is made with termination adapters. -
Maximum Bus Length
The maximum bus length depends primarily on the bit rate: Nominal bit rate| Buslength
---|---
1 Mbit/s| 40 m
500 kbit/s| 110 m
250 kbit/s| 240 m
125 kbit/s| 500 m
50 kbit/s| 1.3 km
20 kbit/s| 3.3 km
10 kbit/s| 6.6 km
5 kbit/s| 13 km
The listed values have been calculated on the basis of an idealized system and can differ from reality.
Example Application under Windows
As an example application for accessing the CAN interface, run the CAN monitor
PCAN-View from the Windows Start menu.
Operation
Status LED
The LED can be in the following states:
Unplugging the USB Connection
The PCAN-USB interface can be disconnected from the computer without
further actions. In Windows, the interface is not listed under “Safely Remove
Hardware”.
Distinguishing several PCAN-USB Interfaces
You can operate several PCAN-USB interfaces on a single computer at the
same time. The supplied program PCAN-View allows the assignment of device IDs
in order to distinguish the CAN interfaces in a software environment.
CAN Monitor PCAN-View
The CAN monitor PCAN-View is a Windows software for viewing, sending, and recording CAN and CAN FD messages. The software is installed with the installation of the device driver package under Windows. In the following the initialization of a CAN interface is described as an example. Detailed information about using PCAN-View can be found in the program window under the menu item Help.
Initialize CAN interface
- Open the program PCAN-View via the Windows Start menu. Depending on the CAN interface the Connect dialog is displayed with or without settings for CAN FD.
- If there are several CAN interfaces, select the desired interface. For multiple channels, select the desired channel from the list.
- Enter the bit rate(s) and other settings according to the connected CAN bus.
- Confirm the entries with OK. The main window appears and displays the Receive / Transmit tab.
- For initializing another channel or CAN interface, open another instance of PCAN-View.
Transmit CAN message
- Select the menu command Transmit / New Message. Depending on the CAN interface, the dialog box New Transmit Message is displayed with or without settings for CAN FD.
- Enter the ID, Length and Data of the message. Other settings can be made according to the connected CAN bus.
- Enter a value into the Cycle Time field to choose manually or periodically message transmission.
- To transmit periodically enter a value greater than 0.
- To transmit only manually enter the value 0.
- Confirm the entries with OK. The created transmit message appears on the Receive / Transmit tab.
- To send the message manually, select the menu command Transmit > Send or press the |space| bar. The manual transmission process is performed additionally for periodically transmitted CAN messages.
Additional Tabs
Depending on the CAN-Interface, additional tabs are available.
-
Trace Tab
The tracer (data logger) records the communication of the CAN bus in linear or ring buffer mode. The trace data can be saved to a file. -
CAN-Interface Tab
The CAN-Interface tab shows information about the hardware and the used Windows device driver. In this case exemplary for the PCAN-miniPCIe FD. Depending on the CAN-Interface, a hardware ID can be determined to distinguish several interfaces of the same type. For interfaces with CAN FD a transmission according to “ISO” or “Non-ISO” can be set as default of the hardware. -
Bus Load Tab
The Bus Load tab displays the current bus load, its time history and statistical information of the connected CAN channel. -
Error Generator Tab
Via the Error Generator tab the communication on the CAN bus in test environments or during the development of CAN buses can be disturbed in a controlled way by 6 consecutive dominant bits. This is a violation of the CAN protocol on the CAN bus which must be recognized as an error by the connected CAN nodes.
Note: The Error Generator should only be used by experienced users and in the development environment. For further information, please contact our customer support: support@peak-system.com
You can destroy CAN frames with the error generator by one of two methods:
- once after activation
- repeatedly at specific intervals related to a CAN ID
Destroy Single CAN Frame
The Destroy Single Frame area refers to the next CAN frame that is recognized
by the plug-in card after activation.
- Enter the Bit Position where in the CAN frame the error is to be generated. The bit position must start after the identifier. The count includes the stuff bits.
- Execute the destroy action with Do it. The next received or transmitted CAN frame will be destroyed at the selected bit position.
Destroy Multiple CAN Frames
- Enter the CAN ID of the CAN frame that is intended to be destroyed multiple times. The following specifications refer to this ID.
- Enter the Bit Position where in the CAN frame the error is to be generated. The bit position must start after the identifier. The count includes the stuff bits.
- If CAN messages are to be sent unharmed before being destroyed, specify the Number of Frames to ignore.
- Determine the Number of Frames to destroy.
- Confirm the entries with Apply to activate the error generator.
- Stop destroying further CAN frames with Disable.
API PCAN-Basic
The intended use of PCAN-Basic requires compliance with the license rights. Read the license agreement for end users at: https://www.peak- system.com/quick/eula
The programming interface (API) PCAN-Basic provides basic functions for the connection of own programs to the CAN-Interface of PEAK-System. PCAN-Basic is the interface between the program and the device driver. In Windows operating systems this is a DLL (Dynamic Link Library) and in Linux operating systems an SO (Dynamic Shared Object). PCAN-Basic is designed to be cross-operating system compatible. Software projects can be ported between supported systems with little effort. With the installation of the device driver package under Windows the DLL files of the API PCAN-Basic are placed in the system folder. Examples for all common programming languages as well as libraries and help files are available as download package at: www.peak-system.com/quick/DL- Develop-E
For Linux a download of the API is available under this link. For a use of PCAN-Basic another driver package with chardev driver is needed, because an access under SocketCAN is not possible. The “Driver Package for Proprietary Purposes”, the user manual, and further information about the implementation can be found at www.peak-system.com/linux
Features of PCAN-Basic
- Thread-safe API for developing applications with CAN and CAN FD connections
- Supports CAN specifications ISO 11898-1 for CAN and CAN FD
- Supports the operating systems:
- Windows® 11 (64 bit), 10 (32/64 bit)
- Linux (32/64-bit)
- Multiple PEAK-System applications and your own can be operated on a physical channel at the same time
- Single DLL (Win) / SO (Linux) for all supported hardware types
- Use of up to 16 channels for each hardware type
- Simple switching between channels
- Access to the CAN channels of a PCAN-Gateway via the PCAN-LAN device type
- Driver-internal buffering under Windows of up to 32,768 CAN messages per CAN channel
- Precision of time stamps on received messages up to 1 μs (depending on the PEAK CAN interface used)
- Supports PEAK-System‘s trace formats v1.1 for CAN and v2.0 for CAN FD applications
- Access to specific hardware parameters, such as Listen-only mode
- Notification of the application through Windows events when a message is received
- Support of CAN error frames
- Confirmation of physical transmission by CAN echo frames
- Extended system for debugging operations
- Multilingual debugging output
- Output language depends on operating systems
- Debugging information can be defined individually
Principle Description of the API
The sequence of accessing the CAN interface is divided into three phases:
Initialization
A CAN channel must be initialized before using it. This is done by the simple
call of the function CAN_Initializefor CAN and CAN_InitializeFDfor CAN FD. Per
CAN interface type the API allows the simultaneous use of up to 16 CAN
channels. After a successful initialization the CAN channel is ready. No
further configuration steps are required.
Interaction
For receiving and transmitting messages the functions CANReadand CAN Writeas
well as CAN_ReadFDand CAN_WriteFDare available depending on the initialization
mode. Additional settings can be made, such as setting up message filters to
confine to specific CAN IDs or setting the CAN controller to Listen-only mode.
For the receiving CAN messages, events can be configured for automatic
notification of an application (client). This offers the following advantages:
- The application no longer needs to check for received messages periodically (no polling).
- The response time at reception is reduced.
Completion
To end the communication the function CAN_Uninitializeis called in order to
release the reserved resources for the CAN channel, among others. In addition
the CAN channel is marked as “Free” and is available to other applications.
Technical Specifications
Appendix
Appendix A CE Certificate
Appendix B Dimension Drawings
Appendix C Quick Reference
Software/Hardware Installation under Windows Download the device drivers
installation package from our website www.peak-system.com/quick/DL-
Driver-E. Install the driver
before you install the CAN interface. After driver installation connect the
CAN interface to a USB port of the computer or of a connected USB hub. The new
hardware is recognized by Windows and the driver is initialized. The LED on
the interface then is lit. Check the operational readiness. Open the Windows
Start menu. Type Peak Settingsand press |Enter|. The window PEAK Settings
appears. The connected USB interface is displayed under CAN Hardware.
Getting Started under Windows
Run the CAN monitor PCAN-View from the Windows Start menu as a sample
application for accessing the CAN interface. For initialization of the CAN
interface select the desired CAN channel and CAN bit rate.
Status LED
High-speed CAN connector (D-Sub, 9 pins)
Appendix D Linux
Depending on the Kernel version, device drivers for the CAN interfaces from
PEAK-System are already included in the operating system. The CAN interfaces
are treated as network devices (SocketCAN, netdev). You can find the
documentation for SocketCAN under:
https://www.kernel.org/doc/Documentation/networking/can.txt
The command grep PEAK_ /boot/config-uname -r
lists the available drivers. The
following table shows the PCAN-Interfaces and from which kernel version they
are supported.
Whether the required driver for the PCAN-Interface is present and loaded can be checked with the following command: lsmod | grep ^peak check. If the initialization was successful, the response line starts with peakusbor peak PCI. If the required drivers are not listed, install the “Driver Package for Proprietary Purposes”. The download, the user manual for the driver, and the corresponding “Implementation Details” can be found under: www.peak- system.com/linux This driver package is also needed to use the APIs based on the chardev driver, for example PCAN- Basic, libpcan, or libpcanfd.
References
- System
- kernel.org/doc/Documentation/networking/can.txt
- Home: PEAK-System
- peak-system.com/linux
- Development: PEAK-System
- Drivers: PEAK-System
- kernel.org/doc/Documentation/networking/can.txt
- Drivers: PEAK-System
- EULA: PEAK-System
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>