<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Library for MCP2515</title>
		<link>http://forums.leaflabs.com/topic.php?id=1866</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:07:52 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1866" rel="self" type="application/rss+xml" />

		<item>
			<title>crenn on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866&amp;page=2#post-11413</link>
			<pubDate>Wed, 27 Jun 2012 09:11:13 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11413@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Just a note for this thread, I've ordered 2 MCP2515s from Microchip so I can see if I can get it working in a breadboard.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsgamermike on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866&amp;page=2#post-11258</link>
			<pubDate>Wed, 13 Jun 2012 06:56:44 +0000</pubDate>
			<dc:creator>dsgamermike</dc:creator>
			<guid isPermaLink="false">11258@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;The wires are colorful jumpers that come with the arudino. It's stranded with sold ends. They're pretty short. You are right regarding the 5v, you do need 5 volts to run the level converter. The (MCP2551). The MCP2515 will easily run off of 3v3 however. I'll mess with it some more today and see if there's anything I can figure out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866&amp;page=2#post-11245</link>
			<pubDate>Tue, 12 Jun 2012 21:20:49 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11245@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It will possibly have errors running on 5V as the logic levels are incompatible (It requires 0.7*Vcc to register a high, for 5V, this is 3.5V which the maple cannot provide). I've also heard that CAN must run on 5V (I'm not very experienced with CAN) so we may need to configure things so there is either a level convertor or the GPIO is set to be OUTPUT_OPEN_DRAIN with a pull-up resistor to the 5V rail. This does mean you can only use Spi(2) on the current Maple Range (including the Mini) due to those pins having 5V tolerance.&#60;br /&#62;
Another factor could be how the MCP2515 is connected to the Maple, if the wires are long, then there could be noise which is causing the communication to fail, sadly we can't test this as there does not seem to be a device ID we can read from the MCP2515. How long are the wires? If they're longer than about 5-10cm, then we should try decreasing the clock speed that we're accessing the MCP2515. Currently it is set to 9MHz, the arduino is accessing it at 8MHz.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsgamermike on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11235</link>
			<pubDate>Tue, 12 Jun 2012 16:46:07 +0000</pubDate>
			<dc:creator>dsgamermike</dc:creator>
			<guid isPermaLink="false">11235@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have tried with both 3v3 and 5v(5v only on Spi2). They both act the same way. I occasionally do get some bus errors when I press the reset button on the maple, so we're close.&#60;br /&#62;
I can tell you really quick that I have tried swapping MOSI and MISO, each time resetting the device.&#60;br /&#62;
I do have the maple mini @ 3v3 this is the pinout that follows.&#60;br /&#62;
SCK is connected to SCK (26).&#60;br /&#62;
SI is connected to MOSI (28).&#60;br /&#62;
SO is connected to MISO (27).&#60;br /&#62;
int is connected to pin 29&#60;br /&#62;
SS is connected to SS (25)&#60;br /&#62;
reset to reset.&#60;br /&#62;
vcc to vcc&#60;br /&#62;
gnd to gnd&#60;br /&#62;
The crystal and load caps are correctly positioned.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11233</link>
			<pubDate>Tue, 12 Jun 2012 07:28:57 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11233@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'll try to do an in depth look of what's happening soon. I'm busy for the next week or so doing some non-electronics stuff (including a short holiday starting Friday) but I should be around still on the forums.&#60;/p&#62;
&#60;p&#62;Would you happen to be running the MCP2515 off a 5V supply by chance? If so, can you run it off a 3.3v supply? One of the things I'm unsure about is if the Maple and MCP2515 is communicating correctly. Because of the lack of hardware on my side, I'm not sure if the problem is software or hardware. Do you have a connection diagram that you're using?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsgamermike on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11231</link>
			<pubDate>Tue, 12 Jun 2012 06:49:02 +0000</pubDate>
			<dc:creator>dsgamermike</dc:creator>
			<guid isPermaLink="false">11231@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You need to have all devices that are on the bus running at the same speed. In my case it's a 1 Meg/sec bus. The stock is 125kBps. I also have a 20Mhz crystal instead of the 16.&#60;br /&#62;
