M MCP250XX Development Kit User’s Guide 2004 Microchip Technology Inc.
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.
M MCP250XX USER’S GUIDE Table of Contents Preface ............................................................................................................................ 1 Chapter 1. Product Overview and Installation 1.1 1.2 1.3 1.4 1.5 1.6 1.7 Introduction and Highlights ........................................................................ 5 What is the MCP250XX Development Kit? ............................................... 5 System Requirements ................................................
MCP250XX User’s Guide Appendix A. Schematics and Layouts A.1 A.2 A.3 A.4 A.5 A.6 A.7 Introduction ............................................................................................. 39 VPP Step-up Regulator ........................................................................... 40 Clock and Data for Programming ........................................................... 41 PC Node .................................................................................................
M MCP250XX USER’S GUIDE Preface INTRODUCTION AND HIGHLIGHTS This section provides general information that will be useful to know before using the MCP250XX Development Kit and touches on the following topics: • • • • • About This Guide Recommended Reading Troubleshooting The Microchip Internet Web Site Customer Support ABOUT THIS GUIDE Document Layout The User’s Guide layout is as follows: • Chapter 1: Product Overview and Installation – details the hardware and software components and discusses install
MCP250XX User’s Guide RECOMMENDED READING For more information regarding the MCP250XX devices and other CAN related topics, the following are recommended reading. The following data sheets may be downloaded from our internet web site at www.microchip.com. MCP2502X/2505X Data Sheet (DS21664) This data sheet provides detailed information regarding the MCP250XX CAN I/O Expanders.
Preface THE MICROCHIP INTERNET WEB SITE Microchip provides easy access to our documentation and on-line support through our World Wide Web Site at www.microchip.com. You can download files from the web site or from our FTP site at ftp://ftp.microchip.com.
MCP250XX User’s Guide NOTES: DS51266C-page 4 2004 Microchip Technology Inc.
M MCP250XX USER’S GUIDE Chapter 1. Product Overview and Installation 1.1 INTRODUCTION AND HIGHLIGHTS This chapter provides an overview of the MCP250XX Development Kit and covers the following topics: • • • • • • 1.
MCP250XX User’s Guide 1.4 MCP250XX DEVELOPMENT KIT COMPONENTS The MCP250XX Development Kit contains: • • • • • • • • MCP250XX Development Board MCP250XX Development Kit User’s Guide MCP250XX Development Kit CD-ROM with demo and programming software Parallel port cable 9V DC power supply adapter Warranty/Registration card Three MCP25020 CAN I/O Expanders Three MCP25050 CAN I/O Expanders FIGURE 1-1: DS51266C-page 6 MCP250XX DEVELOPMENT KIT 2004 Microchip Technology Inc.
Product Overview and Installation 1.5 MCP2515 COMPONENTS The MCP2515 consists of four main parts (see Figure 1-4): 1. 2. 3. 4. PC Node Node A Node B Device Programmer 1.5.1 PC Node The PC Node is the master node for the demonstration program that controls Node B. This node contains a MCP2515 Stand-Alone CAN Controller that is controlled by the host PC via a custom parallel port interface. Note: 1.5.
MCP250XX User’s Guide 1.5.3 Node B Node B is the slave node for the demonstration program. Analog inputs (potentiometers), PWM outputs (piezo buzzer and incandescent lamp) and digital inputs (push buttons) are all connected to the MCP25050 device. It responds to inputs and CAN messages to demonstrate device functionality. See Figure 1-3 for the pinout description.
Product Overview and Installation 1.5.4 Device Programmer The Device Programmer module is used with PC software to configure the user-defined defaults. FIGURE 1-4: MCP250XX DEVELOPMENT BOARD DB25 J1 U3 U2 L1 Y1 U6 PC NODE U15 Y2 Y3 NODE A DEVICE PROGRAMMER D2 D3 D4 D5 R17 R20 NODE B 100 100 J3 BZ1 J5 S1 U14 J4 GP4 1.5.5 GP5 GP6 Key Areas of the MCP2515 There are a few key areas on the board. Figure 1-4 illustrates these areas, while Table 1-1 details them.
MCP250XX User’s Guide 1.6 HARDWARE INSTALLATION 1.6.1 Connecting the DB25 Cable The included DB25 cable is a male-to-male configuration and plugs into the parallel port of the host PC. Figure 1-5 shows the pin configuration. 11 12 24 13 25 G N G N D D 23 D 10 22 G N G N G N D D D 9 21 D 8 20 D 7 19 G N 6 18 G N /C /C 5 17 G N 4 16 N /C N /C N 1.6.
Product Overview and Installation 1.7 SOFTWARE INSTALLATION Insert the MCP250XX Development Kit CD-ROM into the CD-ROM drive. 1.7.1 Auto-run Enabled If auto-run is enabled, the installation program will automatically start. Follow the instructions on the screen to install the software. 1.7.2 Auto-run Not Enabled If auto-run is not enabled: 1. Click the Start button and select Run. Enter d:\setup.exe (where d:\ is your CD-ROM drive). Click OK.
MCP250XX User’s Guide NOTES: DS51266C-page 12 2004 Microchip Technology Inc.
M MCP250XX USER’S GUIDE Chapter 2. MCP250XX Basic View Tutorial 2.1 INTRODUCTION This tutorial discusses the evaluation portion of the kit, details the demonstration software (Basic template), CAN system (PC Node and Node B) and covers the steps required to successfully run the demonstration network. The user defaults for Node B are preprogrammed at the factory. Therefore, no user default programming is necessary.
MCP250XX User’s Guide DS51266C-page 14 FIGURE 2-2: PC NODE BIT TIMING AND MODE FIGURE 2-3: BOARD STATUS 2004 Microchip Technology Inc.
MCP250XX Basic View Tutorial FIGURE 2-4: MESSAGE FORMAT WINDOW FIGURE 2-5: BUS MONITOR WINDOW 2004 Microchip Technology Inc.
MCP250XX User’s Guide FIGURE 2-6: DS51266C-page 16 MCP250XX DEMONSTRATION WINDOW 2004 Microchip Technology Inc.
MCP250XX Basic View Tutorial 2.3.1 Starting the Program 1. Start the software by any of the following: • From the “Start” menu, select “Programs > Microchip > CANKing” • Select “C:\Program Files\Microchip\Mcan\WC32.exe” • Double-click on the desktop icon for the MCP250XX Development Kit 2. A notice will appear warning of the potential undesired results if connecting to an existing CAN bus (Figure 2-7). Select “OK, I know what I am doing”. 3.
MCP250XX User’s Guide DS51266C-page 18 FIGURE 2-7: WARNING ON START-UP FIGURE 2-8: CHANGING NUMERIC BASE FOR BUS MONITOR 2004 Microchip Technology Inc.
MCP250XX Basic View Tutorial FIGURE 2-9: OPEN DIALOG FIGURE 2-10: TEMPLATE DIALOG 2004 Microchip Technology Inc.
MCP250XX User’s Guide 2.4 ESTABLISHING COMMUNICATIONS When the software is started from a new template (as it must be the first time it is started), some steps must be taken to insure proper operation and to set up the software defaults. These defaults can be saved by saving the template as a project and opening the project in subsequent sessions. 2.4.1 Configure Parallel Port The board status (including parallel port address and connection status) is indicated in the Board Status window (Figure 2-3).
MCP250XX Basic View Tutorial 2.4.3 Configuring the Output Window Display Format The Output (Bus Monitor) window (Figure 2-5) can display the CAN messages in five different ways: 1. Fixed Positions – Messages with the same identifier maintain a fixed position (slot) within the window. The data and time-stamp update normally. To turn fixed positions on/off, right-click the mouse while the cursor is over the Output window area and select “Fixed Positions”. 2.
MCP250XX User’s Guide 2.5 EXPLAINING THE CAN MESSAGES At this point, the two nodes (PC Node and Node B) should be communicating normally and a message should be showing up in the Output window (Figure 2-5) at regular intervals. Pushing GP4, GP5 or GP6 causes other messages to show up in the Output window, with the status being reflected graphically in the Demo window. Turning the potentiometers will cause the data fields to change.
M MCP250XX USER’S GUIDE Chapter 3. MCP250XX Register View Tutorial 3.1 INTRODUCTION A few topics covered in this chapter were also covered in the last chapter detailing the Basic template tutorial. To avoid duplication, the appropriate sections of Chapter 2 “MCP250XX Basic View Tutorial” will be referenced. This chapter details the demonstration software (Register template) and CAN system (PC Node and Node B).
MCP250XX User’s Guide DS51266C-page 24 FIGURE 3-1: MCP250XX FILTERS FIGURE 3-2: MCP250XX ERROR STATES 2004 Microchip Technology Inc.
MCP250XX Register View Tutorial FIGURE 3-3: 2004 Microchip Technology Inc.
MCP250XX User’s Guide FIGURE 3-4: MCP250XX COMMAND MESSAGES 3.3.1 Starting the Program Because the start procedures are the same as in Section 2.3.1 “Starting the Program”, there are references to figures in Chapter 2 “MCP250XX Basic View Tutorial” in this section. 1. Start the software by any of the following: • From the “Start” menu, select “Programs > Microchip > CANKing” • Or select “C:\Program Files\Microchip\Mcan\WC32.exe” • Or double-click on the desktop icon for the MCP250XX Development Kit 2.
MCP250XX Register View Tutorial 3.3.2 Setting the Numeric Base for Bus Monitor Window If the Select Formatters window is not visible, select it from the View menu. Highlight (do not uncheck) “Standard Text Format” in the Select Formatters window. Click Properties and check the desired numeric base (see Figure 2-8). A few other items must be addressed before proper communication can occur, as discussed in the next section. 3.
MCP250XX User’s Guide 3.5.3 MCP250XX Error States The current Receive and Transmit Error Counters (REC and TEC) can be read, as can the EFLG register. The is the same as the “Read CAN Error” Information Request Message (IRM). 3.5.4 MCP250XX Physical Layer The bit timing (CNF registers) cannot be changed from the default values. However, these registers can be read and displayed along with the parsed prescaler and T Q settings. 3.5.
M MCP250XX USER’S GUIDE Chapter 4. Programming the MCP250XX User Defaults 4.1 INTRODUCTION The user memory for MCP250XX devices is initially blank when shipped from the factory. The user must program the user memory with user-defined defaults. There are three methods for programming the user memory. 1. Using MPLAB® IDE with the PRO MATE® II device programmer and the MCP250XX socket module. 2. Using the device programmer circuit on the MCP2515 with the programming software. 3.
MCP250XX User’s Guide FIGURE 4-1: DEVICE PROGRAMMER DIAGRAM To Host PC MCP250XX 1 14 2 13 3 12 4 11 5 10 6 9 7 8 Step-up Regulator Circuit 4.3.2 PC Software The programming circuitry is controlled by a host PC application through the DB25 connector. The PC application is a graphical interface that allows the device to be quickly and easily configured with the user defaults.
Programming the MCP250XX User Defaults FIGURE 4-2: PROGRAMMER SOFTWARE MAIN SCREEN FIGURE 4-3: USER MEMORY Screen Capture 2004 Microchip Technology Inc.
MCP250XX User’s Guide DS51266C-page 32 FIGURE 4-4: CAN MODULE FIGURE 4-5: PWM MODULES 2004 Microchip Technology Inc.
Programming the MCP250XX User Defaults FIGURE 4-6: A/D MODULE FIGURE 4-7: GPIO MODULE 2004 Microchip Technology Inc.
MCP250XX User’s Guide 4.4 PROGRAMMING VIA THE ICSP™ CONNECTOR There is an ICSP connector on Node A that can be used to program the user defaults with an external programmer. To insure successful programming, the MCP250XX Programming Specification (DS20072) must be adhered to. The JP4 jumper allows the MCP250XX socket to be isolated from board power so the programmer does not have to drive the board while programming.
M MCP250XX USER’S GUIDE Chapter 5. Other Capabilities of the Development Board 5.1 INTRODUCTION The capabilities and configurations of the MCP2515 are discussed in this chapter. 5.2 HIGHLIGHTS This chapter discusses: • Oscillator Configurations • Node A Prototyping Area and Header Pinout • External CAN Bus Connections 5.3 OSCILLATOR CONFIGURATIONS The MCP2515 is configured, by default, to use a common oscillator for all three CAN nodes. While there are three oscillator sockets, only one is populated.
MCP250XX User’s Guide 5.4 NODE A PROTOTYPING AREA AND HEADER PINOUT In addition to ICSP capabilities, Node A can also be used for prototyping custom MCP250XX configurations. This node has a prototyping area as well as a header that can be used for probing the MCP250XX pinout. Figure 5-2 shows the layout of the header. Note: JP4 must be shorted to enable board power to the MCP250XX socket.
Other Capabilities of the Development Board 5.5 EXTERNAL BUS CONNECTIONS The MCP2515 can be connected to an external CAN bus through the DB9(s). The DB9 pinout is the same as the defacto standard, as recommended by the CAN in Automation (CiA) group. At a minimum, CANH (pin 7) and CANL (pin 2) must be connected. However, CAN_GND (pin 3) and CAN_V+ (pin 9) may also be connected to supply power to and from another board. Table 5-1 and Figure 5-3 show the pinout and connector, respectively.
MCP250XX User’s Guide NOTES: DS51266C-page 38 2004 Microchip Technology Inc.
M MCP250XX USER’S GUIDE Appendix A. Schematics and Layouts A.1 INTRODUCTION This appendix contains the schematics and layouts for the MCP250XX Development Kit. Diagrams included in this appendix include: • • • • • • VPP Step-Up Regulator circuit Programming Clock/Data Logic circuit PC Interface/CAN Node circuit CAN Bus Interface circuit Node A/Node B circuit Capacitors circuit 2004 Microchip Technology Inc.
GND 11 GND 15 12 4 CAP VREF 8 OAOUT SWC 16 3 SWE DRVC VIN 13 14 SENSE LM78S40 1 CATHODE 2 ANODE 7 OAIN– 6 OAIN+ 5 OAV COMPIN– 9 COMPIN+ 10 C7 GND .25 - 1% R1 R3 680 pF L1 GND {Value} A D1 K R4 100 µF - 16V 6.3 MM DS51266C-page 40 23.7K GND C3 2.21K - 1% GND .1 µF C4 GND GND .1 µF C5 µ GND .1 µF C6 VCC NV PP _ON µ NV PP _ON Q1 100 R2 Q3 PFET – MTSF2P02 VDD Q2 PFET – MTSF2P02 V PP FIGURE A-1: R7 A.
A.3 CLOCK AND DATA FOR PROGRAMMING FIGURE A-2: PROGRAMMING CLOCK/DATA LOGIC CIRCUIT VCC VCC VDD VDD VPP SN74AHCT1G126 VSS SN74AHCT1G126 2004 Microchip Technology Inc.
MCP250XX User’s Guide A.4 PC NODE PC INTERFACE/CAN NODE CIRCUIT VSS MCP2515 VCC VCC VCC .1 µF .1 µF FIGURE A-3: DS51266C-page 42 2004 Microchip Technology Inc.
A.5 CAN PHYSICAL LAYER CAN BUS INTERFACE CIRCUIT 2004 Microchip Technology Inc.
MCP250XX User’s Guide A.6 NODE A AND NODE B NODE A/NODE B CIRCUIT DS51266C-page 44 VCC 2.2 µF VCC VCC MCP25050 VSS VDD VCC VCC VCC VCC VCC VCC VCC VCC VDD MCP25050 VSS VCC ™ VCC FIGURE A-5: 2004 Microchip Technology Inc.
A.7 CAPS PAGE FIGURE A-6: CAPACITORS CIRCUIT VCC VCC VCC .1 µF VCC .1 µF VCC .1 µF 2004 Microchip Technology Inc. VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF VCC .1 µF .
MCP250XX User’s Guide NOTES: DS51266C-page 46 2004 Microchip Technology Inc.
M MCP250XX USER’S GUIDE Index B R Basic View Tutorial: Setting the Numeric Base ................................. 17 Setting up the Basic Template .......................... 13 Starting the Program......................................... 17 Board Components .................................................... 7 Recommended Reading ............................................ 2 Register Template Windows .................................... 27 Register View Tutorial: Setting the Numeric Base ...........
M WORLDWIDE SALES AND SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: 480-792-7627 Web Address: http://www.microchip.com China - Beijing Korea Unit 706B Wan Tai Bei Hai Bldg. No. 6 Chaoyangmen Bei Str. Beijing, 100027, China Tel: 86-10-85282100 Fax: 86-10-85282104 168-1, Youngbo Bldg.