ZLG MiniPCIeCAN-II Operational manual

Product User Manual
MiniPCIeCAN-II
MiniPCIe Interface CAN Card
User Manual
UM01010101 V1.06 Date: 2021/04/21
Category
Contents
Keywords
MiniPCIe and CAN message monitoring
Description
MiniPCIe interface CAN card
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
i
User Manual
Revision History
Version
Date
Reason
V0.00
July 1, 2015
Created
V1.01
September 30,
2015
Added the Linux driver installation method, quick instructions
and dynamic library usage
V1.02
August 9, 2017
Changed the company name, sales and service network
V1.03
September 3, 2018
Modified the dimension drawing
V1.04
March 12, 2019
Update the document header and footer and "Sales and
Service Network" content and add the "Disclaimer" content
V1.05
November 04,
2020.
Added the MiniPCIe slot description
V1.06
April 21, 2021
Corrected the MiniPCIe slot description

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
1
User Manual
Contents
1. Functions .....................................................................................................1
Functions......................................................................................................................2
1.1 Typical Applications...........................................................................................2
2. Equipment Installation..................................................................................3
2.1 Power Supply.....................................................................................................3
2.2 Signal Indicators................................................................................................3
2.3 MiniPCIe Interface Definition.............................................................................4
2.4 CAN Second Function Pin Switch.....................................................................5
3. Driver Installation.........................................................................................6
3.1 Installing the Driver for the First Time on Windows...........................................6
3.2 Checking That the Device Is Installed Successfully..........................................7
3.2.1 Opening Windows Device Manager...........................................................7
3.2.2 Checking That the New Device Has Been Successfully Installed.............8
3.3 Driver Installation on Linux................................................................................8
4. Quick Instructions ........................................................................................9
4.1 CANTest Basic Operations................................................................................9
4.1.1 Device Type Selection................................................................................9
4.1.2 Filter Settings ...........................................................................................11
4.1.3 Starting the CAN ......................................................................................12
4.1.4 Getting Device Information.......................................................................12
4.2 Sending and Receiving Test............................................................................12
4.2.1 Establishing a Test Environment..............................................................12
4.2.2 Starting the Device...................................................................................14
4.2.3 Sending Data............................................................................................15
4.2.4 Real-time Saving and Stopping Saving ...................................................17
4.2.5 DBC Decoding and Display by ID............................................................18
4.2.6 Bus Utilization...........................................................................................18
4.2.7 Error Message Display.............................................................................20
5. Method of Using the Interface Library Functions........................................21
5.1 Methods of Calling the Dynamic Library on Windows.....................................21
5.1.1 Method of VC Calling the Dynamic Library..............................................21
5.1.2 Method of VB Calling the Dynamic Library..............................................21
5.2 Interface Library Function Usage Process......................................................23
6. Electrical Characteristics............................................................................24
7. Structure and Dimensions..........................................................................25
8. Inspection and Maintenance......................................................................27
9. Disclaimer..................................................................................................30
Appendix A SJA1000 standard baud rate ......................................................31

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
1
User Manual
1. Functions
MiniPCIeCAN-II is a high-performance MiniPCIe interface CAN card launched by
ZLG Electronics, which can connect the CAN network to a computer equipped with a
MiniPCIe card slot. MiniPCIeCAN-II adopts the MiniPCIe board in standard dimensions
and can be easily installed on laptop or industrial computer with MiniPCIe interface,
making it a powerful CAN analyzer.
MiniPCIeCAN-II integrates two CAN interfaces. In addition, to facilitate expansion, the
second function pin of the CAN signal can be switched to the reserved IO port of the
MiniPCIe interface by using the resistor R24, which helps the user design the CAN
transceiver circuit on the backplane.
The MiniPCIeCAN-II high-performance CAN interface card can be used to connect
the PC to the CAN-bus network through USB bus, which constitutes a CAN-bus network
control node for data processing and data acquisition in CAN-bus network fields such as
fieldbus laboratories, industrial control, high-performance residential areas, and
automotive electronic networks.
The MiniPCIeCAN-II high-performance CAN interface card is a powerful tool for
CAN-bus product development and CAN-bus data analysis; moreover, it features small
size, plug and play, etc. It is ideal for portable system users.
The MiniPCIeCAN-II high-performance CAN interface card supports Windows
2000/XP/7/8/10 and other operating systems and Linux operating systems.
MiniPCIeCAN-II provides a unified application programming interface and complete
application demonstration codes, including VC, VB, Delphi and C++ development routine
demonstrations, which helps users develop application programs.
The MiniPCIeCAN-II interface card supports the CANTest general test software,
which can perform functions such as sending, receiving and monitoring CAN-bus
messages. Figure 1.1 shows the product.
The MiniPCEeCAN card uses the USB D+ and USB D- signal cable in the MiniPCIe
slot. Before purchasing and using the product, check whether the MiniPCIe slot on the
motherboard provides USB D+ and USB D- signal pins. See Table 2.3 for pin numbers.
This CAN card cannot be used if the USB signal pin is missing from the motherboard slot.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
2
User Manual
Figure 1.1 Product appearance
Functions
Adopt the standard MiniPCIe interface;
Support CAN2.0A and CAN2.0B protocols, in line with ISO/DIS11898
specification;
Integrated two CAN-bus interfaces;
The CAN TTL signal can be switched to the second function IO, which helps
design the CAN transceiver circuit by yourself;
The CAN-bus communication baud rate can be arbitrarily programmable
between 5 Kbps and 1 Mbps;
Powered by the MiniPCIe interface;
The CAN-bus interface is electrically isolated. The insulation voltage of the
isolation module is 2,500 V DC;
Support Windows 2000/XP/7/8/10 and Linux;
Support the CANtest test software;
Compact, plug and play;
Operating temperature: -40°C to 85°C ;
Standard MiniPCIe card dimensions: 30 mm (width) x 50.95 mm (length).
1.1 Typical Applications
CAN-bus network diagnosis and test;
Automotive electronics applications;
Electrical communication;
Network industrial control equipment;
High-speed, large data volume communication.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
3
User Manual
2. Equipment Installation
2.1 Power Supply
MiniPCIeCAN-II uses the MiniPCIe interface 3.3V power supply. The SYS indicator is
on, and it turns red first, indicating that the device has power supply. It then flashes a few
times and turns green, indicating communication with the PC.
2.2 Signal Indicators
The MiniPCIeCAN-II interface card has one dual-color SYS indicator, one dual-color
CAN0 indicator, and one dual-color CAN1 indicator, which indicate the running status of
the device. Table 2.1 lists the functions of the indicators. When the indicators are in
various states, the status of the CAN bus is shown in Table 2.2.
Table 2.1 Indicator functions
Indicator
STATUS
Indication status
SYS
Red
Device initialization status indication
Green
MiniPCIe interface signal indication
CAN1
Green
The CAN interface is working properly
Red
The CAN interface is faulty
CAN2
Green
The CAN interface is working properly
Red
The CAN interface is faulty
After the MiniPCIeCAN-II interface card is powered on, the system initialization status
indicator SYS is red, indicating that the device has been powered and the system is
initializing;If the system initialization status indicator SYS is off, a system power fault or
serious system error occurs.
After normal connection to the PC (driver installed), the SYS indicator is green. When
data is being transmitted on the USB interface, the USB signal indicator SYS flashes in
green.
When CAN1 and CAN21 indicators are green, the CAN controller has been initialized
and is working properly.
When the CAN controller has an error, the CAN1 and CAN2 indicators are red; when
the error of the CAN controller is cleared, the CAN1 and CAN2 indicators are green.
Table 2.2 CAN bus status
CAN Indicator Status
CAN Bus Status
CAN1, CAN2 are all off
The CAN controller is disconnected from the bus
CAN1 and CAN2 flash
alternately in red and green
The CAN controller is not started, and the user is prompted
to start the CAN controller
CAN1 and CAN2 indicators are
always green
The CAN bus is operating properly
CAN1 and CAN2 indicators
The CAN-bus bus has an error or data overflow, and it may

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
4
User Manual
flash in read
lose frames
2.3 MiniPCIe Interface Definition
Figure 2.1 MiniPCIe pin sequence
Table 2.3 lists the MiniPCIe interface definitions. The pins 17, 19, 37, 39 are the
second function pins of CAN. 36 and 38 are USB pins.
Table 2.3 MiniPCIe interface definition
Signal Name
Pin No.
Description
nWAKE
1
nWAKE signal/default pull-up
nRESET
22
nRESET signal/not used
TD0_REV
17
CAN0 TXD second function IO
RD0_REV
19
CAN0 RXD second function IO
TD1_REV
37
CAN1 TXD second function IO
RD1_REV
39
CAN1 RXD second function IO
USB_D-
36
USB_D-
USB_D+
38
USB_D+
3.3V
2, 24, 52
Power supply
GND
9, 15, 18, 21, 26, 27, 29, 34, 35,
40, 50
Ground

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
5
User Manual
2.4 CAN Second Function Pin Switch
When designing the CAN transceiver circuit or improving the protection level of the
CAN signal cable, consider connecting the second function pin of the CAN signal to the
backplane through the MiniPCIe reserved pin. Design the CAN transceiver circuit by
yourself to improve the system flexibility.
Figure 2.2 CAN signal secondary function selection resistor
The second function pin of the CAN signal is switched by using R24 (this resistor can
be found on the rear of the board, as shown in Figure 2.2). R24 is welded by default. The
system uses the default on-board CAN transceiver ADM3053. When R24 is removed, the
second function pin of the CAN signal is automatically enabled when the system is
powered on. The following table lists the pin sequence. 错误!未找到引用源。 At this time,
R29 and R30 need to weld 0 ohm resistors to enable CAN0, while R31 and R32
respectively weld 0 ohm resistors to enable CAN1.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
6
User Manual
3. Driver Installation
3.1 Installing the Driver for the First Time on Windows
A. In the "\USBCAN\Driver" directory, find the usbcan.inf file, copy it to the
windows\inf directory of the system, find usbcan.sys, and copy it to
windows\system32\driver.
Note: The driver download address is http://www.zlg.cn/canbus/product_detail.php?id=4.
B. After the file is copied, connect the MiniPCIeCAN-II intelligent MiniPCIe interface
CAN card to the PC correctly; Window will detect the new hardware and
automatically start the "Found New Hardware" wizard. Click "Next". See Figure
3.1.
Figure 3.1 New Hardware Driver Installation Wizard
C. The wizard starts searching for new hardware drivers. See Figure 3.2.
Figure 3.2 Searching the driver

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
7
User Manual
D. Wait for a while. On Windows XP/Windows 2000, a warning about compatibility
with the operating system may be generated. In this case, just click the "Continue
Anyway" button. See Figure 3.3.
Figure 3.3 Driver Installation
E. After continuing the installation, you will be prompted that new hardware is found.
Finish installation. See Figure 3.4.
Figure 3.4 Driver installation completed
F. Click "Finish". MiniPCIeCAN-II Intelligent MiniPCIe interface CAN card
initialization indicator SYS is red and off, and the SYS indicator is on in green,
indicating that the hardware driver is installed successfully and can be used.
3.2 Checking That the Device Is Installed Successfully
3.2.1 Opening Windows Device Manager
A.Right-click the My Computer icon on the desktop;
B.Select the "Properties" option from the drop-down menu;
C.Select the "Hardware" tab;
D.Click the Device Manager button to open the current hardware device list.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
8
User Manual
3.2.2 Checking That the New Device Has Been Successfully Installed
Check if the "USBCAN" device is already in the current hardware list in the "Universal
Serial Bus Device" device class. After successful installation, you can see the "USBCAN"
device under the "Universal Serial Bus Device" device class in the "Device Manager"
interface. The following figure shows the normal installation of the "ZLG USBCAN series
intelligent CAN interface card" on the computer. See Figure 3.5.
Figure 3.5 Installation completed
When the USBCAN mini intelligent CAN interface card and the PC are in data
transmission, the SYS indicator on the interface card flashes in green.
3.3 Driver Installation on Linux
A. The usbcan driver is implemented based on libusb. First, install the dependent
library with the following command:
#apt-get install libusb-1.0-0
B. Copy "usbcan.so, libusbcan.so.1" to the "/lib" directory, and run make in the test
directory for compilation.
Note: Ask the R&D department for usbcan.ko and libusbcan.so.1 files.
C. In the "./test" in the test directory, view the parameter calling example as
reference for the test.
D. test will test each channel in a self-send and self-receive manner. If the card is
normal, the number of frames sent and received and the sending speed will be
displayed in the end
Note: The USB driver delivered with Linux is used. The old way of publishing was not open source.
Therefore, customers need to apply for a custom driver to the R&D department each time the kernel is
replaced.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
9
User Manual
4. Quick Instructions
4.1 CANTest Basic Operations
The CANtest test software can be found in the supporting CD-ROM (need to be
installed). See Figure 4.1.
Figure 4.1 CANTest software icon
Note: The download address of CANTest software is
http://www.zlg.cn/canbus/product_detail.php?id=4.
4.1.1 Device Type Selection
Before operation, select USBCAN2 from the "Select Device" menu, as shown in
Figure 4.2.
Figure 4.2 Selecting a device
The "Open Device" dialog box is displayed, as shown in Figure 4.3.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
10
User Manual
Figure 4.3 Open Device dialog box
In this dialog box, select the device index number and CAN channel to be opened,
and set the CAN initialization parameters, click "OK" to open the device operation window
(or you can click the "OK and start CAN" button to open the device operation window and
automatically start the device and start the CAN channel).

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
11
User Manual
4.1.2 Filter Settings
In the device operation window, click the "Filter Settings" button to set the filter (if you
do not need to set the filter, you can skip this step), as shown in Figure 4.4.
Figure 4.4 Filter Setting 1
The Filter Settings dialog box is displayed, as shown in Figure 4.5.
Figure 4.5 Filter Setting 2
Select the filter mode. Set the CAN frame to be filtered by setting the filter.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
12
User Manual
4.1.3 Starting the CAN
Click the "Start" button to start the CAN channel. The received CAN data is
automatically displayed in the data list, as shown in Figure 4.6.
Figure 4.6 Startup
4.1.4 Getting Device Information
Figure 4.7 Device information
After starting the CAN channel, select the "Device Information" option in the "Device
Operation" menu to obtain the details of the current device, as shown in Figure 4.7.
4.2 Sending and Receiving Test
This section describes the simple transmit-receive test, DBC decoding, and bus
utilization of MiniPCIeCAN-Ⅱ.
4.2.1 Establishing a Test Environment
Ensure that the wiring is correct. Figure 4.8 shows the interface definition, and Figure
4.9 shows the wiring effect.
Figure 4.8 Interface definition

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
13
User Manual
Figure 4.9 Wiring diagram 1
In this document, it is built based on our company's core board and backplane. In fact,
the driver can be installed as long as the device connected to the MiniPCIe interface is
installed. Figure 4.10 and Figure 4.11 show the overall effect.
Figure 4.10 Wiring diagram 2

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
14
User Manual
Figure 4.11 Wiring diagram 3
4.2.2 Starting the Device
Run the CANTest software and select the device type. See 4.1.1 Summary. Configure
the device, as shown in Figure 4.12 and Figure 4.13. Pay attention to the selection of CAN
channels. The device index number is a code that identifies the device. The same device
index number should be selected for different CAN interfaces of the same device.
Different device index numbers are selected for different devices select . Generally, device
index numbers start from 0. The number of CAN channels is used to distinguish different
CAN channels under the same device index number. This device has two CAN channels.
Therefore, there are two options (0 and 1) in the first few CAN options. The baud rate is
100K. Since there is no terminal resistor installed for this test, the baud rate should not
exceed 100K. If you really use it, you must add a terminal resistor of the corresponding
resistance value.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
15
User Manual
Figure 4.12 No. 1 CAN
Figure 4.13 No. 2 CAN
4.2.3 Sending Data
When you start the CAN successfully, set the parameters of the CAN frame you want

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
16
User Manual
to send, as shown in Figure 4.14. Click the "Send" button to send the data(The self-sent
and self-receive option in the Sending Format drop-down box indicates that the sent CAN
frame can also be received by itself. This option is only needed during testing; select
normal transmission in practical applications).
Figure 4.14 Basic settings for sending data
Click the "Advanced Operation" tab to display the advanced operation page. On this
page, you can set to send multiple different CAN frames each time (a maximum of 100
frames can be set), and the interval between each frame and between each batch, as
shown in Figure 4.15.
Figure 4.15 Advanced settings for sending data
Figure 4.16 and Figure 4.17 show the sending and receiving effect.

MiniPCIeCAN-II
MiniPCIe Interface CAN Card User Manual
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
17
User Manual
Figure 4.16 Sending
Figure 4.17 Receiving
4.2.4 Real-time Saving and Stopping Saving
When you need to record messages for a long time, use the real-time saving function.
Table of contents
Other ZLG Computer Hardware manuals