You change these parameters in the int baudRate=CAN.Init(125,16); function. My function looks like  int baudRate=CAN.Init(1000,20);
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11218</link>
			<pubDate>Tue, 12 Jun 2012 00:37:15 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11218@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;What do you set the CAN speed and crystal speed that you're using? The warning is generated from not initialising the BT value in the _init function. There are conditions where it could fail to give it a value (which is not good).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsgamermike on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11217</link>
			<pubDate>Mon, 11 Jun 2012 20:48:59 +0000</pubDate>
			<dc:creator>dsgamermike</dc:creator>
			<guid isPermaLink="false">11217@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Yes, with exception to changing the CS and INT pins, CAN speed and crystal speed.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11216</link>
			<pubDate>Mon, 11 Jun 2012 18:37:08 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11216@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I noted that late last night and I'll look into today. It's actually a warning but I'll see what I can find this afternoon. Are you using that exact sketch with your arduino?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsgamermike on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11215</link>
			<pubDate>Mon, 11 Jun 2012 15:45:03 +0000</pubDate>
			<dc:creator>dsgamermike</dc:creator>
			<guid isPermaLink="false">11215@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Crenn, thanks for your help. Unfortunately it still does not work. 1st off I get a compiling error, but it continues to compile. The error is:&#60;br /&#62;
libraries\MCP2515\MCP2515.cpp: In member function 'bool MCP2515::_init(int, byte, byte, bool)':&#60;br /&#62;
I have my resets tied together, changed it to SPI 2, changed my CS and INT pins. Changed the bus speed, but I still have no data.  I have tried swapping the SI and SO pins just to make sure, but no dice.&#60;br /&#62;
This circuit works when it's connect the the arudino, so I know that hardware is good. It will send and receive. I have a CANalyzer at my disposal to verify the data.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11205</link>
			<pubDate>Mon, 11 Jun 2012 09:51:56 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11205@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;dsgamermike, Give this a whirl:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.crennsmind.com/Code/Maple/Libraries/MCP2515/MCP2515.zip&#34; rel=&#34;nofollow&#34;&#62;http://www.crennsmind.com/Code/Maple/Libraries/MCP2515/MCP2515.zip&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Copy the &#34;MCP2515&#34; folder into the libraries folder of the MapleIDE and the sketch into a folder called &#34;MCP2515_driver&#34;.&#60;/p&#62;
&#60;p&#62;It's a near direct port of the library given here:&#60;br /&#62;
&#60;a href=&#34;http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1289195675&#34; rel=&#34;nofollow&#34;&#62;http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1289195675&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The primary difference is a pointer to the Hardware SPI interface that you wish to use is required (a reference would work just as well). I also added in a function that will configure the SPI port to the settings required for the MCP2515 according to the data sheet.&#60;/p&#62;
&#60;p&#62;Let me know how it goes.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11192</link>
			<pubDate>Sat, 09 Jun 2012 21:28:09 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11192@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'll see what I can do about that tonight after I finish fixing up the WireBase library to follow the coding standards libmaple uses. I don't have that chip myself (I'd need 2 to test) but I can try to port it with libmaple in mind.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsgamermike on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11189</link>
			<pubDate>Sat, 09 Jun 2012 16:50:57 +0000</pubDate>
			<dc:creator>dsgamermike</dc:creator>
			<guid isPermaLink="false">11189@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have not gotten it to work. It seems really simple, but I just can not get it to pass any data. If anyone could help it would be greatly appreciated. I'm sure that x512 and I are not the only ones that want to run any sort of CAN on this chip. If it's off chip solution that is still better no CAN at all. I'll paypal the 1st person that has the MCP 2515 working with the Maple 20$. There's a library in the post crenn posted.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>BJ Freeman on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11159</link>
			<pubDate>Fri, 08 Jun 2012 04:04:07 +0000</pubDate>
			<dc:creator>BJ Freeman</dc:creator>
			<guid isPermaLink="false">11159@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;it is premature for me to be an official on using USB and CAN at the same time.&#60;br /&#62;
I also bought a board that uses the same device as the Maple, but has CAN and USB peripherals onboard.&#60;br /&#62;
what I have not done, yet, is tested the Code that ST provides for this.&#60;br /&#62;
I am embarrassed to say I can not upload thru DFU from windows to either board.&#60;br /&#62;
So I am working to convert the Loader to ST-link, which has realtime debug as well as easy upload and download to the STM32F4 series.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>x512 on "Library for MCP2515"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1866#post-11108</link>
			<pubDate>Wed, 06 Jun 2012 10:25:03 +0000</pubDate>
			<dc:creator>x512</dc:creator>
			<guid isPermaLink="false">11108@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Crenn, you are correct. I would like to retain the USB that is onboard. Although now that I think about it, I could offload the data through UART and use the onboard can. Is there a working library for the onboard CAN? I saw a thread about it on here, but they're all referencing using a different compiler. Looks much harder to use.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
