SeeedStudio CAN-BUS Shield V1.2 Скачать руководство пользователя страница 1

CAN-BUS Shield V1.2 

Introduction 

 

CAN-BUS

 is a common industrial bus because of its long travel distance, medium 

communication speed and high reliability. It is commonly found on modern machine 

tools and as an automotive diagnostic bus. 

This CAN-BUS Shield adopts 

MCP2515

 CAN Bus controller with SPI interface 

and 

MCP2551

CAN transceiver to give your Arduino/Seeeduino CAN-BUS capability. 

With an 

OBD-II

converter cable added on and the OBD-II library imported, you are 

ready to build an onboard diagnostic device or data logger. 

Version

 

This document applies to the following version of products: 

What’s new in CAN BUS Shield V1.2

 

Pads on the back of PCBA 

Change terminal 

resistor to 120 Ohm 

 

 

 

 

Содержание CAN-BUS Shield V1.2

Страница 1: ...N BUS Shield adopts MCP2515 CAN Bus controller with SPI interface and MCP2551CAN transceiver to give your Arduino Seeeduino CAN BUS capability With an OBD IIconverter cable added on and the OBD II library imported you are ready to build an onboard diagnostic device or data logger Version This document applies to the following version of products What s new in CAN BUS Shield V1 2 Pads on the back o...

Страница 2: ... and extended 29 bit data and remote frames Two receive buffers with prioritized message storage Industrial standard DB 9 connector LED indicators Note CAN BUS Shield Work well with Arduino UNO ATmega328 Arduino Mega ATmega1280 2560 as well as Arduino Leonardo ATmega32U4 Hardware Overview ...

Страница 3: ...a interrupt 4 Terminal CAN_H and CAN_L 5 Arduino UNO pin out 6 Serial Grove connector 7 I2C Grove connector 8 ICSP pins 9 IC MCP2551 a high speed can transceiver datasheet 10 IC MCP2515 stand alone CAN controller with SPI interface datasheet Warning When you use more than two CAN Bus Shield in one net you should think about the impedance You can just cut P1 in the PCB with a knife or just remove R...

Страница 4: ... pin FREE is available for the other usages DB9 OBDii Interface CS pin SPI_CS pin of V1 2 is default to D9 If you want to change it to D10 Step1 Take a look at the back of the PCBA you will find a pad named CS ...

Страница 5: ... Step2 Cut the wire that connect pad9 and the middle pad Step3 Solder the middle pad and pad 10 ...

Страница 6: ...needed Note For Arduino UNO Arduino Mega Arduino Leonardo and any others AVR based Arduino boards default is working Warning Be careful when you are going to change SPI pins it s easy to hear yourself or the PCBA Getting Started Here s a simple demo to show you how CAN BUS Shield works In this demo we need 2 piece of CAN BUS Shield as well as Arduino Seeeduino Note This demo is built under Arduino...

Страница 7: ...wires Shown as below images Note CAN_H to CAN_H CAN_L to CAN_L STEP3 Software Click on the below button to download the library Install the library to your Arduino IDE when it is downloaded Of of the node a node means Seeeduino CAN_BUS Shield act as master the other act as slaver The master will send data to slaver constantly ...

Страница 8: ...le File Examples CAN_BUS_Shield master send and upload to the master Open the receive_check example File Examples CAN_BUS_Shield master receive_check and upload to the slaver STEP4 View Result Open the Serial Monitor of Arduino IDE slaver you will get the data sent from the master ...

Страница 9: ...BPS 7 define CAN_50KBPS 8 define CAN_80KBPS 9 define CAN_83K3BPS 10 define CAN_95KBPS 11 define CAN_100KBPS 12 define CAN_125KBPS 13 define CAN_200KBPS 14 define CAN_250KBPS 15 define CAN_500KBPS 16 define CAN_666kbps 17 define CAN_1000KBPS 18 2 Set Receive Mask and Filter There are 2 receive mask registers and 5 filter registers on the controller chip that guarantee you get data from the target d...

Страница 10: ...he MCP2515 can operate in either a polled mode where the software checks for a received frame or using additional pins to signal that a frame has been received or transmit completed Use the following function to poll for received frames INT8U MCP_CAN checkReceive void The function will return 1 if a frame arrives and 0 if nothing arrives 4 Get CAN ID When some data arrive you can use the following...

Страница 11: ... readMsgBuf unsigned char len unsigned char buf In conditions that masks and filters have been set This function can only get frames that meet the requirements of masks and filters len represents the data length buf is where you store the data Generate a New BaudRate We had provided many frequently used baud rate as below define CAN_5KBPS 1 define CAN_10KBPS 2 define CAN_20KBPS 3 define CAN_25KBPS...

Страница 12: ...to help you to calculate the baud rate you need Click here to download the software it s in Chinese but never mind it s easy to use Note This software support Windows system only If you can t open it please free to contact loovee seeed cc for help Open the software what you need to do is set the baud rate you want and do some simple setting then click calculate Then you will get some data cfg1 cfg...

Страница 13: ...d and NUM is a number you need to get a different from the other rates Open mcp_can cpp goto the function mcp2515_configRate at about line 190 then add some code case CAN_xxxKBPS cfg1 MCP_16MHz_xxxkBPS_CFG1 cfg2 MCP_16MHz_xxxkBPS_CFG2 cfg3 MCP_16MHz_xxxkBPS_CFG3 break Then you can use the baud rate you need And please give me a pull request at github when you use a new rate so I can add it to the ...

Страница 14: ...ay a car truck simulator with a real dashboard on your PC Me too I m trying to control a VW Polo 6R dashboard via CAN Bus with an Arduino Uno and a Seeed CAN Bus Shield Inspired by Silas Parker Thanks to Sepp and Is0 Mick for their great support ...

Отзывы: