<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>cesaretto.it</title>
	
	<link>http://www.cesaretto.it</link>
	<description>The personal website of Cristiano Cesaretto</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:44:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CristianoCesarettoHomePage" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="cristianocesarettohomepage" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">CristianoCesarettoHomePage</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>USB CPU load meter</title>
		<link>http://www.cesaretto.it/usb-cpu-meter/</link>
		<comments>http://www.cesaretto.it/usb-cpu-meter/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 21:10:26 +0000</pubDate>
		<dc:creator>Cristiano</dc:creator>
				<category><![CDATA[Making stuff]]></category>
		<category><![CDATA[18f2550]]></category>
		<category><![CDATA[ccs]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://www.cesaretto.it/?p=81</guid>
		<description><![CDATA[
I got inspired by a post about using analog gauges to display PC stats. The author of the article uses a voltmeter and a PIC 18F2550 connected to the USB port to display the CPU usage and the download speed. I wanted to do something similar and started looking on Ebay for a fancy voltmeter. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/07/usbcpuusage1.jpg" target="_blank"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="363" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/07/usbcpuusage1_thumb.jpg" width="484" border="0" /></a></p>
<p>I got inspired by a post about <a href="http://www.diylife.com/2008/02/02/show-pc-stats-on-analog-gauges/" target="_blank">using analog gauges to display PC stats</a>. The author of the article uses a voltmeter and a PIC 18F2550 connected to the USB port to display the CPU usage and the download speed. I wanted to do something similar and started looking on Ebay for a fancy voltmeter. I couldn’t find anything I really liked but there was a <a href="http://en.wikipedia.org/wiki/Tachometer" target="_blank">tachometer</a> which got my attention.</p>
<p>A tachometer is usually installed in a car to measure the rotation speed of the engine. but I was going to use it to display the level of CPU usage. I bought the tachometer on Ebay, from a Chinese seller. I paid it only £20 delivered but I can not say it is a top quality device. Though It does its work it is very plasticky and the needle movement isn’t very precise.</p>
<p>The tachometer connects to the <span style="text-decoration: line-through">engine</span> PC through 3 wires: 2 wires for the 12V power supply (the red and the black wires), whilst the green wire carries the signal which drives the needle. If the tachometer was installed in a car the signal would be a square wave coming from the engine coil: the higher the frequency of the square wave the further the needle moves. I wasn’t sure about the required amplitude of the signal but I found out that 5V were just right.</p>
<p>Of course I wasn’t connecting the tachometer to an engine’s coil but to a PIC 18F2550 microcontroller which would create the 5V square wave to drive the needle. The beauty of the 18F2550 is that its size is quite small, it has 28 pins, has a reasonable amount of program memory and also hardware support for the USB 2.0.</p>
<p>This was my first project involving USB communications and the main reason of this work was experimenting with this family of USB devices, as well as having a nice homemade gadget sitting on my desk.</p>
<p> <span id="more-81"></span>
</p>
<h5>The hardware</h5>
<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/08/usb-cpu-meter-schemetics.png" target="_blank"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="351" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/08/usbcpumeterschemeticssmall.png" width="484" border="0" /></a></p>
<p>The circuit for this project is the simplest possible: the microcontroller, the 4 Mhz crystal together with the load capacitors, a 470nF capacitor connected to the Vusb pin and a decoupling capacitor connected to the power rails. The PIC 18F2550 microcontroller requires a 5V power supply whilst the tachometer need 12V. I didn’t want to use any external power adapter but only the 5V (ish) coming from the USB port, which is able to supply up to 500 mA to an attached device. How to convert the 5V from the USB to 12V for the tacho?</p>
<p>What I needed was a <a href="http://en.wikipedia.org/wiki/Boost_converter" target="_blank">Boost Converter</a> but I had no experience in building one so I decided to buy something already assembled. I got a <a href="http://www.dimensionengineering.com/AnyVoltMicro.htm" target="_blank">Anyvolt Micro Converter</a> from <a href="http://www.dimensionengineering.com" target="_blank">Dimension Engineering</a>, in Ohio. This component costs $19.99 + $1.25 for S&amp;H. I ordered it from the producer because it is slightly cheaper than the suppliers here in the UK.</p>
<p><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="170" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/08/anyvoltmicro.jpg" width="200" border="0" /></p>
<p>It convert an input voltage range of 2.6V to 14V to an output voltage of any value from 2.6V to 14V. It is very small in size and very easy to use: the only thing to be aware of is the amount of drained current: the datasheet contains the maximum values, which depend on the input and output voltages.</p>
<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/08/DSCF1231.jpg" target="_blank"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="363" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/08/DSCF1231_thumb.jpg" width="484" border="0" /></a></p>
<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/08/DSCF1232.jpg" target="_blank"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="363" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/08/DSCF1232_thumb.jpg" width="484" border="0" /></a></p>
<h5>The firmware</h5>
<p>When connected to the PC’s USB port, the microcontroller is seen as a <a href="http://en.wikipedia.org/wiki/Human_interface_device" target="_blank">HID device</a>. This means there is no need to write a device driver for the PC because all the operating systems include the drivers for this family of devices. I used the <a href="http://www.ccsinfo.com/" target="_blank">CCS compiler</a> to write the firmware, starting from one of the example files and making all the required changes. The firmware is very easy: it has to generate a square wave, whose frequency changes depending on the position we want the needle to turn to. I used the TIMER0 which is a 16-bit register incremented at each clock pulse. When the register overflows, an interrupt is generated which is served by the ISR (interrupt service routine). All what the ISR does is to change the state of the pin carrying the square wave to the tachometer: if during a ISR the pin is driven LOW in the following it will be driven HIGH, so we have generated a square wave.</p>
<p>To change the frequency of the square wave we have to change the time required by the TIMER0 to overflow: because it is a 16-bit register it requires 65536 clock pulses to overflow, generate the interrupt and start counting from 0 again. If, for example, we want to half this time we could, during the ISR, write the value 32768 into the TIMER0 register. In this way after the overflow TIMER0 is forced to start counting from 32768 instead of from 0 and the next interrupt will occur in half time. The firmware keeps writing new values into TIMER0 register, every time the ISR is executed, controlling in this way the frequency of the generated square wave. The values to write into TIMER0 are calculated and sent by the PC, through the USB port.</p>
<h5></h5>
<h5>The host application</h5>
<p><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="275" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/08/usbcpumeterhostapplication.png" width="340" border="0" /></p>
<p>The application running on the PC is in charge of detecting whether the USB tachometer is connected, reading the current CPU usage value and sending to the microcontroller the correct values to write into the TIMER0 register during the ISR. For a good introduction on detecting and sending data to USB HID device, my suggestion is to start from <a href="http://www.vsj.co.uk/articles/display.asp?id=600" target="_blank">this article</a> which is quite easy.</p>
<p>My application has been written using C# and Visual Studio 2008. I found a very useful free component to interact with <a href="http://www.codeproject.com/KB/cs/USB_HID.aspx" target="_blank">USB HID devices using C#</a>: it hid all the complexity of invoking the Windows API and saved me lots of time.</p>
<p>If you really want to get into the development of USB devices and applications you absolutely have to buy a copy of the book <a href="http://www.lvr.com/usbc.htm" target="_blank">USB Complete</a>: this is bible and it contains everything you need to know. The <a href="http://www.lvr.com/hidpage.htm" target="_blank">author’s website</a> is very good as well: you will find example code in VB.NET, C#, VB6. C/C++, the firmware for the Microchip and Cypress microcontrollers and tools for the debugging.</p>
<p>If you want more details on any aspect of the project leave a comment and I will be happy to replay.</p>
<div class="wlWriterEditableSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:ed7eb96b-f733-4ef3-94b0-80ffbb7c4961" style="padding-right: 0px; display: block; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px auto; width: 425px; padding-top: 0px">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/3nAeftaUWYw&amp;hl=en"></param><embed src="http://www.youtube.com/v/3nAeftaUWYw&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<p>&#160;</p>
<h1 align="center"><font color="#ff0000">UPDATE</font></h1>
<p align="left">Some readers requested the firmware for the microcontroller and the application for the PC. These are the links for the source codes and the compiled versions. To rebuild the firmware you need the CCS compiler. The compilation of the Windows application requires Visual Studio 2008. I think you can also use <a href="http://www.microsoft.com/express/default.aspx" target="_blank">C# 2008 Express Edition</a>, which is free. I haven’t tried but I am quite sure it works. In any case you have to install the <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=it&amp;FamilyID=333325fd-ae52-4e35-b531-508d977d32a6" target="_blank">Microsoft .NET Framework 3.5</a></p>
<p align="left"><a href="http://www.cesaretto.it/wp-content/uploads/2009/08/Firmware-binaries.zip" target="_blank">Microcontroller firmware – binaries</a></p>
<p align="left"><a href="http://www.cesaretto.it/wp-content/uploads/2009/08/Firmware-sources.zip" target="_blank">Microcontroller firmware – source code</a></p>
<p align="left"><a href="http://www.cesaretto.it/wp-content/uploads/2009/08/HostApplication-binaries.zip" target="_blank">Windows application – binaries</a></p>
<p align="left"><a href="http://www.cesaretto.it/wp-content/uploads/2009/08/HostApplication-souces.zip" target="_blank">Windows application – source code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cesaretto.it/usb-cpu-meter/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Sunday afternoon project: RS232 to TTL converter</title>
		<link>http://www.cesaretto.it/rs232-converter/</link>
		<comments>http://www.cesaretto.it/rs232-converter/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 20:47:12 +0000</pubDate>
		<dc:creator>Cristiano</dc:creator>
				<category><![CDATA[Making stuff]]></category>
		<category><![CDATA[max232]]></category>
		<category><![CDATA[maxim]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[rs232]]></category>
		<category><![CDATA[serial port]]></category>

		<guid isPermaLink="false">http://www.cesaretto.it/?p=76</guid>
		<description><![CDATA[
I have spent the Sunday afternoon working on this RS232 to TTL levels converter. Nothing exciting here, just a little tool I need to connect Microchip microcontrollers to the PC serial port, during my debugging sessions.
The circuit is very easy and available on hundreds of websites: the MAX232 chip only needs 4 1uF capacitors. I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/06/dscf1214.jpg" target="_blank"><img style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" src="http://www.cesaretto.it/wp-content/uploads/2009/06/dscf1214-thumb.jpg" border="0" alt="" width="484" height="363" /></a></p>
<p>I have spent the Sunday afternoon working on this RS232 to TTL levels converter. Nothing exciting here, just a little tool I need to connect Microchip microcontrollers to the PC serial port, during my debugging sessions.</p>
<p>The circuit is very easy and available on hundreds of websites: the MAX232 chip only needs 4 1uF capacitors. I could have chosen the MAX233 instead, because it has the same functionalities of the MAX232 but it doesn’t require the external capacitors, and it would have been much easier to fit inside the little project box!</p>
<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/06/dscf1211.jpg" target="_blank"><img style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" src="http://www.cesaretto.it/wp-content/uploads/2009/06/dscf1211-thumb.jpg" border="0" alt="" width="484" height="363" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cesaretto.it/rs232-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Router hacking completed</title>
		<link>http://www.cesaretto.it/router-display-hack/</link>
		<comments>http://www.cesaretto.it/router-display-hack/#comments</comments>
		<pubDate>Sun, 31 May 2009 17:06:36 +0000</pubDate>
		<dc:creator>Cristiano</dc:creator>
				<category><![CDATA[Making stuff]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[wrt54gs]]></category>

		<guid isPermaLink="false">http://www.cesaretto.it/?p=63</guid>
		<description><![CDATA[
I eventually completed the project described in this article. The result is not as neat as I expected and in particular I don’t like the two screws on the front panel but this is the best I could do.
The LED display shows the current time, the Google Adsense balance, the number of unread email messages [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/05/dscf1201.jpg" target="_blank"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" src="http://www.cesaretto.it/wp-content/uploads/2009/05/dscf1201-thumb.jpg" border="0" alt="" width="484" height="363" /></a></p>
<p>I eventually completed the project described in <a href="http://www.cesaretto.it/hacking-of-the-linksys-wrt54gs-router/" target="_blank">this article</a>. The result is not as neat as I expected and in particular I don’t like the two screws on the front panel but this is the best I could do.</p>
<p>The LED display shows the current time, the Google Adsense balance, the number of unread email messages and the number of people visiting a website I run (this data comes from <a href="http://whos.amung.us/" target="_blank">whos.amung.us</a>).</p>
<p>The display is driven by a PICLF628 microcontroller connected to the router through its serial port (check <a href="http://www.rwhitby.net/projects/wrt54gs" target="_blank">Rod Whitby’s post</a> for details on the WRT54GS serial port).</p>
<p><span id="more-63"></span></p>
<p>Now it’s time to move to the next project!</p>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:52c08479-81bd-4c3f-8f29-7c8ff597b9ba" class="wlWriterEditableSmartContent" style="margin: 0px auto; padding: 0px; display: block; float: none; width: 425px;">
<div><object width="425" height="355" data="http://www.youtube.com/v/Y0DBYLOdjdE&amp;hl=en" type="application/x-shockwave-flash"><param name="src" value="http://www.youtube.com/v/Y0DBYLOdjdE&amp;hl=en" /></object></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.cesaretto.it/router-display-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking of the Linksys WRT54GS router</title>
		<link>http://www.cesaretto.it/hacking-of-the-linksys-wrt54gs-router/</link>
		<comments>http://www.cesaretto.it/hacking-of-the-linksys-wrt54gs-router/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 20:53:19 +0000</pubDate>
		<dc:creator>Cristiano</dc:creator>
				<category><![CDATA[Making stuff]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[pic]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[wrt54gs]]></category>

		<guid isPermaLink="false">http://www.cesaretto.it/?p=3</guid>
		<description><![CDATA[I check my emails quite often, probably at least every hour and most of the time I have no new messages. What I needed was a kind of visual notifier that lights a led or waves a flag or makes a noise when I get a new message. My first attempt was using I-Buddy, a [...]]]></description>
			<content:encoded><![CDATA[<p>I check my emails quite often, probably at least every hour and most of the time I have no new messages. What I needed was a kind of visual notifier that lights a led or waves a flag or makes a noise when I get a new message. My first attempt was using <a href="http://www.i-buddy.com/" target="_blank">I-Buddy</a>, a funny USB gadget which is intended for using with MSN. When you get an emoticon I-Buddy flips the wings and lights its head. Quite good stuff. In the UK is available for around £15 but I got mine from the Ebay for £2.99 plus a couple of pound for the shipping. If you are a programmer it is possible to make I-Buddy do whatever you want using its API and any language compatible with the .NET Framework (for example C# or VB .NET).</p>
<p>So I wrote a little tool to check my mailbox and make I-Buddy flip the wings if there was a new message. Good enough but then I realised I wanted something working without the need of a computer turned on all the time. I already had a Linksys WRT54GS router modified to work with <a href="http://www.openwrt.org" target="_blank">OpenWRT</a>, an open source firmware working on many devices which turns your router in a real Linux box you can use as a web server, a proxy, a mail server or anything else. Personally I bought mine because I needed an Asterisk server at home and the WRT54GS was powerful enough to manage up to 4 simultaneously calls.</p>
<p>Now you should know the WRT54GS has 2 serial ports on the PCB which are not connected to the external world but they are there for us. I thought I could connect some type of display to one of the serial ports and then drive it with a shell script.</p>
<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/04/linksyshack1.jpg"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="364" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/04/linksyshack1-thumb.jpg" width="484" border="0" /></a></p>
</p>
<p> <span id="more-3"></span>
</p>
<p>First thing I added a pin header to the router’s PCB and soldered four wires from the serial port to the pins of a PIC16LF628 microcontroller. The four wires are for the power supply (3.3V), the ground, TX and RX signals. I first tried with a PIC16F88 but because it works at 5V I had few troubles to make it talk with the serial port (which works at 3.3V).</p>
<p><a href="http://www.cesaretto.it/wp-content/uploads/2009/04/linksyshack2.jpg"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="364" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/04/linksyshack2-thumb.jpg" width="484" border="0" /></a></p>
<p>So I had the WRT54GS router sending commands to a PIC microcontroller through the serial port. I just needed to things: a shell script running on the router that scraped from the internet the information to display. Secondly, I needed a display!</p>
<p>The shell script was quite easy. Because my domain is hosted by Google Apps, I can get the new messages reading a feed: <strong></strong></p>
<p><strong>https://<em>username:password</em>@mail.google.com/mail/feed/atom/unread</strong></p>
<p>The content of the feed is XML and I was interested in the <strong>&lt;fullcount&gt;</strong> element which contains just the number of unread messages. A couples of sed<em>s</em> and grep<em>s</em> to extract the information I wanted:</p>
<p><strong>wget -O &#8211; -q &quot;https://username:password@mail.google.com/mail/feed/atom/unread&quot; | grep ^&lt;fullcount&gt;[0-9][0-9]*&lt;/fullcount&gt;$ | sed &#8217;s/&lt;fullcount&gt;([0-9]*).*/1/&#8217; &gt; /dev/tts/1</strong></p>
<p>Note the redirection at the end of the command to send the result to the microcontroller through the serial port.</p>
<p>For the display I chose something simple because at this point I had already spent more than 2 months on this project. It is definitely a very simple project but it was the first time I made something like that.</p>
<p>So I used four 7 segment led displays. Each display requires 9 wires: 1 for each segment plus 1 for the digital point and one for the power supply. I had four displays so I needed 36 pins from the microcontroller: no way. Usually to reduce the power consumption and the number of required signals you turn on only one display at the time and change the active display very quickly so your eyes think they are all working. This classic way of multiplexing the led displays still requires 12 wire: 8 for the segment signals and the digital point (which are shared among the displays) and one wire for each of the four display power supplies. Still to much for my PICLF628 which has 16 I/O pins but 2 were used by the external oscillator, 2 were used to communicate with the router’s serial port and the MCLR pin actually works only as in input. So I was left with only 11 pins.</p>
<p><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="161" alt="" src="http://www.cesaretto.it/wp-content/uploads/2009/04/fuellttf4vnmde7medium.gif" width="560" border="0" /></p>
<p>An article from <a href="http://www.instructables.com/id/Charlieplexing-7-segment-displays/" target="_blank">instructables.com</a> saved my life. It explains a different way to multiplex the led displays which requires only 9 pins to drive up to 8 displays. This method is called <em>Charlieplexing</em> and has the only disadvantage to make the microcontroller code more complex (spent two days to make it work!). Eventually I had the led displays working and still 2 spare pins to use for something else, maybe to drive a buzzer when I receive a new message.</p>
<p>I really spent much time on this project and it is not finished yet because I only built a prototype on the breadboard. I still need to mount the final circuit inside the router and create a hole in the router’s case to place the led displays. The final version of the shell script doesn’t download only the list of unread emails but also the balance of my Google Adsense account and the <a href="http://whos.amung.us" target="_blank">whos.amung.us</a> statistics of a website I run. These values, as well as the current time, are all displayed in turn, one value at the time.</p>
<p>I will post a new article with the images of the final circuit mounted inside the router as soon as I get my new <a href="http://www.dremeleurope.com/dremelocs-it/Category.jsp?&amp;ccat_id=471" target="_blank">Dremel Series 300</a> (to cut the router’s front panel) from Amazon.</p>
<p>&#160;</p>
<div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:f8817c36-297a-47e8-afdc-d62bd2877ba0" style="padding-right: 0px; display: block; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px auto; width: 425px; padding-top: 0px">
<div><embed src="http://www.youtube.com/v/AT6WZkfM2_g&amp;hl=en" width="425" height="355" type="application/x-shockwave-flash" /> </div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cesaretto.it/hacking-of-the-linksys-wrt54gs-router/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic page generated in 0.279 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-09-02 18:14:05 -->
