MCP2515 User Manual
MCP2515 User Manual
MCP2515
Development Kit
User’s Guide
• 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 Microchip's 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 microchip’s 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.
Chapter 1. Introduction
1.1 Introduction ..................................................................................... 1
1.2 Highlights ........................................................................................ 1
1.3 What the MCP2515 Development Kit Is ......................................... 1
1.4 Multiple Uses for the MCP2515 Development Kit ........................... 2
1.5 How the MCP2515 Development Kit Helps You ............................. 3
1.6 Host Computer System Requirements ........................................... 3
Chapter 2. Installation
2.1 Introduction ..................................................................................... 5
2.2 Highlights ........................................................................................ 5
2.3 MCP2515 Development Kit Components ....................................... 6
2.4 Installing the Hardware ................................................................... 7
2.5 Installing the Software .................................................................... 7
Chapter 3. Getting Started
3.1 Introduction ..................................................................................... 9
3.2 Highlights ........................................................................................ 9
3.3 Software Overview .......................................................................... 9
3.4 Starting the Program ..................................................................... 12
3.5 Selecting the LPT Port .................................................................. 12
3.6 Hardware Overview ...................................................................... 13
Chapter 4. The Software Templates
4.1 Introduction ................................................................................... 15
4.2 Highlights ...................................................................................... 15
4.3 MCP2515 Register View Template ............................................... 15
4.4 Basic Template ............................................................................. 22
4.5 Menus ........................................................................................... 27
Chapter 1. Introduction
1.1 INTRODUCTION
This user's guide is written assuming some basic knowledge of the CAN protocol and
the terms defined by the CAN protocol. Those users who do not have this basic CAN
knowledge are encouraged to read Microchip's Application Note 713, “CAN Basics”
(DS00713), the MCP2515 data sheet (DS21801) and/or the Bosch™ GmbH CAN
specification, version 2.0. AN713 and the MCP2510 data sheet are available on
Microchip's web site at [Link].
1.2 HIGHLIGHTS
This chapter discusses:
• What the MCP2515 Development Kit is
• Multiple uses for the MCP2515 Development Kit
• How the MCP2515 Development Kit helps you
• Host computer system requirements
Chapter 2. Installation
2.1 INTRODUCTION
This chapter describes the procedure for installing the MCP2515 Development Kit.
2.2 HIGHLIGHTS
The items discussed in this chapter are:
• MCP2515 Development Kit components
• Installing the hardware
• Installing the software
2.4.2 Optional
There are two DB9 connectors:
One is a RS-232 interface for connecting to the PC as applications permit. This con-
nector is connected to node 1 and is typically used during PICmicro MCU development
to assist the user designing and/or debugging (e.g., it may be used to print register
and/or receive buffer contents to the PC screen for debugging).
The other connector is a CAN bus interface that can be used to connect the board to
an existing CAN bus. The pinout for this connector follows the defacto standard
recommended pinout of pin 7 = CANH and pin 2 = CANL.
1
Not Connected
6
Not Connected
2
CANL
7
CANH
3
In Use
8
Not Connected
4
In Use
9
In Use
5
Not Connected
3.2 HIGHLIGHTS
The items discussed in this chapter are:
• Software Overview
• Starting the Program
• Selecting the LPT Port
• Hardware Overview
Message
Filter
Status
Physical Layer
Window
Configuration
Receive
Transmit
Output
Window
Bus
Status
Message Format
Timed
Transmissions
History
List
MCP2515
MCP2515
MCU
Prototyping Area
FIGURE 3-5:
Transceiver Transceiver
Prototyping Prototyping
Area Area
DS51416A-page 14
CAN Connector
M MCP2515 DEVELOPMENT KIT
USER’S GUIDE
4.2 HIGHLIGHTS
The items discussed in this chapter are:
• MCP2515 Register View template
• Basic template
• Menus
Message
Filter
Status
Physical Layer
Window
Configuration
Receive
Transmit
Note: The masks and filters can be written only when the MCP2515 is
in Configuration mode.
Note: The CNF registers can be modified only when the MCP2515 is in
Configuration mode and will display shaded in all other modes of
operation.
[Link] TXRTSCTRL
This register configures the RTS pins (TXnRTS) as either request-to-send or as digital
inputs. The pin values are displayed in the register if configured as digital inputs.
[Link] BFPCTRL
This register configures the receive buffer full pins (RXnBF) as buffer full interrupts or
digital outputs. The value of the pins are displayed if configured as digital outputs.
[Link] CANINTF
CANINTF is the flag register for the eight sources of interrupts.
[Link] CANINTE
This register is the interrupt-enable for the eight interrupt sources. Enabled interrupts
are mapped to the INT pin.
[Link] CANCTRL
CANCTRL sets the modes of operation and the clock out enable and prescaler
(CLKOUT pin).
Note: Selecting Messages > MCP2515 Eval Board > Receive Buffer (or Transmit
Buffer) while holding down the shift key will open up duplicate windows so
multiple transmit or receive windows can be monitored simultaneously.
This template would typically be used as a simple bus monitor for evaluating the
MCP2515 on a CAN bus or in assisting development by monitoring how node 1 is
operating.
Output
Window
Bus
Status
Message Format
Timed
Transmissions
History
List
Note: The History List window works in conjunction with the Timed
Transmission window. Messages can be retransmitted once or
continually at defined intervals. See the Timed Transmission description
for more details.
4.5 MENUS
The menu items, for the most part, are identical in both the Register and Basic template
views. The few exceptions will be indicated in the descriptions below. Only two menu
items will be discussed in this section, as the others are self-explanatory.
Note: The oscillator frequency must be set in software to match the hardware
so the software can configure the bit timing registers correctly. The
formulas for bit timing contain an oscillator frequency.
5.2 HIGHLIGHTS
The items discussed in this chapter are:
• Node Configurations
• Oscillator Routing
• The Jumper Settings
Note: All jumper locations are shorted by default, unless otherwise specified.
The traces must be cut if the installed jumpers are to function properly.
Warning: Care must be taken when installing more than one oscillator. The jumper
settings must be correct or contention will occur at some or all of the
device oscillator inputs. This could have catastrophic results.
It is possible for each node and the microcontrollers to have their own oscillator by
configuring the jumpers as described later in this chapter.
Note: All jumpers are shorted with a copper trace (bottom-side of board) by
default and require cutting to open. Jumper pins can be soldered in the
holes to allow jumper connectors to be used.
.
TABLE 5-1: JUMPER DESCRIPTION
Jumper Description
JP1 Connects LEDs for Node 0
JP2 Connects Node0 MCP2551 RS pin to external bus (DB9 J4)†
JP3 Connects Node0 MCP2551 CANH pin to external bus (DB9 J4)†
JP4 Connects Node0 MCP2551 CANL pin to external bus (DB9 J4)†
JP5 Connects Node0 MCP2551 RXD pin to external bus (DB9 J4)†
JP6 Connects oscillator O2 to oscillator O1
JP7 Connects LEDs for Node 1
JP8 Connects oscillator O3 to oscillator O1
JP9 Connects oscillator O3 to oscillator O2
JP10 Connects Node 1 MCP2515 INT pin to PICmicro® MCU RB0 pin
JP11 Connects Node 1 MCP2551 R S pin to external bus (DB9 J4)†
JP12 Connects Node 1 MCP2551 CANH pin to external bus (DB9 J4)†
JP13 Connects Node 1 MCP2551 CANL pin to external bus (DB9 J4)†
JP14 Connects Node 1 MCP2551 RXD pin to external bus (DB9 J4)†
JP15 Connects 120 ohm terminating resister to the CAN bus
† These jumpers are provided to disconnect the MCP2551 device from the
bus so other physical layers can be used, including a third-party daughter
card available from Kvaser AB.
JP1
JP3
JP5
JP2
JP4
JP6
JP7
JP10
JP9
JP8
JP14
JP13
JP12
JP11
JP15
Appendix A. Schematics
A.1 INTRODUCTION
This section contains schematics, which are also available on the included CD-ROM.
1
3
5
7
1
3
5
7
PIC_SPIO
1
3
5
7
1
3
5
7
1
3
5
7
1
3
5
7
RN2 RN6 PIC_CLK PIC_CLK
RN4 RN1 RN7 RN5
RN4S_1 RN4S_1
PC_OSC PC_OSC
RN4S_1 RN4S_1 470R RN4S_1 RN4S_1 470R
4k7 470R 4k7 470R
PIC_INT PIC_INT
2
4
6
8
2
4
6
8
GND GND
2
4
6
8
2
4
6
8
2
4
6
8
2
4
6
8
DS51416A-page 34
+5V +5V
H2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
PC_TXC 1 2 +5V
3 1 2 4 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16
PC_RXC 3 4 PC_RES
PC_CLK 5 6 PC_SPICS
5 6
PC_RTS0 7 8 PC_SPII
9 7 8 10
PC_RTS1 PC_SPIO
SCHEMATIC
9 10
11 12
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
PC_RTS2 PC_SPICLK
11 12
RED
RED
RED
RED
RED
RED
PC_OSCO 13 14 PC_INT
15 13 14 16
PC_OSC PC_RXBF0
GREEN
GREEN
GREEN
GREEN
GREEN
GREEN
GREEN
GREEN
GREEN
GREEN
15 16
GND 17 18 PC_RXBF1
19 17 18 20
19 20
HEADER 10X2
U1 U7
PC_TXC 1 18 +5V PIC_TXC 1 18 +5V
2 TXCAN VCC 17 H5 2 TXCAN VCC 17
PC_RXC RXCAN RESET PC_RES PIC_RXC RXCAN RESET PIC_RES
RN3 PC_CLK 3 16 PC_SPICS PIC_TXC 1 2 +5V PIC_CLK 3 16 PIC_SPICS
CLKOUT CS 1 2 CLKOUT CS
EPC_RTS0 2 1 PC_RTS0 4 15 PC_SPII PIC_RXC 3 4 PIC_RES PIC_RTS0 4 15 PIC_SPII
4 3 5 TX0RTS SO 14 C2 5 3 4 6 5 TX0RTS SO 14 C10
EPC_RTS1 PC_RTS1 PC_SPIO PIC_CLK PIC_SPICS PIC_RTS1 PIC_SPIO
1
1
6 5 6 TX1RTS SI 13 7 5 6 8 6 TX1RTS SI 13
EPC_RTS2 PC_RTS2 PC_SPICLK PIC_RTS0 PIC_SPII PIC_RTS2 PIC_SPICLK
8 7 7 TX2RTS SCK 12 9 7 8 10 7 TX2RTS SCK 12 0.1uF
PC_OSCO OSC2 INT PC_INT 0.1uF PIC_RTS1
9 10 PIC_SPIO PIC_OSCO OSC2 INT PIC_INT
8 11 11 12 8 11
2
2
1
+5V IQXO-350C C7 IQXO-350C
1
0.1uF 16MHz NF
0.1uF
1
CCAX
2
R4 CCAX
2
1*5M
4k7
1
S3 S2 S1
R3 T1 S6 S5 S4
1 4 1 4 1 4
PC_INT 1 2 2 1 4 1 4 1 4
BC847B 2 3 2 3 2 3
1*5M 2 3 2 3 2 3
4k7
3
SKHRAA SKHRAA SKHRAA
SKHRAA SKHRAA SKHRAA
GND
GND
J1
1
14
2 W1 W3
EPC_SPIO
15 1 8 8 1
3 GND IO0 IO0 GND
EPC_SPICLK 2 9 9 2
16 3 +5V IO1 10 R8 10 IO1 +5V 3
TXC IO2 JP15 IO2 TXC
4 EPC_SPICS 4 11 1 2 1 2 11 4
17 RXC IO3 12 12 IO3 RXC
5 IO4 1*5M JMP2 IO4
EPC_RES
18 120R
6 EPC_RTS0
19 5 5
7 CANH 6 6 CANH
EPC_RTS1
20 CANL 7 7 CANL
8 EPC_RTS2 U3 GNDO GNDO
21 18 2 PC_SPIO DRVCAN_AREA
B1 A1
9 17 3 PC_SPICLK DRVCAN_AREA
22 16 B2 A2 4
B3 A3 PC_SPICS W2
10 15 5 PC_RES W4
B4 A4
23 14 6 GND 1 13 13 1 GND
11 13 B5 A5 7 2 GND1 IO1 14 14 IO1 GND1 2
B6 A6 +5V VCC1 IO2 IO2 VCC1 +5V
24 PC_SPII 12 8 PC_TXC 3 15 15 3 PIC_TXC
B7 A7 CTX IO3 IO3 CTX
MCP2515 Development Kit User’s Guide
1
74HCT245 POW 9 9 POW
0.1uF CANH CANH
10 10 NOTES:
CANL 11 11 CANL
2
CCAX SD2 12 12 SD2 DEVICE NAMES/NUMBERS SHOWN HERE ARE FOR
This schematic is available on the included CD-ROM ([Link]).
GND4 GND4
REFERENCE ONLY AND MAY DIFFER FROM ACTUAL
JP5
2
2
PIGGY_CAN NUMBER.
PIGGY_CAN
ACTUAL NUMBERS ARE FOUND IN THE BOM FOR
JP14
EPC_INT THIS ASSEMBLY.
JMP2
JMP2 H2 AND H5 ARE LOCATIONS FOR CONNECTORS
1
1
EPC_SPII
JP4 JP13JMP2 OR DOUBLE ROW TERMINAL STRIP WITH .025
U2 1 2 2 1 U8
SQUARE POST.
4 6 6 4
1 RXD CANL 7 JP3 JP12JMP2 7 CANL RXD 1 THERE IS LOCATIONS FOR 2 PIN SHORTING
TXD CANH CANH TXD
1 JMP2 2 2 1 SHUNTS JP1 TO JP7 AND JP11 TO JP15
GND 2 5 5 2 GND BUT THEY ARE NOT MOUNTED.
GND REF JP2 JP11JMP2 REF GND
+5V 3 8 8 3 +5V THEY ARE ALL SHORTED BY DEFAULT BY A
VCC RS RS VCC
1 JMP2 2 2 1
SHORT CIRCUIT BETWEEN THE TWO PINS ON
MCP2551 MCP2551 THE SOLDER SIDE OF THE BOARD.
C3 JMP2
1
O1.
CCAX
2
CCAX
J4
DSUB 9 P PCB 90
FOOT FOOT
Note:
M4 M2
FOOT FOOT
+5V
1
R1
1
R5
1
J2 U4
C9
2
1*5M H1
1 3 1*5M GND +5V 0.1uF R6
1
CENTER IN 10k 1 2
2 1 470R C12 CCAX 1 2
2
2
VLED RA3
OUTER 3 2 OUT RA4 3 4 RA5 0.1uF U5
1
OUT_IN GND 5 6 CCAX 1*5M
2
RB0 7 8 RB1
R2 RB2 RB3 1 16 +5V 100R
1
LM7805 9 10 C1+ VCC
POWCON C6 RB4 RB5 2 15 GND J3
1
C5 + D17 11 12 V+ GND
RB6 RB7 3 14 RS232_TX 5
1
+ 1uF 13 14 4 C1- T1OUT 13 RS232_RX 9
2
1*5M C2+ R1IN
1uF 5 12 4
2
CTAN 330R HEADER 7X2 C2- R1OUT
RX
6 11 8
2
TX
1
CTAN V- T1IN
GREEN C14 7 10 3
2
T2OUT T2IN
2
GND 6
1
1
MAX232A
C13
1
1
2
CCAX
2
1
R10
2
1*5M
4k7
U6
1 8
2
1*5M PIC_MCS +5V
2 CS VCC 7
4k7 PIC_SPII RC0
S7 R9 3 SO HOLD 6
+5V PIC_SPICLK
1 4 1 2 4 WP SCK 5
RES GND PIC_SPIO
VSS SI
2 3 1*5M 25LC640
C19 470R
1
SKHRAA 0.1uF C15
2 1
2
CCAX
CCAX
GND 0.1uF
U11 GND
GND
+5V 11
32 VCC1 8 RE0 +5V +5V
VCC2 RE0
GND 9 RE1
H4 1 RE1 10
RES RE2 PIC_SPICS PIC_SPICS
GND MCLR RE2
1 2 +5V
1
R12 1 2
RA0 3 4 RB0 RA0 2 19 RD0 PIC_SPICLK PIC_SPICLK
5 3 4 6 H6 3 RA0 RD0 20
RA1 RB1 RA1 RD1
5 6 RA1 RD1
RA2 7 8 RB2 1 GND RA2 4 21 RD2 PIC_SPII PIC_SPII
9 7 8 10 1 2 5 RA2 RD2 22
RA3 RB3 RE0 RA3 RD3
R11 RA4 9 10 2 RA3 RD3
11 12 RB4 3 RE1 RA4 6 27 RD4 PIC_SPIO
PIC_SPIO
11 12 3 RA4 RD4
3 1 2 RA0 RA5 13 14 RB5 4 RE2 RA5 7 28 RD5
15 13 14 16 4 5 RA5 RD5 29
RB6 RES RD6 PIC_CLK PIC_CLK
1*5M 15 16 5 RD6
17 18 RB7 6 +5V 30 RD7
470R 19 17 18 20 6 RD7
GND +5V PC_OSC PC_OSC
19 20 RB0 33 15 RC0
LIST-1M-6P RB0 RC0 JP10
HEADER 10X2 RB1 34 16 PIC_MCS RB0 1 2 PIC_INT
35 RB1 RC1 17
2
RB2 PIC_SPICS JMP2
POT 36 RB2 RC2 18
RB3 PIC_SPICLK
RB3 RC3 J21 DEFAULT CLOSED?
RB4 37 23 PIC_SPII
+5V C18 RB5 38 RB4 RC4 24 PIC_SPIO
1
39 RB5 RC5 25
RB6 TX
RB6 RC6
0.1uF RB7 40 26 RX
RB7 RC7
2
CCAX 13
12 OSC1
31 GND1 14
GND
GND2 OSC2
PIC16C64
PICOSC
JP8
PC_OSC 1 2 NOTE J3 DEFAULT CLOSED
JP9 JMP2
PIC_CLK 1 2
U10
U9 JMP2
+5V 20
17 14 VCC
RA0 +5V
18 RA0 VCC 1
RA1 RES
1 RA1 MCLR
RA2
RA3 2 RA2 C16 C17 RA0 2 O3
1
1
3 RA3 3 RA0 1 4
RA4 RA1 +5V
TCK0 RA1 NC VCC
RES 4 0.1uF 0.1uF RA2 4
MCLR 5 RA2 2 3
2
2
RA3 GND
5 CCAX CCAX 6 RA3 GND CLK
GND RA4
GND RA5 RA4
7 IQXO-350C
6 RA5
RB0
7 RB0 21 11
RB1 RB0 RC0
8 RB1 22 RB0 RC0 12
RB2 RB1 PIC_MCS
9 RB2 23 RB1 RC1 13
RB3 RB2 PIC_SPICS
RB4 10 RB3 RB3 24 RB2 RC2 14 PIC_SPICLK H7
11 RB4 25 RB3 RC3 15 1 2
RB5 RB4 PIC_SPII GND +5V NOTES:
12 RB5 16 26 RB4 RC4 16 3 1 2 4
RB6 RB5 PIC_SPIO RC0 RD0
This schematic is available on the included CD-ROM ([Link]).
13 RB6 OSC1 15 27 RB5 RC5 17 5 3 4 6 DEVICE NAMES/NUMBERS SHOWN HERE ARE FOR
RB7 RB6 TX PIC_MCS RD1
RB7 OSC2 28 RB6 RC6 18 7 5 6 8
RB7 RX PIC_SPICS RD2 REFERENCE ONLY AND MAY DIFFER FROM ACTUAL
RB7 RC7 PIC_SPICLK 7 8
PIC16C711 9 10 RD3 NUMBER.
8 9 11 9 10 12
PIC_SPII RD4 ACTUAL NUMBERS ARE FOUND IN THE BOM FOR
19 GND1 OSC1 10 13 11 12 14
GND PIC_SPIO RD5
GND2 OSC2 13 14 THIS ASSEMBLY.
TX 15 16 RD6
17 15 16 18 H3, H4 AND H7 ARE LOCATIONS FOR CONNECTORS OR
PIC16C63 RX RD7
H3 GND 19 17 18 20 +5V DOUBLE ROW TERMINAL STRIP WITH .025 SQUARE POST.
1 2 19 20
RB6 RC0
3 1 2 4 H1 AND H6 ARE LOCATIONS FOR DOUBLE AND SINGLE
RB1 PIC_MCS HEADER 10X2
5 3 4 6
RB2 PIC_SPICS ROW TERMINAL STRIP WITH .025 SQUARE POST.
7 5 6 8
RB3 PIC_SPICLK H1 AS CONNECTOR TO LCD DISPLAY.
RB4 7 8
9 10 PIC_SPII
11 9 10 12 W5 THERE IS LOCATIONS FOR 2 PIN SHORTING SHUNTS
RB5 PIC_SPIO
13 11 12 14
RA3 TX JJP8 TO JP10 BUT THEY ARE NOT MOUNTED.
13 14
RA2 15 16 RX GND 2 3 GND JP8 AND JP10 ARE SHORTED BY DEFAULT BY A
15 16 6 GND2 GND3 7
+5V +5V SHORT CIRCUIT BETWEEN THE TWO PINS ON THE
VCC2 VCC3
HEADER 8X2 SOLDER SIDE OF THE BOARD.
WRAP_AREA
DS51416A-page 35
Schematics
MCP2515 Development Kit User’s Guide
NOTES:
B.2 FAQS
1. Why doesn’t the development tool successfully communicate on an
external bus?
There are several possible reasons why this is the case. The following are the
most common problems: