<?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>Hardware &#38; Software</title>
	<atom:link href="http://hsblog.mexchip.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hsblog.mexchip.com</link>
	<description>Computing and Digital Systems</description>
	<lastBuildDate>Mon, 28 Nov 2011 23:06:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>eaglefree18f2550 featured by Dangerous Prototypes</title>
		<link>http://hsblog.mexchip.com/2011/11/eaglefree18f2550-featured-by-dangerous-prototypes/</link>
		<comments>http://hsblog.mexchip.com/2011/11/eaglefree18f2550-featured-by-dangerous-prototypes/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 23:06:13 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[General @en]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=1025</guid>
		<description><![CDATA[My eaglefree18f2550 has been featured on the Dangerous Prototypes website, I think it&#8217;s very nice of them and motivates me to make the improvements I&#8217;ve been thinking about .]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://hsblog.mexchip.com/2009/12/eaglefree18f2550-development-board-for-pic18f2550/">eaglefree18f2550</a> has been featured on the <a href="http://dangerousprototypes.com/2011/11/28/eaglefree-pic18f2550-development-board" title="Dangerous Prototypes" target="_blank">Dangerous Prototypes website</a>, I think it&#8217;s very nice of them and motivates me to make the improvements I&#8217;ve been thinking about <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2011/11/eaglefree18f2550-featured-by-dangerous-prototypes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System notifications from Mono</title>
		<link>http://hsblog.mexchip.com/2011/10/system-notifications-from-mono/</link>
		<comments>http://hsblog.mexchip.com/2011/10/system-notifications-from-mono/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 22:35:37 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[General @en]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=1006</guid>
		<description><![CDATA[Sometime ago, I published a small post about the notify-send command, which lets you show a notification balloon with a custom message using the notification daemon (which uses DBus and is accessed through libnotify), this is handy for notifying the user of an event in a non-intrusive way (he/she doesn&#8217;t need to click it to [...]]]></description>
			<content:encoded><![CDATA[<p>Sometime ago, I published a small <a href="http://hsblog.mexchip.com/2010/10/nice-notifications-with-notify-send/" title="Nice notifications with notify-send">post about the notify-send command</a>, which lets you show a notification balloon with a custom message using the notification daemon (which uses DBus and is accessed through libnotify), this is handy for notifying the user of an event in a non-intrusive way (he/she doesn&#8217;t need to click it to make it disappear). Several Gnome programs such as Epiphany (for showing an incoming message), Evolution (new email notification), etc. use it, but what if you&#8217;re willing to use it inside a Mono application you&#8217;re writing yourself? One way would be to execute the notify-send command from within your application, but there is a nicer way: <strong>libnotify-sharp</strong>. This is a library that encapsulates the necessary bindings to libnotify so that it can be used within Mono/C# applications. In Ubuntu 10.04, all we need to be able to use it is to install the <strong>libnotify-cil-dev</strong> package, then add a reference to <strong>notify-sharp</strong>:<br />
<a href="http://hsblog.mexchip.com/wp-content/uploads/Edit-References-2.png"><img src="http://hsblog.mexchip.com/wp-content/uploads/Edit-References-2-300x267.png" alt="" title="Edit References-2" width="300" height="267" class="aligncenter size-medium wp-image-1015" /></a><br />
<span id="more-1006"></span><br />
<strong>Note:</strong> actually, you only need to install the <strong>libnotify0.4-cil</strong> package (it is installed automatically when installing <strong>libnotify-cil-dev</strong>), but then, it won&#8217;t appear in the Mono packages list (because Mono uses pkg-config to build this list, and libnotify-cil-dev is the one that provides pkg-config information for notify-sharp), but you can add it &#8220;manually&#8221; by indicating the path to the notify-sharp dll:<br />
<a href="http://hsblog.mexchip.com/wp-content/uploads/Edit-References-1.png"><img src="http://hsblog.mexchip.com/wp-content/uploads/Edit-References-1-300x205.png" alt="" title="Edit References-1" width="300" height="205" class="aligncenter size-medium wp-image-1014" /></a></p>
<p>And then write some code:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">Notifications</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">//...</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Instantiate a notification</span>
Notification myMessage <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Notification<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Set title and message</span>
myMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">Summary</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;About&quot;</span><span style="color: #008000;">;</span>
myMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">Body</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;This is an about message.&quot;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Set icon name</span>
myMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">IconName</span> <span style="color: #008000;">=</span> Stock<span style="color: #008000;">.</span><span style="color: #0000FF;">About</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Comment this if you don't want an icon to appear</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Finally, show the notification</span>
myMessage<span style="color: #008000;">.</span><span style="color: #0000FF;">Show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>These are a couple of screenshots of my test application:<br />
<a href="http://hsblog.mexchip.com/wp-content/uploads/MainWindow.png"><img src="http://hsblog.mexchip.com/wp-content/uploads/MainWindow.png" alt="" title="MainWindow" width="297" height="195" class="aligncenter size-full wp-image-1012" /></a> <a href="http://hsblog.mexchip.com/wp-content/uploads/Notification.png"><img src="http://hsblog.mexchip.com/wp-content/uploads/Notification-300x164.png" alt="" title="Notification" width="300" height="164" class="aligncenter size-medium wp-image-1013" /></a><br />
Download the test project here: <a class="downloadlink" href="http://hsblog.mexchip.com/wp-content/plugins/download-monitor/download.php?id=3" title=" descargado 31 veces" >TestNotify (31)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2011/10/system-notifications-from-mono/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux market shares</title>
		<link>http://hsblog.mexchip.com/2011/08/linux-market-shares/</link>
		<comments>http://hsblog.mexchip.com/2011/08/linux-market-shares/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 04:46:20 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[General @en]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=1000</guid>
		<description><![CDATA[On the desktop, Linux is really far away from becoming a &#8220;big player&#8221;, but on the mobile, it&#8217;s become a very different story thanks to Android (remember, Android is based on Linux), just a look at current market shares for Linux and other operative systems: Created by: MBA Online]]></description>
			<content:encoded><![CDATA[<p>On the desktop, Linux is really far away from becoming a &#8220;big player&#8221;, but on the mobile, it&#8217;s become a very different story thanks to Android (remember, Android is based on Linux), just a look at current market shares for Linux and other operative systems:</p>
<p><a href="http://www.mbaonline.com/linux-market-shares"><img src="http://images.mbaonline.com.s3.amazonaws.com/linux.jpg" alt="Linux Market Shares" width="500"  border="0" /></a><br />Created by: <a href="http://www.mbaonline.com">MBA Online</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2011/08/linux-market-shares/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Humble Indie Bundle 3: Pay what you want for 7 or 12 awesome multiplatform games!</title>
		<link>http://hsblog.mexchip.com/2011/08/humble-indie-bundle-3-pay-what-you-want-for-7-or-12-awesome-multiplatform-games/</link>
		<comments>http://hsblog.mexchip.com/2011/08/humble-indie-bundle-3-pay-what-you-want-for-7-or-12-awesome-multiplatform-games/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 18:16:16 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[General @en]]></category>
		<category><![CDATA[Software @en]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=987</guid>
		<description><![CDATA[Little more than three days is left for the Humble Indie Bundle 3, a GREAT offer to acquire seven great multiplatform games (they work on Windows, Mac and Linux!). This is a GREAT offer because you put the price, you pay WHAT YOU WANT for all of these awesome games! Part of your purchase goes [...]]]></description>
			<content:encoded><![CDATA[<p><center><a href="http://www.humblebundle.com"><img src="http://cdn.humblebundle.com/4/hib3/shelf.png" width="95%" alt="Humble Indie Bundle 3" /></a></center></p>
<p>Little more than three days is left for the <a href="http://www.humblebundle.com/">Humble Indie Bundle 3</a>, a GREAT offer to acquire seven great multiplatform games (they work on Windows, Mac and Linux!). This is a GREAT offer because you put the price, you pay WHAT YOU WANT for all of these awesome games! Part of your purchase goes to developers and part to charity foundations (EFF and Chil&#8217;d Play) and you decide how it is divided. Besides, you can install the games whatever times you may like since all of the games are DRM free! You can redeem them on Steam and Desura even.</p>
<p>But if it is not enough to convince you, if you pay $6 or more, you get  five more games that were part of the <strong>Humble Indie Bundle 2</strong>!</p>
<p>I&#8217;ve already made my purchase, what are you waiting for? Go to <a href="http://www.humblebundle.com/">humblebundle.com</a> and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2011/08/humble-indie-bundle-3-pay-what-you-want-for-7-or-12-awesome-multiplatform-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allegro 5 released!</title>
		<link>http://hsblog.mexchip.com/2011/02/allegro-5-released/</link>
		<comments>http://hsblog.mexchip.com/2011/02/allegro-5-released/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 18:04:43 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[General @en]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=983</guid>
		<description><![CDATA[On February 6th, the first stable release of Allegro 5 has been made available, it&#8217;s been a long time since the last time I used Allegro, but I&#8217;m really excited about this new version, I hope it can compete again in the multimedia libraries world . You can download it and get more information at [...]]]></description>
			<content:encoded><![CDATA[<p>On February 6th, the first stable release of Allegro 5 has been made available, it&#8217;s been a long time since the last time I used Allegro, but I&#8217;m really excited about this new version, I hope it can compete again in the multimedia libraries world <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
You can download it and get more information at <a href="http://alleg.sourceforg.net">http://alleg.sourceforge.net</a>.</p>
<p>I&#8217;m really willing to try this new version, what about you? What is your favorite library among SDL, SFML and Allegro?</p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2011/02/allegro-5-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merry Christmas and Happy New Year!</title>
		<link>http://hsblog.mexchip.com/2010/12/merry-christmas-and-happy-new-year/</link>
		<comments>http://hsblog.mexchip.com/2010/12/merry-christmas-and-happy-new-year/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 03:58:25 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[General @en]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=975</guid>
		<description><![CDATA[I wish 2011 brings you the best for you and your loved ones , I hope you can fullfill all of your projects and plans. And remember, sharing is fun, so go and enjoy with your family and friends . Have a Merry Christmas and a Happy New Year! See you in 2011! If you [...]]]></description>
			<content:encoded><![CDATA[<p>I wish 2011 brings you the best for you and your loved ones , I hope you can fullfill all of your projects and plans. And remember, sharing is fun, so go and enjoy with your family and friends <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p style="text-align: center;"><strong>Have a Merry Christmas and a Happy New Year! See you in 2011!</strong></p>
<p>If you can read Spanish, here you have the instructions on How to Make a Christmas Tree <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><img src="http://www.mexchip.com/wp-content/uploads/2010/12/creararbol.gif" alt="How to make a Christmas tree" /></p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2010/12/merry-christmas-and-happy-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to show a progress bar when extracting a file</title>
		<link>http://hsblog.mexchip.com/2010/10/how-to-show-a-progress-bar-when-extracting-a-file/</link>
		<comments>http://hsblog.mexchip.com/2010/10/how-to-show-a-progress-bar-when-extracting-a-file/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 17:50:34 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[Software @en]]></category>
		<category><![CDATA[BASH]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=885</guid>
		<description><![CDATA[Recently, I found about a nice tool for showing the progress when extracting a compressed tar file on the command line: pv. pv monitors the progress of data as it goes through a pipe, so we need to send the file to tar using a pipe: $ pv file.tgz &#124; tar xzf - -C target_directory [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I found about a nice tool for showing the progress when extracting a compressed tar file on the command line: <strong>pv</strong>. pv monitors the progress of data as it goes through a pipe, so we need to send the file to tar using a pipe:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ pv file.tgz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> xzf - <span style="color: #660033;">-C</span> target_directory</pre></div></div>

<p>This will show elapsed time, percentage completed with a progress bar and an estimated time to completion (ETA), something like this</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">1.16MB <span style="color: #000000;">0</span>:00:<span style="color: #000000;">20</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>6.06MB<span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>==================<span style="color: #000000; font-weight: bold;">&gt;</span>               <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000;">55</span><span style="color: #000000; font-weight: bold;">%</span>  ETA <span style="color: #000000;">0</span>:00:<span style="color: #000000;">37</span></pre></div></div>

<p>Some more info about pv and examples at: <a href="http://www.catonmat.net/blog/unix-utilities-pipe-viewer/">A Unix Utility You Should Know About: Pipe Viewer</a>.</p>
<p>&nbsp;</p>
<p></p>
<h3>Nicer progress bar using dialog</h3>
<hr />
<br />
The command above showed very useful, but I wanted to be able to show the progress of extraction using <strong>dialog</strong>. This is an example script of a progress bar using dialog:<br />
<span id="more-885"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#40;</span>
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">0</span>..<span style="color: #000000;">100</span>..<span style="color: #000000;">10</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span>
	<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">dialog</span> <span style="color: #660033;">--gauge</span> <span style="color: #ff0000;">&quot;Progress&quot;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">40</span></pre></div></div>

<p>And this is the command to show the progress of file extraction using pv and dialog:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">&#40;</span>pv <span style="color: #660033;">-n</span> file.tgz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> xzf - <span style="color: #660033;">-C</span> target_directory <span style="color: #7a0874; font-weight: bold;">&#41;</span> \
<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">dialog</span> <span style="color: #660033;">--gauge</span> <span style="color: #ff0000;">&quot;Extracting file...&quot;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">50</span></pre></div></div>

<p>The -n parameter makes pv output only percentages, which we pipe and send to dialog as input. It will result in something like this:<br />
<a href="http://hsblog.mexchip.com/wp-content/uploads/extract-progress.png"><img class="aligncenter size-medium wp-image-900" title="Extraction progress dialog" src="http://hsblog.mexchip.com/wp-content/uploads/extract-progress-300x191.png" alt="Extraction progress dialog" width="300" height="191" /></a><br />
I&#8217;ve been using this command for some commonly used scripts at work and now they look a lot nicer <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2010/10/how-to-show-a-progress-bar-when-extracting-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice notifications with notify-send</title>
		<link>http://hsblog.mexchip.com/2010/10/nice-notifications-with-notify-send/</link>
		<comments>http://hsblog.mexchip.com/2010/10/nice-notifications-with-notify-send/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 23:01:55 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[Software @en]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=875</guid>
		<description><![CDATA[I&#8217;ve been writing some simple BASH scripts lately (no, I&#8217;m not good with bash), and was looking for a method to get notified when certain parts of the scripts finished, I&#8217;ve found notify-send serves perfectly for this purpose, besides being used by Epiphany for notifying when a new message arrives . Get notify-send # aptitude [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been writing some simple BASH scripts lately (no, I&#8217;m not good with bash), and was looking for a method to get notified when certain parts of the scripts finished, I&#8217;ve found notify-send serves perfectly for this purpose, besides being used by Epiphany for notifying when a new message arrives <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>Get notify-send</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># aptitude install libnotify-bin</span></pre></div></div>

<p>Test it</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ notify-send Title Message</pre></div></div>

<p>This will show a notification balloon on the top rigth corner of your screen with the indicated title and message. Really, it&#8217;s been really useful for my everyday use, I can start a batch process and go on with my other activities, then I receive a notification when the process finishes or requires my attention <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>A very simple example is to compile a big program such as alsa:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> notify-send <span style="color: #ff0000;">&quot;Ready to install&quot;</span></pre></div></div>

<p>Or <a href="http://blog.dustinkirkland.com/2010/07/dear-command-line-please-ping-me-when.html">a more elaborated and really nice one</a> <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2010/10/nice-notifications-with-notify-send/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We moved!</title>
		<link>http://hsblog.mexchip.com/2010/10/we-moved/</link>
		<comments>http://hsblog.mexchip.com/2010/10/we-moved/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 15:16:50 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[General @en]]></category>

		<guid isPermaLink="false">http://hsblog.mexchip.com/?p=854</guid>
		<description><![CDATA[Once again, some changes for this blog: first, we are moving to a new host, our new web address is http://hsblog.mexchip.com. Second, I&#8217;ve decided that English will be the default language from now on, but posts will be published also in Spanish . And last, I&#8217;ll try to update the site more often, I have [...]]]></description>
			<content:encoded><![CDATA[<p>Once again, some changes for this blog: first, we are moving to a new host, our new web address is <a href="http://hsblog.mexchip.com">http://hsblog.mexchip.com</a>.<br />
Second, I&#8217;ve decided that English will be the default language from now on, but posts will be published also in Spanish <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . And last, I&#8217;ll try to update the site more often, I have some stuff pending publication, let&#8217;s go!</p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2010/10/we-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use the PICkit2 programmer under Linux</title>
		<link>http://hsblog.mexchip.com/2010/07/how-to-use-the-pickit2-programmer-under-linux/</link>
		<comments>http://hsblog.mexchip.com/2010/07/how-to-use-the-pickit2-programmer-under-linux/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 15:51:47 +0000</pubDate>
		<dc:creator>José Jorge</dc:creator>
				<category><![CDATA[Hardware @en]]></category>
		<category><![CDATA[Software @en]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://mextronics.netii.net/?p=823</guid>
		<description><![CDATA[I&#8217;ve been using the Microchip PICkit2 development programmer for a long time now, under Windows and Linux , it&#8217;s a very good piece of hardware and I think the recommended companion for hobby PIC micro controller developers. These days I had to install the software for Ubuntu Lucid (32 bits) at work, and I think [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using the Microchip PICkit2 development programmer for a long time now, under Windows and Linux <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , it&#8217;s a very good piece of hardware and I think the recommended companion for hobby PIC micro controller developers.</p>
<p>These days I had to install the software for Ubuntu Lucid (32 bits) at work, and I think I&#8217;ll list the required steps to have it working so that I don&#8217;t forget them <img src='http://hsblog.mexchip.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> , and maybe it can be of help.<br />
<span id="more-823"></span></p>
<ol>
<li>Download pk2cmd source code for Linux/Mac OS X (it&#8217;s a command line application), you can get the code from the <a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&#038;nodeId=1406&#038;dDocName=en023805">official PICkit2 page</a> under the Linux and Mac OS X Software section at the bottom of the page or using this link: <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv1.20LinuxMacSource.tar.gz">pk2cmdv1.20LinuxMacSource.tar.gz</a></li>
<li>Uncompress the file and cd to the directory

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf pk2cmdv1.20LinuxMacSource.tar.gz
$ <span style="color: #7a0874; font-weight: bold;">cd</span> pk2cmdv1.20LinuxMacSource</pre></div></div>

</li>
<li>Make sure you have libusb development files:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libusb-dev</pre></div></div>

</li>
<li>Build the application for linux (this is for Linux kernels 2.6, for older kernels and/other systems (FreeBSD, Mac) check the ReadmeMakefile.txt file.)

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">make</span> linux</pre></div></div>

</li>
<li>Make install as root

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>The device definitions file is copied to /usr/share/pk2/ directory, in order to be able to access it this directory should be in your path. To add it, edit your .bashrc file (in your home directory) and add these lines at the beginning:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>pk2<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">export</span> PATH</pre></div></div>

</li>
<li>Test your installation:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ pk2cmd -?v</pre></div></div>

<p>If PICkit2 is not present (plugged in), you get:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Executable Version:    1.20.00
Device File Version:   1.55.00
OS Firmware Version:   PICkit <span style="color: #000000;">2</span> not found
&nbsp;
Operation Succeeded</pre></div></div>

<p>If PICkit is plugged:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Executable Version:    1.20.00
Device File Version:   1.55.00
OS Firmware Version:   2.32.00
&nbsp;
Operation Succeeded</pre></div></div>

</li>
</ol>
<p>For instructions on how to use pk2cmd execute it using the -?h parameter. As an example, if you want to program a sample.hex file to a pic16f84a you&#8217;d execute:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ pk2cmd <span style="color: #660033;">-ppic16f84a</span> -fsample.hex <span style="color: #660033;">-m</span></pre></div></div>

<p>The output would be</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PICkit <span style="color: #000000;">2</span> Program Report
<span style="color: #000000;">3</span>-<span style="color: #000000;">7</span>-<span style="color: #000000;">2010</span>, <span style="color: #000000;">9</span>:<span style="color: #000000;">55</span>:<span style="color: #000000;">24</span>
Device Type: PIC16F84A
&nbsp;
Program Succeeded.</pre></div></div>

<p>That&#8217;s it. If you get an error message indicating that PK2DeviceFile.dat file can not be found, confirm whether /usr/share/pk2/ directory is in your path.</p>
<p>I have worked successfully with several micro controllers (12F508, 12F629, 12F683, 16F84, 16F628, 16F88, 18F2550 and 18F4550), under Ubuntu 32 and 64 bits without any major problem (sometime ago I read about some issues working under Ubuntu 64 bits, but I tried and didn&#8217;t find any).</p>
]]></content:encoded>
			<wfw:commentRss>http://hsblog.mexchip.com/2010/07/how-to-use-the-pickit2-programmer-under-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

