<?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: State of I2C on libmaple and wirish?</title>
		<link>http://forums.leaflabs.com/topic.php?id=579</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:13:03 +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=579" rel="self" type="application/rss+xml" />

		<item>
			<title>mbolivar on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3241</link>
			<pubDate>Mon, 27 Dec 2010 17:34:51 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3241@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;(along with LiquidCrystal, Wire now lives under libraries/ in the libmaple master branch.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3235</link>
			<pubDate>Mon, 27 Dec 2010 15:21:37 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3235@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;adam,&#60;/p&#62;
&#60;p&#62;the libraries were originally put into the ide repo, but, as you say, it doesn't make sense for them to live there.  stable libraries are going to live in libmaple henceforth; in fact, Servo already does:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple/tree/master/libraries&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/tree/master/libraries&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;anyway, i'll move the bit-banged i2c library into libmaple.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Adam on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3234</link>
			<pubDate>Mon, 27 Dec 2010 13:27:25 +0000</pubDate>
			<dc:creator>Adam</dc:creator>
			<guid isPermaLink="false">3234@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;crenn, &#60;/p&#62;
&#60;p&#62;Thank you. I guess I did not see it since I usually do not use the IDE. Very cool. &#60;/p&#62;
&#60;p&#62;Looks like it is here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/maple-ide/tree/master/libraries/Wire&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-ide/tree/master/libraries/Wire&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;So is this where all the stable libraries live?&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/maple-ide/tree/master/libraries&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-ide/tree/master/libraries&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I thought they would be in one of the branches of the libmaple project:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;But I do not see the Wire library there. &#60;/p&#62;
&#60;p&#62;Anyway, I will try this out with the 24C128 EEPROM this weekend.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3227</link>
			<pubDate>Mon, 27 Dec 2010 05:54:24 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3227@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;The software I2C library is included with the IDE (Library Wire) since v0.0.8.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Adam on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3213</link>
			<pubDate>Sat, 25 Dec 2010 19:13:48 +0000</pubDate>
			<dc:creator>Adam</dc:creator>
			<guid isPermaLink="false">3213@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;LeafLabs folks,&#60;/p&#62;
&#60;p&#62;I notice there are docs for a bit-banged Wire library:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://leaflabs.com/docs/libraries.html#wire&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/libraries.html#wire&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;And I also notice there is an software-i2c branch on GitHub:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple/tree/software-i2c&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/tree/software-i2c&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;But I can't find the code for a software-I2C in that branch - the libraries/ directory is missing, and I don't see Wire.cpp anywhere else...&#60;/p&#62;
&#60;p&#62;Is it in progress? Or simply hasn't been started on yet?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>soundcyst on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3199</link>
			<pubDate>Wed, 22 Dec 2010 18:37:04 +0000</pubDate>
			<dc:creator>soundcyst</dc:creator>
			<guid isPermaLink="false">3199@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;This is a good starter I2C for the maple (quick n easy port), but it's probably quite worthwhile to use the actual I2C hardware on the chip..
&#60;/p&#62;</description>
		</item>
		<item>
			<title>x893 on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3198</link>
			<pubDate>Wed, 22 Dec 2010 18:12:02 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">3198@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;This library initially named Wire and i change it as need for me (only register access and no packet transfer). If i publish code w/o any restrictions - you can use it as you want.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Adam on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3196</link>
			<pubDate>Wed, 22 Dec 2010 13:22:04 +0000</pubDate>
			<dc:creator>Adam</dc:creator>
			<guid isPermaLink="false">3196@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;x893,&#60;/p&#62;
&#60;p&#62;I can't do beerware - my project is a hobby right now but could be used in a commercial product. And for that I want to use properly licensed code.&#60;/p&#62;
&#60;p&#62;If you wrote it and want to put it into the public domain or another license, I am fine with that. And if you are not, that is fine too. Just let me know.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>x893 on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3195</link>
			<pubDate>Wed, 22 Dec 2010 13:01:52 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">3195@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Don't think about license - use code.&#60;br /&#62;
License = beerware
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Adam on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3194</link>
			<pubDate>Wed, 22 Dec 2010 11:58:11 +0000</pubDate>
			<dc:creator>Adam</dc:creator>
			<guid isPermaLink="false">3194@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;x893,&#60;/p&#62;
&#60;p&#62;Wow, thank you! Where did this come from - did you write it? What is the license for this code? Is it the same as libmaple (MIT), in the public domain, or some other license?&#60;/p&#62;
&#60;p&#62;I would like to use this code but do not want to break any license terms.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>x893 on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3193</link>
			<pubDate>Wed, 22 Dec 2010 02:45:32 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">3193@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;This is simplest soft I2C library (with bug fix NACK state)&#60;br /&#62;
SoftI2C.h&#60;br /&#62;
/**&#60;br /&#62;
 *  @brief SoftI2C&#60;br /&#62;
 *  interface to I2C (two-wire) communication.&#60;br /&#62;
 */&#60;/p&#62;
&#60;p&#62;#include &#34;wirish.h&#34;&#60;/p&#62;
&#60;p&#62;#ifndef _SOFTI2C_H_&#60;br /&#62;
#define _SOFTI2C_H_&#60;/p&#62;
&#60;p&#62;#define SI2C_SUCCESS		0	/* transmission was successful */&#60;br /&#62;
#define SI2C_ENACKADDR	2	/* received nack on transmit of address */&#60;br /&#62;
#define SI2C_ENACKTRNS	3	/* received nack on transmit of data */&#60;/p&#62;
&#60;p&#62;#define SI2C_WRITE 0&#60;br /&#62;
#define SI2C_READ  1&#60;/p&#62;
&#60;p&#62;static inline void SI2C_DELAY(uint8 delay)&#60;br /&#62;
{&#60;br /&#62;
	for(uint8 i = 0; i &#38;lt; delay; i++)&#60;br /&#62;
		asm volatile(&#34;nop&#34;);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;class SoftI2CClass&#60;br /&#62;
{&#60;br /&#62;
private:&#60;br /&#62;
	GPIO_Port *sda_port, *scl_port;&#60;br /&#62;
	uint8 sda_pin, scl_pin;&#60;/p&#62;
&#60;p&#62;//	uint8 writeOneByte(uint8 address);&#60;br /&#62;
//	uint8 readOneByte(uint8 address, uint8 *data);&#60;/p&#62;
&#60;p&#62;	void i2c_start(void);&#60;br /&#62;
	void i2c_stop(void);&#60;br /&#62;
	uint8 i2c_get_ack(void);&#60;br /&#62;
	void i2c_send_ack(void);&#60;br /&#62;
	void i2c_send_nack(void);&#60;br /&#62;
	uint8 i2c_shift_in(void);&#60;br /&#62;
	void i2c_shift_out(uint8 val);&#60;/p&#62;
&#60;p&#62;public:&#60;br /&#62;
	SoftI2CClass(void);&#60;/p&#62;
&#60;p&#62;	uint8 SDA, SCL;&#60;br /&#62;
	uint8 Delay;&#60;br /&#62;
	uint8 Data;&#60;br /&#62;
	uint8 SlaveAddress;&#60;/p&#62;
&#60;p&#62;	void begin(uint8 sda, uint8 scl);&#60;/p&#62;
&#60;p&#62;	uint8 writeReg(uint8 register_address, uint8 data);&#60;br /&#62;
	uint8 writeReg(uint8 slave_address, uint8 register_address, uint8 data);&#60;/p&#62;
&#60;p&#62;	uint8 readReg(uint8 register_address);&#60;br /&#62;
	uint8 readReg(uint8 register_address, uint8 *data);&#60;br /&#62;
	uint8 readReg(uint8 slave_address, uint8 register_address);&#60;br /&#62;
	uint8 readReg(uint8 slave_address, uint8 register_address, uint8 *data);&#60;br /&#62;
};&#60;/p&#62;
&#60;p&#62;extern SoftI2CClass SoftI2C;&#60;/p&#62;
&#60;p&#62;#endif // _SoftI2C_H_&#60;/p&#62;
&#60;p&#62;SoftI2C.cpp&#60;br /&#62;
/**&#60;br /&#62;
 *  @brief SoftI2C&#60;br /&#62;
 *  interface to I2C (two-wire) communication.&#60;br /&#62;
 */&#60;/p&#62;
&#60;p&#62;#include &#34;wirish.h&#34;&#60;br /&#62;
#include &#34;gpio.h&#34;&#60;br /&#62;
#include &#34;SoftI2C.h&#34;&#60;/p&#62;
&#60;p&#62;// Define for PORT/PIN access via gpio_read/write functions&#60;br /&#62;
#define SET_PIN_ACCESS()	sda_port = PIN_MAP[sda].port;	\&#60;br /&#62;
							sda_pin  = PIN_MAP[sda].pin;	\&#60;br /&#62;
							scl_port = PIN_MAP[scl].port;	\&#60;br /&#62;
							scl_pin  = PIN_MAP[scl].pin&#60;br /&#62;
#define SCL_HI()			gpio_write_bit(scl_port, scl_pin, 1)&#60;br /&#62;
#define SCL_LO()			gpio_write_bit(scl_port, scl_pin, 0)&#60;br /&#62;
#define SDA_HI()			gpio_write_bit(sda_port, sda_pin, 1)&#60;br /&#62;
#define SDA_LO()			gpio_write_bit(sda_port, sda_pin, 0)&#60;br /&#62;
#define SDA_RD()			gpio_read_bit(sda_port, sda_pin)&#60;br /&#62;
// #define SET_PIN_ACCESS()&#60;br /&#62;
// #define SCL_HI()			digitalWrite(scl, HIGH)&#60;br /&#62;
// #define SCL_LO()			digitalWrite(scl, LOW)&#60;br /&#62;
// #define SDA_HI()			digitalWrite(sda, HIGH)&#60;br /&#62;
// #define SDA_LO()			digitalWrite(sda, LOW)&#60;br /&#62;
// #define SDA_RD()			digitalRead(sda)&#60;/p&#62;
&#60;p&#62;#define Delay()			SI2C_DELAY(Delay)&#60;/p&#62;
&#60;p&#62;#define Delay_SCL_HI()	Delay(); SCL_HI()&#60;br /&#62;
#define Delay_SDA_HI()	Delay(); SDA_HI()&#60;br /&#62;
#define Delay_SCL_LO()	Delay(); SCL_LO()&#60;br /&#62;
#define Delay_SDA_LO()	Delay(); SDA_LO()&#60;/p&#62;
&#60;p&#62;void SoftI2CClass::i2c_start(void)&#60;br /&#62;
{&#60;br /&#62;
	Delay_SDA_LO();&#60;br /&#62;
	Delay_SCL_LO();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void SoftI2CClass::i2c_stop(void)&#60;br /&#62;
{&#60;br /&#62;
	Delay_SCL_HI();&#60;br /&#62;
	Delay_SDA_HI();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::i2c_get_ack(void)&#60;br /&#62;
{&#60;br /&#62;
	Delay_SCL_LO();&#60;br /&#62;
	Delay_SDA_HI();&#60;br /&#62;
	Delay_SCL_HI();&#60;br /&#62;
	Delay();&#60;br /&#62;
	if (!SDA_RD())&#60;br /&#62;
	{&#60;br /&#62;
		SCL_LO();&#60;br /&#62;
		return true;&#60;br /&#62;
	}&#60;br /&#62;
	else&#60;br /&#62;
	{&#60;br /&#62;
		SCL_LO();&#60;br /&#62;
		return false;&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void SoftI2CClass::i2c_send_ack(void)&#60;br /&#62;
{&#60;br /&#62;
	Delay_SDA_LO();&#60;br /&#62;
	Delay_SCL_HI();&#60;br /&#62;
	Delay_SCL_LO();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void SoftI2CClass::i2c_send_nack(void)&#60;br /&#62;
{&#60;br /&#62;
	Delay_SDA_HI();&#60;br /&#62;
	Delay_SCL_HI();&#60;br /&#62;
	Delay();&#60;br /&#62;
	Delay_SCL_LO();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::i2c_shift_in(void)&#60;br /&#62;
{&#60;br /&#62;
	uint8 data = 0;&#60;br /&#62;
	for (uint8 mask = 0x80; mask != 0; mask &#38;gt;&#38;gt;= 1)&#60;br /&#62;
	{&#60;br /&#62;
		Delay_SCL_HI();&#60;br /&#62;
		Delay();&#60;br /&#62;
		if (SDA_RD())&#60;br /&#62;
			data &#124;= mask;&#60;br /&#62;
		SCL_LO();&#60;br /&#62;
	}&#60;br /&#62;
	return data;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void SoftI2CClass::i2c_shift_out(uint8 val)&#60;br /&#62;
{&#60;br /&#62;
	for(uint8 mask = 0x80; mask != 0; mask &#38;gt;&#38;gt;= 1)&#60;br /&#62;
	{&#60;br /&#62;
		if (mask &#38;amp; val)	{ SDA_HI(); }&#60;br /&#62;
		else			{ SDA_LO(); }&#60;br /&#62;
		Delay_SCL_HI();&#60;br /&#62;
		Delay_SCL_LO();&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;SoftI2CClass::SoftI2CClass(void)&#60;br /&#62;
{&#60;br /&#62;
	Delay = 50;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/*&#60;br /&#62;
 * Joins I2C bus as master on given SDA and SCL pins.&#60;br /&#62;
 */&#60;br /&#62;
void SoftI2CClass::begin(uint8 sda, uint8 scl)&#60;br /&#62;
{&#60;br /&#62;
	SDA = sda;&#60;br /&#62;
	SCL = scl;&#60;/p&#62;
&#60;p&#62;	SET_PIN_ACCESS();&#60;/p&#62;
&#60;p&#62;	pinMode(scl, OUTPUT_OPEN_DRAIN);&#60;br /&#62;
	pinMode(sda, OUTPUT_OPEN_DRAIN);&#60;/p&#62;
&#60;p&#62;	SCL_HI();&#60;br /&#62;
	SDA_HI();&#60;/p&#62;
&#60;p&#62;	uint8 retry = 250;&#60;br /&#62;
	if (retry-- &#38;gt; 0 &#38;amp;&#38;amp; !SDA_RD())&#60;br /&#62;
	{&#60;br /&#62;
		Delay_SCL_LO();&#60;br /&#62;
		Delay_SCL_HI();&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::writeReg(uint8 register_address, uint8 data)&#60;br /&#62;
{&#60;br /&#62;
	return writeReg(SlaveAddress, register_address, data);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::writeReg(uint8 slave_address, uint8 register_address, uint8 data)&#60;br /&#62;
{&#60;br /&#62;
	uint8 error = SI2C_SUCCESS;&#60;br /&#62;
	slave_address &#38;lt;&#38;lt;= 1;&#60;/p&#62;
&#60;p&#62;	i2c_start();&#60;br /&#62;
	i2c_shift_out(slave_address &#124; SI2C_WRITE);&#60;br /&#62;
	if (!i2c_get_ack())&#60;br /&#62;
		error = SI2C_ENACKADDR;&#60;br /&#62;
	else&#60;br /&#62;
	{&#60;br /&#62;
		i2c_shift_out(register_address);&#60;br /&#62;
		if (!i2c_get_ack())&#60;br /&#62;
			error = SI2C_ENACKTRNS;&#60;br /&#62;
		else&#60;br /&#62;
		{&#60;br /&#62;
			i2c_shift_out(data);&#60;br /&#62;
			if (!i2c_get_ack())&#60;br /&#62;
				error = SI2C_ENACKTRNS;&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;br /&#62;
	Delay_SDA_LO();&#60;br /&#62;
	i2c_stop();&#60;/p&#62;
&#60;p&#62;	return error;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::readReg(uint8 register_address)&#60;br /&#62;
{&#60;br /&#62;
	return readReg(SlaveAddress, register_address, &#38;amp;Data);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::readReg(uint8 register_address, uint8 *data)&#60;br /&#62;
{&#60;br /&#62;
	return readReg(SlaveAddress, register_address, data);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::readReg(uint8 slave_address, uint8 register_address)&#60;br /&#62;
{&#60;br /&#62;
	return readReg(slave_address, register_address, &#38;amp;Data);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 SoftI2CClass::readReg(uint8 slave_address, uint8 register_address, uint8 *data)&#60;br /&#62;
{&#60;br /&#62;
	uint8 error = SI2C_SUCCESS;&#60;br /&#62;
	slave_address &#38;lt;&#38;lt;= 1;&#60;/p&#62;
&#60;p&#62;	i2c_start();&#60;br /&#62;
	i2c_shift_out(slave_address &#124; SI2C_WRITE);&#60;br /&#62;
	if (!i2c_get_ack())&#60;br /&#62;
	{&#60;br /&#62;
		Delay_SDA_LO();&#60;br /&#62;
		error = SI2C_ENACKADDR;&#60;br /&#62;
	}&#60;br /&#62;
	else&#60;br /&#62;
	{&#60;br /&#62;
		i2c_shift_out(register_address);&#60;br /&#62;
		if (!i2c_get_ack())&#60;br /&#62;
		{&#60;br /&#62;
			Delay();&#60;br /&#62;
			SDA_LO();&#60;br /&#62;
			error = SI2C_ENACKTRNS;&#60;br /&#62;
		}&#60;br /&#62;
		else&#60;br /&#62;
		{&#60;br /&#62;
			Delay();&#60;br /&#62;
			Delay_SCL_HI();&#60;br /&#62;
			Delay();&#60;/p&#62;
&#60;p&#62;			i2c_start();&#60;br /&#62;
			i2c_shift_out(slave_address &#124; SI2C_READ);&#60;br /&#62;
			if (!i2c_get_ack())&#60;br /&#62;
			{&#60;br /&#62;
				Delay_SDA_LO();&#60;br /&#62;
				error = SI2C_ENACKADDR;&#60;br /&#62;
			}&#60;br /&#62;
			else&#60;br /&#62;
			{&#60;br /&#62;
				Delay();&#60;br /&#62;
				*data = i2c_shift_in();&#60;br /&#62;
				i2c_send_nack();&#60;br /&#62;
			}&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;br /&#62;
	i2c_stop();&#60;br /&#62;
	return error;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// Declare the instance that the users of the library can use&#60;br /&#62;
SoftI2CClass SoftI2C;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3164</link>
			<pubDate>Sat, 18 Dec 2010 22:52:04 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3164@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Future Electronics sell SPI EEPROM&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.futureelectronics.com/en/Search.aspx?dsNav=Ntk:PlainTextSearch&#34; rel=&#34;nofollow&#34;&#62;http://www.futureelectronics.com/en/Search.aspx?dsNav=Ntk:PlainTextSearch&#60;/a&#62;&#124;SPI+Interface+Protocol&#124;3&#124;,Ny:True,Nea:True,N:732&#60;/p&#62;
&#60;p&#62;About $1 for 16K x 8 PDIP parts (it takes them a week or two to ship reserve stock to the UK, it may be quicker for you).&#60;/p&#62;
&#60;p&#62;SPI should be quicker than I2C too.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Adam on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3163</link>
			<pubDate>Sat, 18 Dec 2010 22:11:34 +0000</pubDate>
			<dc:creator>Adam</dc:creator>
			<guid isPermaLink="false">3163@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Ooops, correction, Digikey doesn't seem to stock Atmel DIP EEPROMs. But they do stock the Microchip 25LC640A which is a 10Mhz 8k x 8 bit DIP part, USD 0.82 each. So that might work. No Arduino libraries for it though, so I would have to write one, instead of just porting to Maple.&#60;/p&#62;
&#60;p&#62;No good choices in this area I guess...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Adam on "State of I2C on libmaple and wirish?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=579#post-3162</link>
			<pubDate>Sat, 18 Dec 2010 21:01:32 +0000</pubDate>
			<dc:creator>Adam</dc:creator>
			<guid isPermaLink="false">3162@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Does anyone know the state of I2C communication using libmaple or using wirish?&#60;/p&#62;
&#60;p&#62;There doesn't appear to be support for the equivalent of Arduino's Wire object, and reading the libmaple i2c.c source, I wasn't clear whether it works. The last commit on the i2c branch was in August, and the commit message is:&#60;/p&#62;
&#60;p&#62;&#34;BROKEN: more i2c progress&#34;&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/3a55e7828a30e9440c1e497feeb896ab8756130b/libmaple/i2c.c&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/blob/3a55e7828a30e9440c1e497feeb896ab8756130b/libmaple/i2c.c&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I would like to use the I2C to communicate with an I2C serial EEPROM, an Atmel AT24C128. &#60;/p&#62;
&#60;p&#62;I guess there are SPI EEPROMs and I will look at those... Digikey doesn't stock any, though. Some of the other distributors do I guess.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
