From ca2e3b8245dc3ebd1b80983c7329d8c712dc834f Mon Sep 17 00:00:00 2001 From: Adam Voss Date: Tue, 15 Aug 2017 11:14:42 -0500 Subject: [PATCH] Fix Markdown rendering on GitHub --- README.md | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index a67d22e..6f764ad 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ CAN BUS Shield
+ 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. - Implements CAN V2.0B at up to 1 Mb/s @@ -16,15 +17,13 @@ CAN-BUS is a common industrial bus because of its long travel distance, medium c -
-# Installation: +## Installation: git clone https://github.com/Seeed-Studio/CAN_BUS_Shield.git or download the zip. -
-# Usage: +## Usage: @@ -35,7 +34,7 @@ CAN_BUS_Shield/examples. -## 1. Set the BaudRate +### 1. Set the BaudRate This function is used to initialize the baudrate of the CAN Bus system. @@ -61,9 +60,7 @@ The available baudrates are listed as follows: #define CAN_1000KBPS 18 -
- -##2. Set Receive Mask and Filter +### 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 device. They are useful especially in a large network consisting of numerous nodes. @@ -80,8 +77,7 @@ We provide two functions for you to utilize these mask and filter registers. The -
-## 3. Check Receive +### 3. Check Receive The 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); @@ -90,8 +86,7 @@ The function will return 1 if a frame arrives, and 0 if nothing arrives. -
-## 4. Get CAN ID +### 4. Get CAN ID When some data arrives, you can use the following function to get the CAN ID of the "send" node. @@ -99,8 +94,7 @@ When some data arrives, you can use the following function to get the CAN ID of -
-## 5. Send Data +### 5. Send Data CAN.sendMsgBuf(INT32U id, INT8U ext, INT8U len, INT8U *buf); @@ -116,16 +110,15 @@ This is a function to send data onto the bus. In which: For example, In the 'send' example, we have: -
  
+```
 unsigned char stmp[8] = {0, 1, 2, 3, 4, 5, 6, 7};
 
 CAN.sendMsgBuf(0x00, 0, 8, stmp); //send out the message 'stmp' to the bus and tell other devices this is a standard frame from 0x00.
-
+``` -
-## 6. Receive Data +### 6. Receive Data The following function is used to receive data on the 'receive' node: @@ -137,8 +130,8 @@ Under the condition that masks and filters have been set, this function will onl **buf** is where you store the data. -
-## 7. Check additional flags + +### 7. Check additional flags When frame is received you may check whether it was remote request and whether it was an extended (29bit) frame. @@ -149,6 +142,7 @@ When frame is received you may check whether it was remote request and whether i
+ For more information, please refer to [wiki page](http://www.seeedstudio.com/wiki/CAN-BUS_Shield).