<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Project Notes &#187; PIC</title>
	<atom:link href="http://projectnotes.co.uk/tag/pic/feed/" rel="self" type="application/rss+xml" />
	<link>http://projectnotes.co.uk</link>
	<description>Random Computer, Internet and Electronics Projects</description>
	<lastBuildDate>Fri, 06 Jan 2012 13:43:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Router I2C Interface</title>
		<link>http://projectnotes.co.uk/2008/08/router-i2c-interface/</link>
		<comments>http://projectnotes.co.uk/2008/08/router-i2c-interface/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 19:02:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[I/O Bus]]></category>
		<category><![CDATA[I2C]]></category>
		<category><![CDATA[OpenWrt Midge]]></category>
		<category><![CDATA[Midge]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://www.projectnotes.co.uk/?p=50</guid>
		<description><![CDATA[These are the I2C Bus Hardware and Software settings I am using with the on OpenWrt Midge router to talk to a PIC 16F876 I2C Slave. I2C Hardware Here is the level shifter I&#8217;m using for the Router (3v) I2C &#8230; <a href="http://projectnotes.co.uk/2008/08/router-i2c-interface/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>These are the <strong>I2C</strong> Bus Hardware and Software settings I am using with the on <strong>OpenWrt</strong> <strong>Midge</strong> router to talk to a PIC <strong>16F876</strong> I2C Slave.<span id="more-43"></span></p>
<h2>I2C Hardware</h2>
<p>Here is the level shifter I&#8217;m using for the Router (3v) I2C interface (5v on Pic and other chips I have)</p>
<pre>                 5v
                |
                |
                R
               4k7
                R
                |
SCL ---+--R220--+-----&gt; 5v SCL
       |
     =====  Use the Same
      ZD\   For the Data
     /3.3\  Line
       |
       |
0v-----+---------------</pre>
<p>The above has so far worked happily with an old philips 2048bit (256 bytes!) eeprom.</p>
<p>Pin Header (for breadboard)</p>
<p>1: 0v</p>
<p>2: 3v</p>
<p>3: 5v</p>
<p>4: KEY NC</p>
<p>5: TX (I/O Bus -&gt; project)</p>
<p>6: RX (project &lt;- I/O Bus)</p>
<p>7: LED3 GPIO8 I2C SDA</p>
<p>8: LED5 GPIO11 I2C SCL</p>
<h2>I2C Software Settings</h2>
<p>In the sunspot.co.uk Midge rom, the default <strong>I2C</strong> port uses different gpio lines.  To use gpio 8 and 11, the file &#8220;/etc/init.d/S99start_i2c&#8221; file needs changing:-</p>
<p>The line containing &#8220;insmod i2c-adm5128&#8243; needs to read &#8220;insmod i2c-adm5120 scl=11 sda=8&#8243;</p>
]]></content:encoded>
			<wfw:commentRss>http://projectnotes.co.uk/2008/08/router-i2c-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a Serial Port</title>
		<link>http://projectnotes.co.uk/2008/08/adding-a-serial-port/</link>
		<comments>http://projectnotes.co.uk/2008/08/adding-a-serial-port/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 23:46:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OpenWrt Midge]]></category>
		<category><![CDATA[I/O Bus]]></category>
		<category><![CDATA[Midge]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://www.projectnotes.co.uk/?p=24</guid>
		<description><![CDATA[Fitting a serial converter and lead insider the I/O Bus box gives us back a socket for other projects and gets the serial converter out of harms way.  Cutting a couple of I/O Bus tracks opens up even more options. &#8230; <a href="http://projectnotes.co.uk/2008/08/adding-a-serial-port/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Fitting a serial converter and lead insider the I/O Bus box gives us back a socket for other projects and gets the serial converter out of harms way.  Cutting a couple of I/O Bus tracks opens up even more options.<span id="more-20"></span></p>
<p>I have been using the 5 port &#8216;scart socket&#8217; I/O Bus simply as a passive backplane.  All of the lines are bussed together and using it simply involves hooking up the correct pins of a scart type plug to the corresponding pins on a circuit.</p>
<p>The <a title="The 5 port I/O Bus made from a scart splitter" href="http://www.projectnotes.co.uk/cheap-io-bus/">I/O bus</a> started life as a cheap breakout box for the Sweex/Edimax Router so that I could hook up different circuits to it without risking physical damage to the router itself &#8211; at least I won&#8217;t be able to break off a component whilst connecting a new circuit.</p>
<p>The Bus simply carries the router led, power (3v and 5v) and serial lines. I have been using a transistor based level converter to connect the router to a PC for uploading new ROM images.</p>
<p>Now that I&#8217;m going to add a PIC Processor and try a bit of communication between the PIC and the Router, it occured to me that it would be useful if I cut the serial lines somewhere on the bus so that I could hook up more than one serial device &amp; converter.</p>
<p>However, there is just room for my level converter or one based on a MAX232 IC (a better idea if you have one handy) where the original scart lead exited the case.</p>
<p>I added the circuit, connecting it to the nearest socket and cut the traces between the serial pins and the rest of the I/O Bus.</p>
<p>Now, if I need to boot the router and upload a new ROM Image or work with the serial port, I plug the router into the first socket.  If I move the router to another socket, I can plug a PIC or whatever into the first socket and upload software to that.</p>
]]></content:encoded>
			<wfw:commentRss>http://projectnotes.co.uk/2008/08/adding-a-serial-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

