<?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: Sample Code for the MCP23018</title>
		<link>http://forums.leaflabs.com/topic.php?id=2007</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:05:20 +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=2007" rel="self" type="application/rss+xml" />

		<item>
			<title>crenn on "Sample Code for the MCP23018"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2007#post-22236</link>
			<pubDate>Sun, 03 Feb 2013 08:57:34 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">22236@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I've released the library now and I'll be doing a few more touches on it like adding support for ^= &#38;lt;&#38;lt;=, etc.&#60;/p&#62;
&#60;p&#62;You can get the library from here:&#60;br /&#62;
&#60;a href=&#34;http://github.com/crenn/MCP23x18&#34; rel=&#34;nofollow&#34;&#62;http://github.com/crenn/MCP23x18&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Sample Code for the MCP23018"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2007#post-22178</link>
			<pubDate>Thu, 31 Jan 2013 08:11:07 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">22178@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Taken some time, but I completed a driver last night (technically last night now) to drive both the MCP23018 and the MCP23S18. The code still needs to be commented, but it will allow code like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
&#60;blockquote&#62;mcp.IOCON = 0x0000;&#60;br /&#62;
mcp.IODIR = 0x0000;&#60;br /&#62;
mcp.GPPU = 0xFFFF;&#60;br /&#62;
SerialUSB.println(mcp.GPPU, HEX);&#60;/blockquote&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;There is also a few more operators needed to implement, but should work quite well making it easy to manipulate the registers on the MCP23x18.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Sample Code for the MCP23018"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2007#post-11511</link>
			<pubDate>Mon, 02 Jul 2012 20:01:11 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11511@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;How about I do the impossible and do a pull request? ;D I'll comment the code today before I do that.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "Sample Code for the MCP23018"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2007#post-11498</link>
			<pubDate>Mon, 02 Jul 2012 14:22:53 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">11498@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;cool! care to submit a patch to the libmaple examples/ directory for this code?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Sample Code for the MCP23018"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2007#post-11491</link>
			<pubDate>Mon, 02 Jul 2012 09:26:19 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">11491@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thought I'd share this code here while I work on the library in case people wish to see what I'm working on. I've written a little light chaser program, just it's not using the Maple's GPIO, it's using a single 8-bit GPIO register of the MCP23018. I got the chips this morning from Microchips Sample Program (I'm planning for QFN versions these chips to be used in a project in the future) and decided to get working on making a driver for them. After some initial problems (reading the reference manual incorrectly) I've finally made a working driver, and used a 'simple' light chaser example to display it.&#60;/p&#62;
&#60;p&#62;The code is available here:&#60;br /&#62;
&#60;a href=&#34;http://www.crennsmind.com/Code/Maple/PortExpand/MCP23x18_driver.txt&#34; rel=&#34;nofollow&#34;&#62;http://www.crennsmind.com/Code/Maple/PortExpand/MCP23x18_driver.txt&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;And a video demonstration is available here:&#60;br /&#62;
&#60;a href=&#34;http://www.youtube.com/watch?v=18b01mdbTaM&#34; rel=&#34;nofollow&#34;&#62;http://www.youtube.com/watch?v=18b01mdbTaM&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I'd also like to mention the library for this chip will also support the SPI version (MCP23S18) as well as the code used to communicate with them is near identical. Additionally, I'll be making a library for users of ATMEGA/ATTINY devices having trouble wrapping their heads around the STM32F1 GPIO some help which will provide an opportunity to learn how to as well as a simple interface. It could technically be used in place where there is a ATMega device library that directly accesses the GPIO.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
