MCP2515 CAN Bus Monitor Demo Board
MCP2515 CAN Bus Monitor Demo Board
MCP2515 CAN Bus Monitor Demo Board
DS51757A
Note the following details of the code protection feature on Microchip devices:
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro,
PICSTART, rfPIC and SmartShunt are registered trademarks
of Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Linear Active Thermistor, MXDEV, MXLAB,
SEEVAL, SmartSensor and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, In-Circuit Serial
Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB
Certified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM,
PICDEM.net, PICtail, PIC32 logo, PowerCal, PowerInfo,
PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Total
Endurance, UNI/O, WiperLock and ZENA are trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
2008, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
DS51757A-page ii
DS51757A-page iii
DS51757A-page iv
INTRODUCTION
This chapter contains general information that will be useful to know before using the
MCP2515 CAN Bus Monitor Demo Board. Items discussed in this chapter include:
Document Layout
Conventions Used in this Guide
Recommended Reading
The Microchip Web Site
Customer Support
Document Revision History
DOCUMENT LAYOUT
This document describes how to use the MCP2515 CAN Bus Monitor Demo Board as
a development tool to emulate and debug firmware on a target board. The manual
layout is as follows:
Chapter 1. Product Overview Important information about the MCP2515
CAN Bus Monitor Demo Board.
Chapter 2. Installation and Operation This chapter includes a detailed
description of each function of the demo board and instructions for how to begin
using the board.
Appendix A. Schematic and Layouts Shows the schematic and layout
diagrams for the MCP2515 CAN Bus Monitor Demo Board.
Appendix B. Bill Of Materials (BOM) Lists the parts used to build the
MCP2515 CAN Bus Monitor Demo Board.
DS51757A-page 1
Represents
Referenced books
Emphasized text
A window
A dialog
A menu selection
A field name in a window or
dialog
A menu path
A dialog button
A tab
A number in verilog format,
where N is the total number of
digits, R is the radix and n is a
digit.
A key on the keyboard
Click OK
Click the Power tab
4b0010, 2hF1
Square brackets [ ]
Optional arguments
#define START
autoexec.bat
c:\mcc18\h
_asm, _endasm, static
-Opa+, -Opa0, 1
0xFF, A
file.o, where file can be
any valid filename
mcc18 [options] file
[options]
errorlevel {0|1}
Initial caps
Quotes
Underlined, italic text with
right angle bracket
Bold characters
NRnnnn
DS51757A-page 2
Examples
File>Save
var_name [,
var_name...]
void main (void)
{ ...
}
Preface
RECOMMENDED READING
This user's guide describes how to use MCP2515 CAN Bus Monitor Demo Board. The
following Microchip documents are available and recommended as supplemental
reference resources.
MCP2515 Data Sheet, Stand-Alone CAN Controller With SPI Interface,
(DS21801)
This data sheet provides detailed information regarding the MCP2515 product family.
MCP2551 Data Sheet, High Speed CAN Transceiver, (DS21667)
This data sheet provides detailed information regarding the MCP2551 product family.
PIC18F2455/2550/4455/4550 Data Sheet, (DS39632)
This data sheet provides detailed information regarding the PIC18F4550 product
family.
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
Distributor or Representative
Local Sales Office
Field Application Engineer (FAE)
Technical Support
DS51757A-page 3
DS51757A-page 4
INTRODUCTION
This chapter provides an overview of the MCP2515 CAN Bus Monitor Demo Board and
covers the following topics:
What is the MCP2515 CAN Bus Monitor Demo Board?
What the MCP2515 CAN Bus Monitor Demo Board kit includes
1.2
1.3
WHAT THE MCP2515 CAN BUS MONITOR DEMO BOARD KIT INCLUDES
The MCP2515 CAN Bus Monitor Demo Board Kit includes:
DS51757A-page 5
DS51757A-page 6
INTRODUCTION
The MCP2515 CAN Bus Monitor Demo Board kit demonstrates the MCP2515
Stand-Alone CAN Controller interfacing to a CAN bus. The MCP2515 CAN Bus Monitor
Demo Board kit consists of two identical boards which, when connected together,
create a small, 2-node CAN bus. This bus can be interfaced to a PC by connecting one
of the two boards to the PC (USB) and running the custom software.
The two nodes are identical in form, however, the function is determined by the
connection to each other and the PC. One node (connected to the PC) will become the
monitor and the other one will become the Traffic Generator. The boards are reversible
(i.e., they can take either role, depending on the connection scheme).
Additionally, the board(s) can be connected to an existing CAN bus where the software
can monitor the traffic and the user can interact with the bus as needed. The software
allows some of the MCP2515 registers to be modified, as well as allows messages to
be received and transmitted.
The user can gain an understanding of the capabilities of the MCP2515.
2.2
FEATURES
The MCP2515 CAN Bus Monitor Demo Board kit has the following features:
Two identical boards and a CAN cable for creating a small CAN bus
USB interface and PC software to interface to the CAN bus
CAN bus PC software
Button for changing the bus load on the Traffic Generator node
Headers (test points) for monitoring the MCP2515 pins (CAN, SPI, and status/interrupt pins)
PIC18F4550 PIC Microcontroller (MCU) with ICD2 interface/header for in-circuit
programming.
DS51757A-page 7
GETTING STARTED
The MCP2515 CAN Bus Monitor Demo Board is a fully functional, assembled, and
tested kit used to demonstrate the MCP2515 in a CAN bus environment. The following
describes the basic setup and operation. See Figure 2-1 and Figure 2-2 for a simplified
functional diagram and block diagram. Basic Setup:
1. Connect the two boards together using the supplied ribbon cable
2. Connect the USB cable to PC
3. Start the bus monitor software. Both boards will be configured to 125 kb/s CAN
rate by default. Select Device > Connect to connect the board to the GUI.
4. Can now generate traffic (press the LOAD button on traffic generator board).
FIGURE 2-1:
BLOCK DIAGRAM
ICSP HEADER
USB
USB
+5V
GND
POWER
PIC18F4550
EXT
50
75 100
USB
RESET
25
MCP2515
TX/RX
Header
LOAD
CAN
MCP2551
TX
RX
CAN
(default)
Bus test
points
+5V from
CAN cable
Jumpers: Shorted by
default on PCB
bottom
DS51757A-page 8
H
L
CAN (ALT)
USB
FUNCTIONAL DIAGRAM
USB
Con
Power
CAN
FIGURE 2-3:
USB
Programming
FIGURE 2-2:
Control
CAN
Con
CAN
Headers
DS51757A-page 9
FUNCTIONAL OPERATION
The MCP2515 CAN Bus Monitor Demo Board is basically a USB-to-CAN board which
provides visual feedback of Controller Area Network operation. The two boards
included in the kit can be used together to create a 2-node CAN bus.
The function of the board is determined by how it is powered.
2.4.1
The board is a designated as a Bus Monitor when the board detects a connection to
the USB power (and enumerates to USB).
By default, this node is configured for 125 kb/s and the receive buffers are wide open
(i.e., will receive all messages on the bus). The PC software communicates with this
node.
2.4.2
2.4.3
The silkscreen on the board indicates that the bus loading ranges from 25%
to 100% when pressing the LOAD button. While the node can handle
these loads, the display in the Output window becomes meaningless at
loads above 5% - 8%. Therefore, the bus loading is reduced for demonstration purposes. The firmware can be modified to increase the traffic as
needed.
Headers/Test Points
Two of the headers are connected to the MCP2515 pins so the pins can be monitored.
The SPI and CAN serial interfaces, interrupt pin(s), and SOF pin are routed to headers/test points.
The ICSP signals from the PIC18F4550 are routed to a header.
DS51757A-page 10
SOFTWARE OPERATION
The software consists of five (5) main windows that are selected by tabs:
1. Bus Statistics Window: Shows the status of the bus, including on/off the bus,
bus loading, number of transmitted and receive messages, and bit timing
settings status. See Figure 2-4
2. Bus Parameters Window: Is used to set basic bit timing. The bus speeds are
limited to the values in the pull-down box. To set custom bit timing, refer to the
MCP2515 Configuration Window. See Figure 2-5
3. Transmit Window: This screen is used to configure and transmit CAN
messages. See Figure 2-6
4. Output Window: This window displays the messages transmitted and received
by the MCP2515. The right mouse button can be used to display the time in free
running or delta. See Figure 2-7
5. MCP2515 Configuration Window: This window allows access to the MCP2515
registers. SPI commands can be issued. See Figure 2-8
FIGURE 2-4:
DS51757A-page 11
DS51757A-page 12
FIGURE 2-5:
FIGURE 2-6:
TRANSMIT WINDOW
OUTPUT WINDOW
FIGURE 2-8:
DS51757A-page 13
DS51757A-page 14
INTRODUCTION
This appendix contains the following schematics and layouts for the MCP2515 CAN
Bus Monitor Demo Board:
DS51757A-page 15
A.2
DS51757A-page 16
16
15
14
13
12
11
10
17
18
20
A.3
DS51757A-page 17
A.5
DS51757A-page 18
A.7
DS51757A-page 19
DS51757A-page 20
Reference
Description
Manufacturer
Part Number
C0805C104K5RACTU
C3
Panasonic
ECJ-2VB1C224K
Yageo
CC0805JRNP09BN220
10
D1<->D10
Lumex Inc.
SML-LXT0805IW-TR
DS1, DS2
ON Semiconductor
MBR0520LT1G
J1
J2
DO NOT POPULATE
J3
DO NOT POPULATE
J4, J8
Tyco
J5
Tyco Electronics/Amp
3-644695-7
J6
DO NOT POPULATE
J7
103310-1
JP1
Tyco Electronics/Amp
3-644695-2
PCB
104-000108
Q1, Q2
Fairchild
Semiconductor
NDS352P
Panasonic
ERJ-6GEYJ271V
R3, R4
DO NOT POPULATE
Panasonic
ERJ-6GEYJ471V
Panasonic
ERJ-6GEYJ103V
R14
Panasonic
ERJ-6GEYJ121V
R15, R18
ERJ-6ENF3322V
R19
Panasonic
ERJ-6ENF1003V
R23
Panasonic
ERJ-6GEYJ472V
SW1, SW2
Panasonic - ECG
EVQ-PJS04K
Note:
Electronics/Amp
3-644695-6
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
DS51757A-page 21
Reference
Description
Manufacturer
Part Number
Test Point
GND
Keystone Electronics
Test Point
VDD
Keystone Electronics
5010
U1
Microchip Technology
Inc.
PIC18F4550-I/PT
U2
Microchip Technology
Inc.
MCP2515-I/ST
U3
Microchip Technology
Inc.
MCP2551-I/SN
X1, X2
Abracon Corp.
ABM3B-20.000MHZ-B2-T
Note:
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
TABLE B-2:
Qty
5011
Reference
Description
Manufacturer
Part Number
Cable
3M/ESD
3365/10(300SF)
P2,P3
AMP/Tyco Electronics
1658621-1
P2,P3
Tyco Electronics/Amp
88450-2
P2,P3
Tyco Electronics/Amp
499252-5
DB9 Conn
A-DFF09LPIII/FP-R
Mini USB
Cable
KT143-3
Note:
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
DS51757A-page 22
DS51757A-page 23
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://support.microchip.com
Web Address:
www.microchip.com
India - Bangalore
Tel: 91-80-4182-8400
Fax: 91-80-4182-8422
India - New Delhi
Tel: 91-11-4160-8631
Fax: 91-11-4160-8632
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
India - Pune
Tel: 91-20-2566-1512
Fax: 91-20-2566-1513
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Japan - Yokohama
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
Kokomo
Kokomo, IN
Tel: 765-864-8360
Fax: 765-864-8387
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
Santa Clara
Santa Clara, CA
Tel: 408-961-6444
Fax: 408-961-6445
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Beijing
Tel: 86-10-8528-2100
Fax: 86-10-8528-2104
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
Korea - Daegu
Tel: 82-53-744-4301
Fax: 82-53-744-4302
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
China - Nanjing
Tel: 86-25-8473-2460
Fax: 86-25-8473-2470
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
Malaysia - Penang
Tel: 60-4-227-8870
Fax: 60-4-227-4068
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
China - Shenzhen
Tel: 86-755-8203-2660
Fax: 86-755-8203-1760
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
Taiwan - Kaohsiung
Tel: 886-7-536-4818
Fax: 886-7-536-4803
China - Xiamen
Tel: 86-592-2388138
Fax: 86-592-2388130
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
China - Xian
Tel: 86-29-8833-7252
Fax: 86-29-8833-7256
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
UK - Wokingham
Tel: 44-118-921-5869
Fax: 44-118-921-5820
China - Zhuhai
Tel: 86-756-3210040
Fax: 86-756-3210049
01/02/08
DS51757A-page 24