<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>fede.tft&#039;s Blog</title>
	<atom:link href="http://fedetft.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fedetft.wordpress.com</link>
	<description>A blog (mostly) about embedded development</description>
	<lastBuildDate>Fri, 20 Jan 2012 19:21:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='fedetft.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>fede.tft&#039;s Blog</title>
		<link>http://fedetft.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://fedetft.wordpress.com/osd.xml" title="fede.tft&#039;s Blog" />
	<atom:link rel='hub' href='http://fedetft.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Using a DMA capable SPI as an LCD controller</title>
		<link>http://fedetft.wordpress.com/2011/11/30/using-a-dma-capable-spi-as-an-lcd-controller/</link>
		<comments>http://fedetft.wordpress.com/2011/11/30/using-a-dma-capable-spi-as-an-lcd-controller/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 11:54:15 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[DMA]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[Miosix]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=206</guid>
		<description><![CDATA[What if you have a graphic display without an embedded controller, and you want to drive it with an ARM microcontroller? Turns out that if a DMA is available, the task is not so impossible as it first seems. If you&#8217;re interested, read the article on my website here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=206&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What if you have a graphic display without an embedded controller, and you want to drive it with an ARM microcontroller? Turns out that if a DMA is available, the task is not so impossible as it first seems.</p>
<p><img src="http://www.webalice.it/fede.tft/spi_as_lcd_controller/image_test_small.jpeg" alt="" /></p>
<p>If you&#8217;re interested, read the article on my website <a href="http://www.webalice.it/fede.tft/spi_as_lcd_controller/spi_as_lcd_controller.html">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=206&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2011/11/30/using-a-dma-capable-spi-as-an-lcd-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>

		<media:content url="http://www.webalice.it/fede.tft/spi_as_lcd_controller/image_test_small.jpeg" medium="image" />
	</item>
		<item>
		<title>Mxgui</title>
		<link>http://fedetft.wordpress.com/2011/09/22/mxgui/</link>
		<comments>http://fedetft.wordpress.com/2011/09/22/mxgui/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 11:50:12 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[3D rendering]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[Miosix]]></category>
		<category><![CDATA[Mxgui]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=203</guid>
		<description><![CDATA[Ok, here&#8217;s the new library for Miosix: Mxgui. As the name suggests, it&#8217;a a GUI library for microcontrollers, designed to work with the Miosix kernel. Source code is here, while documentation here. What can it be used for? 3D rendering on a microcontroller, for example. Mxgui examples from fede.tft on Vimeo.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=203&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok, here&#8217;s the new library for Miosix: Mxgui. As the name suggests, it&#8217;a a GUI library for microcontrollers, designed to work with the Miosix kernel.</p>
<p>Source code is <a href="http://gitorious.org/miosix-kernel/mxgui">here</a>, while documentation <a href="http://www.webalice.it/fede.tft/miosix/mxgui_1.00/index.html">here</a>.</p>
<p>What can it be used for? 3D rendering on a microcontroller, for example.</p>
<div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/29385744' width='400' height='265' frameborder='0'></iframe></div>
<p><a href="http://vimeo.com/29385744">Mxgui examples</a> from <a href="http://vimeo.com/fedetft">fede.tft</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=203&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2011/09/22/mxgui/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>
	</item>
		<item>
		<title>Serial port classes moved to Gitorious</title>
		<link>http://fedetft.wordpress.com/2011/07/11/serial-port-classes-moved-to-gitorious/</link>
		<comments>http://fedetft.wordpress.com/2011/07/11/serial-port-classes-moved-to-gitorious/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 10:08:00 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=200</guid>
		<description><![CDATA[When I first published this article about using serial port with C++ I didn&#8217;t expect it to become one of the main reasons people visit my website. Over time, thanks to many comments, bug reports and suggestion, the serial port classes have been modified significantly, to the point that releasing them in a .tar.gz file [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=200&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I first published <a href="http://www.webalice.it/fede.tft/serial_port/serial_port.html">this</a> article about using serial port with C++ I didn&#8217;t expect it to become one of the main reasons people visit my website. Over time, thanks to many comments, bug reports and suggestion, the serial port classes have been modified significantly, to the point that releasing them in a .tar.gz file is no longer a good idea.</p>
<p>I&#8217;ve therefore decided to create a git repository at <a href="https://gitorious.org/serial-port">http://gitorious.org/serial-port</a> where you can get the latest version of my serial port classes.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=200&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2011/07/11/serial-port-classes-moved-to-gitorious/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>
	</item>
		<item>
		<title>Improving battery lifetime of Le Dominoux</title>
		<link>http://fedetft.wordpress.com/2011/04/26/improving-battery-lifetime-of-le-dominoux/</link>
		<comments>http://fedetft.wordpress.com/2011/04/26/improving-battery-lifetime-of-le-dominoux/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 12:52:36 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=177</guid>
		<description><![CDATA[Some time ago I saw on Hack a Day this post about Le Dominoux, an electronic based version of dominoes. At first it didn&#8217;t seem much fun, but watching the video I quickly changed my opinion. In the end, the author also measures the power consumption of the device when the led is not lit, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=177&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some time ago I saw on Hack a Day <a href="http://hackaday.com/2011/03/01/endless-fun-with-led-dominoes/">this</a> post about Le Dominoux, an electronic based version of dominoes. At first it didn&#8217;t seem much fun, but watching the video I quickly changed my opinion.</p>
<p>In the end, the author also measures the power consumption of the device when the led is not lit, showing it&#8217;s around 100uA, and it&#8217;s from there that I thought this little device might be improved a bit.</p>
<p>Now, since this device was designed for a 555 contest, the author <strong>had</strong> to use a 555 IC, and given this constraint I think he has done a good job in optimizing it for low power, using a CMOS variant of the 555 and high brightness leds.</p>
<p>But set aside that constraint, it would be easy to optimize it event further. First of all let&#8217;s check the battery lifetime of the original device. Since the power cosumption when the led is lit (probably 5 to 10mA) differs greatly from the standby value of 100uA, battery lifetime largely depends on how much you play with it, but an upper bound is easy to calculate, and it&#8217;s 200mAh (CR2032 battery capacity) / 100uA = 2000h / 24 = 83 days. This isn&#8217;t very good since even if you almost never play with it, after ~80 days the battery is dead.</p>
<p>One possibility to improve it is to use standard 40xx CMOS logic gates to design the one shot timer, like this:</p>
<p><a href="http://fedetft.files.wordpress.com/2011/03/led-sch.png"><img class="alignnone size-medium wp-image-180" title="led-sch" src="http://fedetft.files.wordpress.com/2011/03/led-sch.png?w=300&#038;h=139" alt="" width="300" height="139" /></a></p>
<p>The fun of CMOS gates is that other than being very versatile, they draw next to zero current when they&#8217;re not switching. I built this circuit to measure the power consumption, ant that&#8217;s the result:</p>
<p><a href="http://fedetft.files.wordpress.com/2011/03/led2.jpg"><img class="alignnone size-medium wp-image-184" title="led" src="http://fedetft.files.wordpress.com/2011/03/led2.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>As you can see, it is drawing just 4uA. The actual standby current depends on how much light is shining on the phototransistor. For example in the dark it draws just 1uA, while if a bright light is pointed at the phototransistor it draws up to 300uA, which is 3V(battery voltage) /10K(R3). This happens also in the original author&#8217;s schematic, since the input stage with the phototransistor and the 10K resistor is the same, so that&#8217;s no worse than the original circuit. Anyway, in normal ambient light conditions very few light reaches the phototransistor, and the current is very low, around 5uA.</p>
<p>This gives an upper bound to the battery lifetime of 200mAh / 5uA = 40000h / 24 / 365 = 4.5 years!</p>
<p>Last notes about this circuit:</p>
<ul>
<li>it uses the same number of components as the original one, just replaces the 555 with a 4011.</li>
<li>you have to connect pin 7 of the 4011 to ground, and pin 14 to Vcc, even if in the schematic these connections are omitted.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=177&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2011/04/26/improving-battery-lifetime-of-le-dominoux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>

		<media:content url="http://fedetft.files.wordpress.com/2011/03/led-sch.png?w=300" medium="image">
			<media:title type="html">led-sch</media:title>
		</media:content>

		<media:content url="http://fedetft.files.wordpress.com/2011/03/led2.jpg?w=300" medium="image">
			<media:title type="html">led</media:title>
		</media:content>
	</item>
		<item>
		<title>Fail over fail</title>
		<link>http://fedetft.wordpress.com/2011/01/07/fail-over-fail/</link>
		<comments>http://fedetft.wordpress.com/2011/01/07/fail-over-fail/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 13:47:49 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=169</guid>
		<description><![CDATA[Even more rant this time. To go on programming microcontrollers as I&#8217;ve always done I have to disable two programs, gpsd and modem-manager (see my previous post) because hardware manufacturers fail. The first one, gpsd is done. To fix the second one without killing/removing NetworkManager I have to contact ModemManager developers. To do so I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=169&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Even more rant this time.</p>
<p>To go on programming microcontrollers as I&#8217;ve always done I have to disable two programs, gpsd and modem-manager (see my previous post) because hardware manufacturers fail. The first one, gpsd is done. To fix the second one without killing/removing NetworkManager I have to contact ModemManager developers. To do so I have to register to launchpad. To do so I have to get an OpenId. To do so I have to&#8230; find a way to avoid another fail:</p>
<p><a href="http://fedetft.files.wordpress.com/2011/01/failoverfail.png"><img class="alignnone size-medium wp-image-170" title="failoverfail" src="http://fedetft.files.wordpress.com/2011/01/failoverfail.png?w=300&#038;h=190" alt="" width="300" height="190" /></a></p>
<p>See on the bottom of that webpage? &#8220;Type the two words into the field below&#8221;. I&#8217;d be glad to do that if there were two words, and one field. The HTML source of the page seems to indicate that a sort of captcha is supposed to be there, bu there isn&#8217;t&#8230; and without it I can&#8217;t complete the registration&#8230;</p>
<p>But wait, there&#8217;s more fail:</p>
<p>A quick look at <a href="http://openid.net/get-an-openid/">http://openid.net/get-an-openid/</a> and I found out that since I have a wordpress blog I already have an OpenId. I tried to log in with that, but it failed. A look at the FAQs for launchpad and:</p>
<p>&#8220;<strong>Can I log into Launchpad with my existing OpenID?</strong></p>
<p>Not at this time.  Launchpad is currently an OpenID Provider (OP) and not a consumer (RP).&#8221;</p>
<p>And that, in my opinion, is fail.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=169&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2011/01/07/fail-over-fail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>

		<media:content url="http://fedetft.files.wordpress.com/2011/01/failoverfail.png?w=300" medium="image">
			<media:title type="html">failoverfail</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux today: too much plug and play</title>
		<link>http://fedetft.wordpress.com/2011/01/07/linux-today-too-much-plug-and-play/</link>
		<comments>http://fedetft.wordpress.com/2011/01/07/linux-today-too-much-plug-and-play/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 11:39:12 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[gpsd]]></category>
		<category><![CDATA[GSM]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ModemManager]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=157</guid>
		<description><![CDATA[This title is probably not what you&#8217;d expect. Usually people complain for the opposite reason: they buy some hardware, connect it to Linux and it does nothing, so they have to spend time in forums to see what can be done even if manufacturers don&#8217;t officially support Linux. In my case, it&#8217;s the plug and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=157&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This title is probably not what you&#8217;d expect. Usually people complain for the opposite reason: they buy some hardware, connect it to Linux and it does nothing, so they have to spend time in forums to see what can be done even if manufacturers don&#8217;t officially support Linux.</p>
<p>In my case, it&#8217;s the plug and play system itself that is causing me problems, because it incorrectly identifies a device as another type of device&#8230;</p>
<p>But let&#8217;s start from the beginning. I&#8217;m an embedded developer, and therefore I deal with microcontrollers. Often, the easiest way to debug, program, and communicate with a microcontroller is a serial port. Given that serial ports disappeared from computers long ago, USB to serial adapters have been introduced to solve this problem. These are all tiny chips like the FT232 or PL2303 that connect upstream as USB and downstream as serial ports.</p>
<p>These chips can be used either as standalone products, like the blue dongle at the left of this picture which is PL2303 based</p>
<p><a href="http://www.webalice.it/fede.tft/fonera/Cavo_seriale-small.jpg"><img class="alignnone" title="USB/serial converter" src="http://www.webalice.it/fede.tft/fonera/Cavo_seriale-small.jpg" alt="" width="234" height="128" /></a></p>
<p>or directly embedded into the device. For example, the Miosix board that I designed has an FT232 on board. It&#8217;s the chip at the bottom right, next to the USB connector</p>
<p><a href="http://www.webalice.it/fede.tft/miosix/miosix_board.jpg"><img class="alignnone" title="Miosix board" src="http://www.webalice.it/fede.tft/miosix/miosix_board.jpg" alt="" width="640" height="522" /></a></p>
<p>Now, both these devices identify as serial ports, using the default VID and PID (which are the identifiers of the USB protocol) of the manufacturer. They do so because they <strong>are</strong> serial ports, the first one is obvious to see, but also the second, since I don&#8217;t need any program to automatically start when I plug one of those, just to sit there and wait till I open screen or minicom to watch debug messages and the like.</p>
<p>Now, I&#8217;ve recently upgraded my computer to Fedora 14. It works very well, except for serial ports. At first I noticed that immediately after connecting a USB/serial device, trying to talk to it resulted in errors. &#8220;Device ore resource busy&#8221;, it said. Retrying after a couple of seconds fixed this, but then it looks like the bootloader of the microcontroller (the first program that starts) has been upset by something, so the first programming cycle failed, the next one went well, and all the subsequent too. At least until the USB/serial adapter is disconnected and reattached, in this case the issue presents again.</p>
<p>What could it be?, I thought. Maybe a bug in the kernel driver for serial ports? It turned out to be something entirely different.</p>
<p>To understand what was happening, first we have to talk about crappy GPS mice and GSM usb sticks. Both have someting in common: those who manufacture the GSM/GPS module are different from people who design the final product. The GSM/GPS modules, for convenience, spit out their data through a serial port. But given that PCs have USB ports only, final product designers add an USB/serial converter into the device. Now, the issue is, that they don&#8217;t care about changing the default VID and PID of the USB/serial adapter. Therefore when plugged to a PC they appear as serial ports despite their products are <strong>not</strong> serial ports. A GPS can only understand NMEA sentences (plus some weird binary protocol), while a GSM &#8220;internet key&#8221; can only understand AT commands. And what&#8217;s worse, they require plug and play, they require a program that attaches to these devices as soon as they&#8217;re plugged in.</p>
<p>Linux on the other side, is growing fast even as a desktop operating system. So it&#8217;s natural that it is starting to support more and more hardware, in the easiest possible way. But how can it cope with GSM/GPS USB sticks?</p>
<p>Simple: for GPSes there&#8217;s a program, <a href="http://gpsd.berlios.de/">gpsd</a>, that when a new device is connected, its VID and PID are checked against a list of devices, and if matches it tries to send NMEA sentences. If it responds, ok, otherwise the device is discarded. The same happens for GSM devices, there&#8217;s another program: <a href="https://launchpad.net/modemmanager">ModemManager</a> that does the same thing with AT commands.</p>
<p>But given that most devices appear as a PL2303 serial port, how can these programs know if after the PL2303 there&#8217;s a GPS unit, a GSM &#8220;internet key&#8221;, or none of these? Simple, they don&#8217;t. They try for a while to talk and if the device on the other side doesn&#8217;t seem to be what they expect, they give up.</p>
<p>This explains why trying to connect my USB/serial adapter to the PC and immedately open screen or minicom resulted in &#8220;device or resource busy&#8221;, while retrying a couple of seconds later worked.</p>
<p>The issue I&#8217;m having with the bootloader, is instead caused by the fact that these little program don&#8217;t just open the serial port and listen, they open the port and <strong>talk</strong>! The bootloader of my board probably gets upset by AT commands, or NMEA sentences or both.</p>
<p>But then I wonder, does a GPS unit like AT commands, or conversely, does a GSM internet key like NMEA sentences? This is trouble waiting to happen. Also on Windows, I suppose. Assume one buys a cheap GSM unit that identifies as a PL2303, and a cheap internet key that identifies too as PL2303, what does the <strong>official</strong> Windows drivers that come with them do? Conflict, I guess.</p>
<p>The first attempt to fix <strong>my issue</strong> has been to uninstall gpsd and modem-manager. Unfortunately, on Fedora, the <strong>whole</strong> KDE depends on gpsd, so it can&#8217;t be unistalled. I therefore contacted the gpsd developers on the mailing list. They have been very helpful in finding a workaround (they even blogged about it as I&#8217;m doing now, <a href="http://esr.ibiblio.org/?p=2849">here</a>), which is to download the gpsd sources and issue these commands:</p>
<p><code>./configure<br />
make udev-uninstall</code></p>
<p>which leaves gpsd installed, but removes udev rules that cause the plug and play. It&#8217;s also interesting that if I ever buy a GPS unit I can still start gpsd manually. Nice.</p>
<p>The fun thing is that gpsd developers were not aware that some other opensource project, ModemManager, was lurking for the same USB VID and PIDs&#8230;</p>
<p>I still haven&#8217;t found a way to disable modem-manager. It is a daemon, but it auto-respawns when killed, there&#8217;s no &#8220;service modem-manager stop&#8221; and trying to uninstall it would also get rid of NetworkManager.</p>
<p>Ofcouse, the only way to fix the <strong>whole problem</strong> is that hardware manufacturers should change the VID and PID so that a GPS, a GSM modem and a serial port can be uniquely identified&#8230;</p>
<p><strong>Update:</strong></p>
<p>I found a way to disable modem-manager while leaving NetworkManager:</p>
<p><code>sudo service NetworkManager stop<br />
sudo killall modem-manager<br />
cd /usr/sbin<br />
sudo rm modem-manager<br />
sudo service NetworkManager start</code></p>
<p>Ofcourse any GSM internet key would probably stop working, but for now It&#8217;s enough. I can finally connect an USB/serial adapter and nothing is trying to speak with it by default. Finally.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=157&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2011/01/07/linux-today-too-much-plug-and-play/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>

		<media:content url="http://www.webalice.it/fede.tft/fonera/Cavo_seriale-small.jpg" medium="image">
			<media:title type="html">USB/serial converter</media:title>
		</media:content>

		<media:content url="http://www.webalice.it/fede.tft/miosix/miosix_board.jpg" medium="image">
			<media:title type="html">Miosix board</media:title>
		</media:content>
	</item>
		<item>
		<title>Handling PNG images in C++</title>
		<link>http://fedetft.wordpress.com/2010/10/05/handling-png-images-in-cpp/</link>
		<comments>http://fedetft.wordpress.com/2010/10/05/handling-png-images-in-cpp/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 12:44:48 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=139</guid>
		<description><![CDATA[This blog post is about png++, one of my favourite C++ libraries. It&#8217;s a wrapper of libpng in C++ that allows to handle PNG images so easily that you&#8217;ll never want to use bare libpng again. All you need to start is to add these two lines in you source files: #include "png++/png.hpp" using namespace [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=139&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog post is about <a href="http://savannah.nongnu.org/projects/pngpp/">png++</a>, one of my favourite C++ libraries.</p>
<p>It&#8217;s a wrapper of libpng in C++ that allows to handle PNG images so easily that you&#8217;ll never want to use bare libpng again.</p>
<p>All you need to start is to add these two lines in you source files:</p>
<pre>#include "png++/png.hpp"
using namespace png;</pre>
<p>This is the code to open an existing image:</p>
<pre>image img("image.png");</pre>
<p>The code to make a new image from scratch differs only in the parameter passed to image&#8217;s constructor:</p>
<pre>image img(1024,768);</pre>
<p>The image class has the get_pixel() and set_pixel() memeber functions to access the individual pixels:</p>
<pre>rgb_pixel pixel=img.get_pixel(0,0);
pixel.red=min(255,pixel.red+10); //Increase red color of pixel
img.set_pixel(0,0,pixel);</pre>
<p>The image height and width can be obtained with intuitive get_height() and get_width() memeber functions:</p>
<pre>for(int i=0;i&lt;img.get_width();i++)
{
    for(int j=0;j&lt;img.get_height();j++)
    {
        //Do something
    }
}</pre>
<p>The image can be written to file with the write() memebr function:</p>
<pre>img.write("new_image.png");</pre>
<p>Also, this library is header-only. What does it means? That you do not have to compile the library to start playing with it, just exptract the library in the folder where you have your source code, and include the header file &#8220;png.hpp&#8221;, just that.</p>
<p>Lastly, here is an example code including CMake scripts to show the capabilities of the library. <a href="http://www.webalice.it/fede.tft/png++/png++.tar.gz">png++.tar.gz</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=139&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2010/10/05/handling-png-images-in-cpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>
	</item>
		<item>
		<title>Miosix 1.54 released</title>
		<link>http://fedetft.wordpress.com/2010/10/03/miosix-1-54-released/</link>
		<comments>http://fedetft.wordpress.com/2010/10/03/miosix-1-54-released/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 07:45:23 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Miosix]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=137</guid>
		<description><![CDATA[After a lot of time spent coding, here&#8217;s the new release of Miosix, my OS kernel for microcontrollers. New features include: Porting for ST&#8217;s Cortex M3 microcontrollers Preliminary implementation of the POSIX thread API (pthreads) Improved statistics on memory usage and debugging messages Bug fixes and other enhancements If you&#8217;re interested, download the new release [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=137&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After a lot of time spent coding, here&#8217;s the new release of Miosix, my OS kernel for microcontrollers.</p>
<p>New features include:</p>
<ul>
<li>Porting for ST&#8217;s Cortex M3 microcontrollers</li>
<li>Preliminary implementation of the POSIX thread API (pthreads)</li>
<li>Improved statistics on memory usage and debugging messages</li>
<li>Bug fixes and other enhancements</li>
</ul>
<p>If you&#8217;re interested, download the new release here: <a href="http://www.webalice.it/fede.tft/miosix/index.html">http://www.webalice.it/fede.tft/miosix/index.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=137&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2010/10/03/miosix-1-54-released/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>
	</item>
		<item>
		<title>Digital voltmeter for power supply</title>
		<link>http://fedetft.wordpress.com/2010/10/02/digital-voltmeter-for-power-supply/</link>
		<comments>http://fedetft.wordpress.com/2010/10/02/digital-voltmeter-for-power-supply/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 13:04:18 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[microcontrollers]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=129</guid>
		<description><![CDATA[This summer I finally found some time to fix my power supply. It&#8217;s a rather old but relieable unit, and I have no intention of replacing it. Basically, it still works except for the voltage meter on the front panel. Over time, the pointer developed an offset of around 1V, which is visible in this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=129&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This summer I finally found some time to fix my power supply.</p>
<p>It&#8217;s a rather old but relieable unit, and I have no intention of replacing it. Basically, it still works except for the voltage meter on the front panel. Over time, the pointer developed an offset of around 1V, which is visible in this image where the power supply is turned off. Instead of indicating exactly zero volt, the pointer is below the beginning of the scale.</p>
<p><a href="http://fedetft.files.wordpress.com/2010/10/before.jpg"><img class="alignnone size-medium wp-image-130" title="before" src="http://fedetft.files.wordpress.com/2010/10/before.jpg?w=300&#038;h=167" alt="" width="300" height="167" /></a></p>
<p>This, together with the fact that today&#8217;s microcontroller require 3.3V to operate (while the voltmeter only has an 1V resolution), forced me to always use a multimeter when using it, to be able to precisely set the output voltage.</p>
<p>The solution I found was to simply replace the analog voltmeter with a digital one. Instead of using a voltmeter chip like the ICL7107 that usually require the measurement ground to be separated from the supply ground, these days it is easier to build a voltmeter using a microcontroller.</p>
<p>That&#8217;s because even the cheap and simple micros now have at least a 10 bit ADC which is more than enough for a voltage meter in the rage 3..15V (which is the range of my power supply). Since the task is easy there was no need to use an ARM microcontroller as I usually do, but instead an ATtiny26 proved more than enough, despite only having 2KBytes of FLASH and 128Bytes of RAM.</p>
<p>This is the result:</p>
<p><a href="http://fedetft.files.wordpress.com/2010/10/after.jpg"><img class="alignnone size-medium wp-image-131" title="after" src="http://fedetft.files.wordpress.com/2010/10/after.jpg?w=300&#038;h=178" alt="" width="300" height="178" /></a></p>
<p><a href="http://fedetft.files.wordpress.com/2010/10/teardown.jpg"><img class="alignnone size-medium wp-image-132" title="teardown" src="http://fedetft.files.wordpress.com/2010/10/teardown.jpg?w=285&#038;h=300" alt="" width="285" height="300" /></a></p>
<p>The circiut is simple, a 78L05 is used to reduce the 20V found in the power supply to 5V to power the microcontroller. A voltage divider made with 1% precision resistors is connected from the power supply input to an ADC capable GPIO on the microcontroller, and three LED displays show the voltage with 0.1V resolution.</p>
<p>The LED displays are ofcourse multiplexed so that the ATtiny, despite its low number of GPIOs, can drive the display with no other glue logic except for current limiting resistors.</p>
<p>Around 100 lines of C++ code keep the whole thing working.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=129&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2010/10/02/digital-voltmeter-for-power-supply/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>

		<media:content url="http://fedetft.files.wordpress.com/2010/10/before.jpg?w=300" medium="image">
			<media:title type="html">before</media:title>
		</media:content>

		<media:content url="http://fedetft.files.wordpress.com/2010/10/after.jpg?w=300" medium="image">
			<media:title type="html">after</media:title>
		</media:content>

		<media:content url="http://fedetft.files.wordpress.com/2010/10/teardown.jpg?w=285" medium="image">
			<media:title type="html">teardown</media:title>
		</media:content>
	</item>
		<item>
		<title>Back online</title>
		<link>http://fedetft.wordpress.com/2010/06/21/back-online/</link>
		<comments>http://fedetft.wordpress.com/2010/06/21/back-online/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 13:40:52 +0000</pubDate>
		<dc:creator>fedetft</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fedetft.wordpress.com/?p=120</guid>
		<description><![CDATA[Because of an issue with the hosting service, my website (together with other websites on the same provider) has been unavailable for three days. Now the problem is fixed and I&#8217;m back online.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=120&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Because of an issue with the hosting service, my <a href="http://www.webalice.it/fede.tft/index.html">website</a> (together with other websites on the same provider) has been unavailable for three days. Now the problem is fixed and I&#8217;m back online.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fedetft.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fedetft.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fedetft.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fedetft.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fedetft.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fedetft.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fedetft.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fedetft.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fedetft.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fedetft.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fedetft.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fedetft.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fedetft.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fedetft.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fedetft.wordpress.com&amp;blog=9307626&amp;post=120&amp;subd=fedetft&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fedetft.wordpress.com/2010/06/21/back-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b9ef427bcef86466f959fbeb29a4928?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fedetft</media:title>
		</media:content>
	</item>
	</channel>
</rss>
