<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8725121772698431885</id><updated>2011-11-28T01:13:00.494+01:00</updated><category term='foxboard'/><category term='PCF8575'/><category term='NXP'/><category term='i2c'/><category term='PCF8591'/><category term='PCF8574'/><category term='PCF8563'/><category term='Philips'/><category term='domotics'/><category term='TDA8444'/><category term='LM75a'/><title type='text'>Geert's FoxBoard Blog</title><subtitle type='html'>&lt;b&gt;This is my FoxBoard blog.&lt;br&gt; Here you will find information about my domotics system and other stuff related to the FoxBoard.&lt;/b&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-6205766879500632356</id><published>2008-04-28T19:36:00.041+02:00</published><updated>2008-10-30T19:45:39.264+01:00</updated><title type='text'>It's been a while...</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I know it's been a while since I updated my blog.  But I've been struggling with a couple of things, both personally as well as on my domotics.&lt;br/&gt;&lt;br/&gt;On personal level, it's been a sad time for me.  Two weeks back, my beloved Father passed away.  Knowing my Mother passed away hardly 20 months before, one can imagine I've known happier times....&lt;br/&gt;&lt;br/&gt;&lt;a href='http://ouders.gevawebsolutions.com/index.html' target='_blank'&gt;This &lt;/a&gt;is the site I created to commemorate my beloved Parents...&lt;br/&gt;&lt;br/&gt;Anyway, life goes on and I will have to live with all the good memories I have of both my parents (and I can assure you there are many, many of them...).&lt;br/&gt;&lt;br/&gt;Another issue I was struggling with, was the amount of threads in my system.  I'm not even halfway my development, and I had already 20+ threads running.&lt;br/&gt;This was too much and the reason was quite simple: every object that represented hardware that needed polling, was running in its own thread.&lt;br/&gt;&lt;br/&gt;For instance, for my IO expanders, I had one thread per instance.  This is of course very expensive and I was looking to a solution that would bring down the amount of threads to one per functionality.&lt;br/&gt;&lt;br/&gt;So, one thread for all my IO tasks, one thread for my temperature measurements, etc...&lt;br/&gt;&lt;br/&gt;I've been thinking hard on how to solve this and found a good solution in the usage of STL and polymorphism, using callback functions.&lt;br/&gt;&lt;br/&gt;The only precondition was that the prototype of my callback functions all had to be the same.  But that was not an issue: it perfectly fitted into one another.&lt;br/&gt;&lt;br/&gt;The goal was to fill an array with pointers to callback functions and then scan that array at regular times (every 10ms, since I wanted to have a granularity of 10ms to poll my IO pins).&lt;br/&gt;&lt;br/&gt;Registering the callback functions happens in the class that maintains a thread.  That thread is running every 10ms and completely scans the array (I used a vector array for that).  The callback function was called every 10ms and inside the callback function, a decision was taken if a certain pin of a certain IO expander had to be checked or not (depending on the polling time that was set for that particular pin).&lt;br/&gt;&lt;br/&gt;So, I first started by creating a virtual class with only one function: class &lt;span style='font-weight: bold; font-family: courier new;'&gt;CSubThread()&lt;/span&gt;.&lt;blockquote style='font-family: courier new; font-weight: bold;'&gt;&lt;code&gt;#include "iostream"&lt;br/&gt;using std::cout;&lt;br/&gt;using std::endl;&lt;br/&gt;&lt;br/&gt;class CSubThread&lt;br/&gt;{&lt;br/&gt;public:&lt;br/&gt;     virtual void RunOnce( void )&lt;br/&gt;     {&lt;br/&gt;             cout &amp;lt;&amp;lt; " I ran once... " &amp;lt;&amp;lt; endl;&lt;br/&gt;     };&lt;br/&gt;};&lt;/code&gt;&lt;/blockquote&gt;&lt;br/&gt;Note: "iostream" should in fact be in between left and right triangle characters&lt;iostream&gt;, but Blogger has problems printing those characters.  It thinks it's an HTML ta issue...&lt;br/&gt;&lt;br/&gt;CSubThread() has one function, &lt;span style='font-weight: bold; font-family: courier new;'&gt;RunOnce()&lt;/span&gt;, that does not take any parameter and also doesn't return anything.  You can't have something simpler, I guess...&lt;br/&gt;&lt;br/&gt;The purpose is now that other classes will inherit the class CSubThread() and implement the function &lt;span style='font-weight: bold; font-family: courier new;'&gt;RunOnce()&lt;/span&gt;.&lt;br/&gt;&lt;br/&gt;The classes that need the polling mechanism, will implement &lt;span style='font-weight: bold; font-family: courier new;'&gt;RunOnce()&lt;/span&gt; as follows:&lt;br/&gt;&lt;blockquote style='font-family: courier new; font-weight: bold;'&gt;&lt;code&gt;void C8575Io::RunOnce( void )&lt;br/&gt;{&lt;br/&gt;    Execute();&lt;br/&gt;}     /* RunOnce */&lt;/code&gt;&lt;/blockquote&gt;&lt;br/&gt;Since &lt;span style='font-weight: bold; font-family: courier new;'&gt;RunOnce()&lt;/span&gt; is declared virtual in the base class, other classes can redefine the content of the function according their own needs.&lt;br/&gt;&lt;br/&gt;In the above example, &lt;span style='font-weight: bold; font-family: courier new;'&gt;RunOnce()&lt;/span&gt;--which is a public member of the class &lt;span style='font-weight: bold; font-family: courier new;'&gt;C8575Io()&lt;/span&gt;-- simply calls a private class &lt;span style='font-weight: bold; font-family: courier new;'&gt;Execute()&lt;/span&gt; which will do the necessary things to poll the corresponding IO expander.&lt;br/&gt;&lt;br/&gt;As you can see, very simple...  The public function &lt;span style='font-family: courier new;'&gt;&lt;span style='font-weight: bold;'&gt;RunOnce() &lt;/span&gt;&lt;/span&gt;is simply calling a private function &lt;span style='font-weight: bold; font-family: courier new;'&gt;Execute()&lt;/span&gt;, which will see if one or more pins of a IO expander has to be polled or not.&lt;br/&gt;&lt;br/&gt;&lt;font color='#cc6600'&gt;&lt;big&gt;How is the function RunOnce() connected to the callback array?&lt;/big&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;As said before, I wanted to have one thread per "activity", so, one thread for the IO polling, one thread for the temperature polling etc...&lt;br/&gt;&lt;br/&gt;The first thing the class C8575Io() must do, is connecting to the IO thread.  Now, there are two situations:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;The thread for the IO polling is already there&lt;/li&gt;&lt;li&gt;The thread for the IO polling still has to be created.&lt;/li&gt;&lt;/ol&gt;This is &lt;span style='font-weight: bold;'&gt;not&lt;/span&gt; the concern of the class C8575IO().  This class simply does a call to the message queue class using the following command:        &lt;blockquote style='font-family: courier new; font-weight: bold;'&gt;&lt;code&gt;pMsgQueue = CMqMgr::QueueInstance();&lt;/code&gt;&lt;/blockquote&gt;&lt;/iostream&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-6205766879500632356?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/6205766879500632356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=6205766879500632356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/6205766879500632356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/6205766879500632356'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2008/04/its-been-while.html' title='It&amp;#39;s been a while...'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-3494431961222432163</id><published>2008-02-09T16:37:00.000+01:00</published><updated>2008-02-10T10:43:50.724+01:00</updated><title type='text'>Need for debugging?  Well, there is...</title><content type='html'>When writing programs, ideally spoken you should think hard enough and your code should be "first time right".  But as I said, ideally spoken...&lt;br /&gt;&lt;br /&gt;Reality is in (can I say) 100% of the cases different: one simply needs at some moment(s) in time a debugger.&lt;br /&gt;&lt;br /&gt;For the FoxBoard, that's not so obvious.  Ok, I know, there's GDB and you can activate &lt;span style="font-style: italic; font-weight: bold;"&gt;gdbdebugger &lt;/span&gt;on the FoxBoard, but still, debugging on the GDB command line is only for the "happy few"...&lt;br /&gt;&lt;br /&gt;I myself prefer to have something more graphical.&lt;br /&gt;&lt;br /&gt;I've searched quite a bit to find what I was looking for.  I've used Eclipse, NetBeans, KDevelop and other exotic applications, but none of them could convince me to used it together with the FoxBoard to debug.&lt;br /&gt;&lt;br /&gt;I then found DDD, a graphical debugger that can be connected to the FoxBoard.  This one is good, very good even.  For those interested, I wrote an article on my Wiki website, which can be &lt;a href="http://www.gevawebsolutions.com/wiki/index.php?title=DDD_Debugging"&gt;read here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But I was still looking for something more "intuitive", something which looks more to the (sorry Linux guys) Windows debuggers, like there are Visual Studio/Visual Express (why always taking Micro$oft as a reference???).  Am I spoiled?  Yes, for sure, I am spoiled.  At least regarding debug environments...&lt;br /&gt;&lt;br /&gt;I finally found &lt;a href="http://sourceware.org/insight/index.php"&gt;&lt;span style="font-weight: bold; color: rgb(0, 153, 0);"&gt;Insight&lt;/span&gt;&lt;/a&gt;, a debugger GUI made by RedHat.  This looks very much to what I am used to see on Windows environments.&lt;br /&gt;&lt;br /&gt;However, like DDD, Insight is not "right out of the box" useable.  The reason is that this debugger is very "versatile": a lot of targets are supported, among them the &lt;span style="font-weight: bold;"&gt;CRIS &lt;/span&gt;one!&lt;br /&gt;&lt;br /&gt;You have to download the sources and compile it yourself.  But don't worry, I also wrote an article on how to do this on my Wiki pages.&lt;br /&gt;As usual, for the ones interested, they can &lt;a href="http://www.gevawebsolutions.com/wiki/index.php?title=Insight_Debugging"&gt;read the article here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Overall, I'm quite satisfied about this debugger.  Of course, this one too has its advantages and disadvantages, but on a scale of 10, I would give it a 7.&lt;br /&gt;&lt;br /&gt;For sure, better than all the rest I've looked into.&lt;br /&gt;&lt;br /&gt;Have fun reading the article, building the debugger and applying it on the FoxBoard!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-3494431961222432163?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/3494431961222432163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=3494431961222432163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/3494431961222432163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/3494431961222432163'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2008/02/need-for-debugging-well-there-is.html' title='Need for debugging?  Well, there is...'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-8435165817720726327</id><published>2008-02-05T19:44:00.000+01:00</published><updated>2008-02-05T19:49:41.498+01:00</updated><title type='text'>Auto log-in?  Sure!!!</title><content type='html'>Hi again,&lt;br /&gt;&lt;br /&gt;For the lazy ones among us (I'm definitely adding myself to this group of people...), there's a nice way to log in to the FoxBoard without having to retype the user name (root) and password (pass) over and over again.&lt;br /&gt;&lt;br /&gt;This so-called auto log-in can be done from Windows (using Putty), Linux and also CygWin (running under, yep, Windows)&lt;br /&gt;&lt;br /&gt;To avoid writing twice the same article (I'm lazy, remember?), I already wrote a complete article on how to set up such construction using a private/public key exchange between the FoxBoard on the one hand and Linux/Windows/CygWin on the other hand.&lt;br /&gt;&lt;br /&gt;If you're interested, pls. feel free to read &lt;a href="http://www.gevawebsolutions.com/wiki/index.php?title=Putty"&gt;this article&lt;/a&gt; on my Wiki.&lt;br /&gt;&lt;br /&gt;In case of questions/problems, you can always contact me.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-8435165817720726327?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/8435165817720726327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=8435165817720726327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/8435165817720726327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/8435165817720726327'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2008/02/auto-log-in-sure.html' title='Auto log-in?  Sure!!!'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-6920275429214631478</id><published>2008-01-24T18:53:00.000+01:00</published><updated>2008-01-24T19:27:23.339+01:00</updated><title type='text'>Dynamic or static?</title><content type='html'>A Linux driver is always assigned a major and minor device number.  You can see this when you do a &lt;span style="font-weight: bold;"&gt;ls -als&lt;/span&gt;.  Go to the /dev directory on your Linux system and execute the before mentioned command.&lt;br /&gt;&lt;br /&gt;An example is given below:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;[root@axis-00408c012351 /dev]192# ls -als&lt;br /&gt;0 cr--r--r--    1 root     root      61,   0 Jan 20  2008 cam0&lt;br /&gt;0 cr--r--r--    1 root     root      61,   1 Jan 20  2008 cam1&lt;br /&gt;0 cr--r--r--    1 root     root      61,   2 Jan 20  2008 cam2&lt;br /&gt;0 cr--r--r--    1 root     root      61,   3 Jan 20  2008 cam3&lt;br /&gt;0 cr--r--r--    1 root     root      61,  32 Jan 20  2008 camquad&lt;br /&gt;0 crw-rw-rw-    1 root     root      91,   0 Jan 20  2008 can0&lt;br /&gt;0 crw-rw-rw-    1 root     root      91,   1 Jan 20  2008 can1&lt;br /&gt;0 crw-rw-rw-    1 root     root      91,   2 Jan 20  2008 can2&lt;br /&gt;0 crw-r--r--    1 root     root      90,   0 Jan 20  2008 cflash0&lt;br /&gt;0 crw-r--r--    1 root     root      90,   2 Jan 20  2008 cflash1&lt;br /&gt;0 crw-r--r--    1 root     root      90,   4 Jan 20  2008 cflash2&lt;br /&gt;0 crw-r--r--    1 root     root      90,   6 Jan 20  2008 cflash3&lt;br /&gt;0 crw-r--r--    1 root     root      90,   8 Jan 20  2008 cflash4&lt;br /&gt;0 crw-r--r--    1 root     root      90,  10 Jan 20  2008 cflash5&lt;br /&gt;0 crw-------    1 root     tty        5,   1 Jan  1 00:00 console&lt;br /&gt;0 crw-r--r--    1 root     root     122,   0 Jan 20  2008 eeprom&lt;br /&gt;0 crw-rw----    1 root     root     193,   0 Jan 20  2008 event&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;When you look to column 6 and 7 in the above given table, you will see that column 6 represents the major device number and column 7 represents the minor device number.&lt;br /&gt;&lt;br /&gt;Since I'm working mainly on the I2C driver on the FoxBoard, I was interested in how this driver was set up.&lt;br /&gt;&lt;br /&gt;At the same time, I was reading the (very interesting) book Linux Device Drivers and while reading it, I was especially interested in the chapter handling the devices major and minor numbers.&lt;br /&gt;&lt;br /&gt;There was a very interesting statement done, which said to use dynamic device number allocation, in stead of doing it statically.&lt;br /&gt;&lt;br /&gt;It was not only the direction to go, it also has the following benefits:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The system will take care of the major and minor number allocated at runtime&lt;/li&gt;&lt;li&gt;You will not "clash" with a driver which has the same major and minor number&lt;/li&gt;&lt;li&gt;You're safe for the future&lt;/li&gt;&lt;/ul&gt;For me, those were reasons enough to go and see if I could change the major and minor device number allocation of the I2C driver from static to dynamic.&lt;br /&gt;&lt;br /&gt;I wrote a whole chapter on my Wiki pages, explaining what I have done to achieve this.  Not only was it a challenge, it forced me to learn the mechanisms which were (and still are) used to build the flash images for the FoxBoard.&lt;br /&gt;&lt;br /&gt;I don't want to fall into repetition, you can read the whole story &lt;a href="http://www.gevawebsolutions.com/wiki/index.php?title=FB_General_Issues#Adding_a_dynamic_MAJOR_number:_the_steps_to_take..."&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After you've done all necessary changes, you will see the effect when restarting the FoxBoard.  At a certain moment, you will see that a dynamic major and minor number is requested to the Linux kernel for the device.&lt;br /&gt;&lt;br /&gt;You will see that not the number 123 is given as major device number (as is the case with the static situation in the FoxBoard I2C code), but the number 254.  &lt;br /&gt;&lt;br /&gt;Here's the output when performing an &lt;span style="font-weight: bold;"&gt;ls -als&lt;/span&gt; in the directory &lt;span style="font-weight: bold;"&gt;/var/dev&lt;/span&gt;:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;[root@axis-00408c012351 /var/dev]132# ls -als&lt;br /&gt;   0 drwxr-xr-x    2 root     root           60 Jan  1 00:00 .&lt;br /&gt;   0 drwxr-xr-x   10 root     root          200 Jan  1 00:00 ..&lt;br /&gt;   0 crw-r--r--    1 root     root     254,   0 Jan  1 00:00 i2c&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This way, you are sure you won't "clash" with some other driver using the same major and minor numbers and you're sure you're following the advice of authorities in the Linux domain (writers of the Linux Device Driver book).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-6920275429214631478?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/6920275429214631478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=6920275429214631478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/6920275429214631478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/6920275429214631478'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2008/01/dynamic-or-static.html' title='Dynamic or static?'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-5313811628761787430</id><published>2008-01-20T12:49:00.001+01:00</published><updated>2008-01-20T16:42:47.355+01:00</updated><title type='text'>What the... * Error -d is not a supported platform</title><content type='html'>Back again with some news.&lt;br /&gt;&lt;br /&gt;As already mentioned in a previous blog, I had to re-install my Kubuntu on VmWare.&lt;br /&gt;&lt;br /&gt;Once this was done, I also re-installed the FoxBoard SDK from scratch.  However, when running the initial compilation, I quickly got the following error message on the screen, after which the installation ended:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;install -p -d     /home/fb/devboard-R2_01/tools/build-R2_12_4/bin&lt;br /&gt;    * Error -d is not a supported platform&lt;/pre&gt;&lt;br /&gt;I couldn't get any further, also the command &lt;span style="font-style: italic;"&gt;./configure&lt;/span&gt; was facing the same problem.&lt;br /&gt;&lt;br /&gt;After several tries and a lot of thinking (that hurts, you know!), I decided to analyse the whole installation script (&lt;span style="font-style: italic;"&gt;install_svn_sdk.sh&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;It took me a bit of time, but I got quite quickly an "eagle's view" on how the installation worked.&lt;br /&gt;&lt;br /&gt;I executed the commands step by step on the command line and I saw the error I gave above, appeared when I executed the following command:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;A=`yes n | \`make oldconfig 2&amp;amp;&gt; install.log\``&lt;/pre&gt;&lt;br /&gt;The result I got, was the following:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;make tools&lt;br /&gt;make[1]: Entering directory `/home/foxboard/devboard-R2_01'&lt;br /&gt;make -C tools/build install&lt;br /&gt;make[2]: Entering directory `/home/foxboard/devboard-R2_01/tools/build-R2_12_4'&lt;br /&gt;make -C ccdv install BINDIR="/home/foxboard/devboard-R2_01/tools/build-R2_12_4/bin" LIBDIR="/home/foxboard/devboard-R2_01/tools/build-R2_12_4/lib"&lt;br /&gt;make[3]: Entering directory `/home/foxboard/devboard-R2_01/tools/build-R2_12_4/ccdv'&lt;br /&gt;gcc -Wall -Wshadow -I/home/foxboard/devboard-R2_01/target/host/include -O0 -g -fno-omit-frame-pointer    -L/home/foxboard/devboard-R2_01/target/host/lib -Wl,-rpath-link,/home/foxboard/devboard-R2_01/target/host/lib  ccdv.c   -o ccdv&lt;br /&gt;install -p -d /home/foxboard/devboard-R2_01/tools/build-R2_12_4/bin&lt;br /&gt;* Error -p is not a supported platform&lt;br /&gt;make[3]: *** [install] Error 1&lt;br /&gt;make[3]: Leaving directory `/home/foxboard/devboard-R2_01/tools/build-R2_12_4/ccdv'&lt;br /&gt;make[2]: *** [ccdv] Error 2&lt;br /&gt;make[2]: Leaving directory `/home/foxboard/devboard-R2_01/tools/build-R2_12_4'&lt;br /&gt;make[1]: *** [tools] Error 2&lt;br /&gt;make[1]: Leaving directory `/home/foxboard/devboard-R2_01'&lt;br /&gt;make: *** [/home/foxboard/devboard-R2_01/tools/build/bin/aconf] Error 2&lt;/pre&gt;&lt;br /&gt;Then the search started to find out where the error could come from.&lt;br /&gt;&lt;br /&gt;As a last exit, I tried to run the installation as &lt;span style="font-style: italic; font-weight: bold;"&gt;root&lt;/span&gt; and to my surprise, I was able to install everything.  Only later, it was clear to me as to why that was possible (see further).&lt;br /&gt;&lt;br /&gt;Reverting back to a regular user, I tried over and over again, going bit by bit deeper into the problem.&lt;br /&gt;&lt;br /&gt;I followed the call to &lt;span style="font-weight: bold;"&gt;make oldconfig&lt;/span&gt; (the one that failed) and when looking to the makefile in &lt;span style="font-style: italic;"&gt;./devboard-R2.01-1&lt;/span&gt;, I found out that the target &lt;span style="font-style: italic;"&gt;oldconfig &lt;/span&gt;was defined as follows:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;## oldconfig - Updates the product configuration.&lt;br /&gt;##&lt;br /&gt;.PHONY: oldconfig&lt;br /&gt;oldconfig:      $(AXIS_TOP_DIR)/tools/build/bin/aconf&lt;br /&gt;@$(AXIS_TOP_DIR)/tools/build/bin/aconf -o configure-files/common/AC_common&lt;br /&gt;@touch Makefile&lt;/pre&gt;&lt;br /&gt;So, first the target &lt;span&gt;&lt;span style="font-weight: bold;"&gt;$(AXIS_TOP_DIR)/tools/build/bin/aconf&lt;/span&gt; in the same makefile was executed.  This target was defined as follows:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;$(AXIS_TOP_DIR)/tools/build/bin/aconf $(AXIS_TOP_DIR)/tools/build/bin/amconf:&lt;br /&gt;$(MAKE) tools&lt;/pre&gt;&lt;br /&gt;Here I saw the same makefile was called again, with the target tools.  The following was defined for that target:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;## tools - Builds and installs all tools on this host.&lt;br /&gt;##&lt;br /&gt;.PHONY: tools&lt;br /&gt;tools:&lt;br /&gt;$(MAKE) -C tools/build install&lt;/pre&gt;&lt;br /&gt;So, I saw the makefile in &lt;span style="font-style: italic;"&gt;/tools/build&lt;/span&gt; was called, with target install.&lt;br /&gt;&lt;br /&gt;Going to that makefile, I saw the target &lt;span style="font-weight: bold;"&gt;install &lt;/span&gt;was defined as follows:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;install:        $(ISUBDIRS) install_e100boot install_fsboot&lt;br /&gt;@echo "Installation of build tools complete."&lt;/pre&gt;&lt;br /&gt;That means, I had to look for the content of variable &lt;span style="font-weight: bold;"&gt;$(ISUBDIRS)&lt;/span&gt;.  This was defined as follows:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255); font-family: courier new;"&gt;ISUBDIRS :=&lt;br /&gt;    ccdv \&lt;br /&gt;    scripts \&lt;br /&gt;    aconfig \&lt;br /&gt;    filepp \&lt;br /&gt;    genromfs \&lt;br /&gt;    imgsum \&lt;br /&gt;    mkcramfs \&lt;br /&gt;    mkfs.jffs \&lt;br /&gt;    mkfs.jffs2&lt;br /&gt;    profile \&lt;br /&gt;    sermon \&lt;br /&gt;    sortdir \&lt;br /&gt;    tcptest \&lt;br /&gt;&lt;/pre&gt;Now I knew what command was filling &lt;span style="font-style: italic;"&gt;./devboard-R2.01-1/tools/build/bin&lt;/span&gt;!&lt;br /&gt;&lt;br /&gt;When looking close into the makefile, I saw at the beginning the following definition:&lt;br /&gt;&lt;br /&gt;INSTALL ?= install -p&lt;br /&gt;export INSTALL&lt;br /&gt;&lt;br /&gt;So, here the Linux command &lt;span style="font-weight: bold;"&gt;install -p&lt;/span&gt; was put under the variable &lt;span style="font-weight: bold;"&gt;INSTALL &lt;/span&gt;and then exported to the whole FoxBoard SDK.&lt;br /&gt;&lt;br /&gt;That means, everywhere where there was a call to &lt;span style="font-weight: bold;"&gt;$(INSTALL)&lt;/span&gt;, it was replaced by &lt;span style="font-style: italic;"&gt;install -p&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Finally, I found where the &lt;span style="font-style: italic;"&gt;install -p&lt;/span&gt; came from!!!&lt;br /&gt;&lt;br /&gt;Now, when I executed the command "&lt;span style="font-style: italic;"&gt;which install&lt;/span&gt;", I saw to my big surprise I was not getting the &lt;span style="font-style: italic;"&gt;executable &lt;/span&gt;install, located in /usr/bin, but the &lt;span style="font-style: italic;"&gt;script &lt;/span&gt;install instead, located in &lt;span style="font-style: italic;"&gt;./devboard-R2.01-1&lt;/span&gt;!!!&lt;br /&gt;&lt;br /&gt;The picture was clear to me now.  For one reason or another, the &lt;span style="font-weight: bold;"&gt;incorrect install&lt;/span&gt; was called!&lt;br /&gt;I started digging into the paths and what I see was the following:&lt;br /&gt;&lt;br /&gt;- I had extended the standard PATH variable with a couple of paths I'm frequently using, among others, the path &lt;span style="font-style: italic;"&gt;./devboard-R2.01-1&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;- But more important: I'd added my personal paths &lt;span style="font-weight: bold;"&gt;in front of the system paths&lt;/span&gt;!  So, when looking for the command install, the OS found one in the&lt;span style="font-style: italic;"&gt; ./devboard-R2.01-1&lt;/span&gt; directory, so there was &lt;span style="font-weight: bold;"&gt;no reason to go further along the path&lt;/span&gt; to look for another install!&lt;br /&gt;&lt;br /&gt;It was clear now: in stead of calling the &lt;span style="font-style: italic;"&gt;executable &lt;/span&gt;install, all FoxBoard SDK's were in fact calling the &lt;span style="font-style: italic;"&gt;script &lt;/span&gt;install.  Needless to say that a "target" -p indeed resulted in the error given at the top of that article.&lt;br /&gt;&lt;br /&gt;Since I knew the real cause, I simply solved it by &lt;span style="font-weight: bold;"&gt;changing the order the PATH environment variable was build up&lt;/span&gt;: first the system directories/paths and only then adding my own paths!!!&lt;br /&gt;&lt;br /&gt;This solved the issue, but still I think it's &lt;span style="font-style: italic;"&gt;not wise&lt;/span&gt; to have a script having the same name as an executable.  Therefore, I requested to AcmeSystems if they're willing to change the script &lt;span style="font-style: italic;"&gt;install &lt;/span&gt;into &lt;span style="font-style: italic;"&gt;installfoxsdk &lt;/span&gt;(or something like that).&lt;br /&gt;&lt;br /&gt;Let's see what the outcome is!&lt;br /&gt;&lt;br /&gt;What I've learned is, especially here, that it's very important to know the way the directory structure is traversed, if the OS is looking for an executable.&lt;br /&gt;&lt;br /&gt;Also, having a script the same name as an executable isn't a wise choice, but that's my humble opinion.&lt;br /&gt;&lt;br /&gt;And finally, why was I able to run the scripts as a root?  Well, simply because for the user root, the paths were not "polluted" with the FoxBoard paths.  That is, install was really the executable install, not the script install!!!&lt;br /&gt;&lt;br /&gt;Learning all the time...&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-5313811628761787430?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/5313811628761787430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=5313811628761787430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/5313811628761787430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/5313811628761787430'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2008/01/what-error-d-is-not-supported-platform.html' title='What the... * Error -d is not a supported platform'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-168933802256711392</id><published>2008-01-09T19:22:00.000+01:00</published><updated>2008-01-09T20:32:59.651+01:00</updated><title type='text'>Small disaster happened</title><content type='html'>First off, a happy and prosperous new year for the people reading this blog!&lt;br /&gt;&lt;br /&gt;The day before Christmas, I was working again (of course) on my domotics system.  While doing an update of my Kubuntu 6.10 virtual machine, I was told I could upgrade to Kubuntu 7.10.&lt;br /&gt;&lt;br /&gt;Since I'm always quite eager to do this (being up-to-date with my applications/OS), I took the risk to start the upgrade.&lt;br /&gt;&lt;br /&gt;All went fine, until the moment I lost my internet connection on my virtual machine.  Shortly after, I got the message that the system could not download any more the remaining parts of the upgrade.&lt;br /&gt;&lt;br /&gt;And there I stood...  A system which was half-half upgraded but that could not access the internet any more.  Even worse, my samba connection was gone too, so I could not even reach my virtual machine from my Windows environment any more.  Sad, sad, sad...&lt;br /&gt;&lt;br /&gt;I've been looking on the internet, asked for some advice, but nobody that could help me get my internet connection back on my virtual machine.&lt;br /&gt;&lt;br /&gt;Luckily, I'm taking a weekly backup of the software I've written for my domotics system, so I was quite confident I was not going to loose the most important thing.&lt;br /&gt;&lt;br /&gt;In the end, the only thing I could do was buying a new harddisk and install Kubuntu 7.10 from scratch.  I definitely didn't want to re-install what I still had, because one day or another there might be things I need on my new installation that are still only available on my, well, call it from now onwards "back-up".&lt;br /&gt;&lt;br /&gt;The biggest problem now will be to have the state of the new virtual machine equal to the state of the old one.&lt;br /&gt;&lt;br /&gt;Since I installed quite a bit of apps (going from FoxBoard stuff to debugging tools to editing tools to Kubuntu tools), it will take me still a lot of time to get on the same level again.  This has been 14 days now, so I lost quite a bit of time.&lt;br /&gt;&lt;br /&gt;In the mean time, I've re-installed the FoxBoard SDK on the new distro and bit by bit I will try to get to the level I had on my old distro.&lt;br /&gt;&lt;br /&gt;Conclusion: be very careful with upgrades.  If I want to do an upgrade in the (near) future, I will definitely start from scratch and as long as the new situation has not reached the level of the old situation, I won't change anything any more to the stable environment.&lt;br /&gt;&lt;br /&gt;I've learned my lessons, I would say.  So, be warned... ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-168933802256711392?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/168933802256711392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=168933802256711392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/168933802256711392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/168933802256711392'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2008/01/small-disaster-happened.html' title='Small disaster happened'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-1312565162499148287</id><published>2007-11-18T11:51:00.001+01:00</published><updated>2007-11-18T11:55:33.032+01:00</updated><title type='text'>Problems with P0.7 of PCF8575</title><content type='html'>I recently discovered I have problems when controlling the PCF8575 (16-bit I&lt;sup&gt;2&lt;/sup&gt;C controlled IO expander) in such a way, that P0.7 is put as input (so, P0.7 is high).&lt;br /&gt;Whenever P0.7 is put high, all other pins (P0.0 - P0.6 as well as P1.0 - P1.7) are becoming inputs too, whatever their previous state (input or output).&lt;br /&gt;Also, the PCF8575 does &lt;span style="font-weight:bold;"&gt;not&lt;/span&gt; detect any input changes any more...&lt;br /&gt;&lt;br /&gt;I still have no clue at all as to why this IO expander is behaving so strange.&lt;br /&gt;&lt;br /&gt;The moment I switch P0.7 as output, all my other pins behave correct again (as input as well as output).&lt;br /&gt;&lt;br /&gt;Still looking for a possible cause...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-1312565162499148287?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/1312565162499148287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=1312565162499148287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/1312565162499148287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/1312565162499148287'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/problems-with-p07-of-pcf8575.html' title='Problems with P0.7 of PCF8575'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-9190398371523428235</id><published>2007-11-09T19:07:00.000+01:00</published><updated>2007-11-09T20:14:35.575+01:00</updated><title type='text'>3V to 5V I2C translation problem</title><content type='html'>Knowing the FoxBoard is running on 3V3, this means the levels of my I&lt;sup&gt;2&lt;/sup&gt;C output are between 0V and 3V3.&lt;br /&gt;&lt;br /&gt;However, I want to power my own devices with 5V, if possible.  This is because most devices I'm going to use, are working just fine at 5V (some of them are also capable of working at lower voltages, but for simplicity I will stick to one supply of 5V).&lt;br /&gt;&lt;br /&gt;Luckily, nowadays lots of IC's are available, which are able to do very nice things.  Such IC is the PCA9518 from NXP (formerly known as Philips), an expandable 5-channel I&lt;sup&gt;2&lt;/sup&gt;C hub.&lt;br /&gt;&lt;br /&gt;This device is mainly developed to solve the capacitance load an I&lt;sup&gt;2&lt;/sup&gt;C bus is allowed to have (max. 400pF).  It has one "main" I&lt;sup&gt;2&lt;/sup&gt;C input, while it can have up to 4 extra I&lt;sup&gt;2&lt;/sup&gt;C outputs, completely isolated one from the other.  So, the main I&lt;sup&gt;2&lt;/sup&gt;C input doesn't see neither of the output loads.  Each output load individually also doesn't "see" the capacitance load of the other outputs.&lt;br /&gt;This way, you can have multiple I&lt;sup&gt;2&lt;/sup&gt;C paths while adhering the max. bus capacitance of 400pF.&lt;br /&gt;&lt;br /&gt;Next, this device has 5V tolerant I&lt;sup&gt;2&lt;/sup&gt;C lines.  That means, the device itself is powered with 3V3 (so, can be connected to the power supply of the FoxBoard), but the pins can "communicate" with I&lt;sup&gt;2&lt;/sup&gt;C levels that go till 5V.  Result: device can be used as a 3V3 to 5V translator, without having to have complex voltage levelling circuitry in between.  This is a very important input for me, since that will solve my voltage level problem.&lt;br /&gt;&lt;br /&gt;Another nice thing about the PCA9518 is that it can be "cascaded" with other PCA9518 chips, extending your I&lt;sup&gt;2&lt;/sup&gt;C bus almost infinitely.&lt;br /&gt;&lt;br /&gt;More information about the PCA9518 can be found &lt;a href="http://www.nxp.com/#/pip/pip=[pip=PCA9518_4]|pp=[v=d,t=pip,i=PCA9518_4,fi=PCA9518_4,ps=0][0]"&gt;here&lt;/a&gt;.   &lt;br /&gt;&lt;br /&gt;If you check the application note on page 10, then you will see that in the example given there are two PCA9518 devices, cascaded one to the other.  Bpth PCA9518 devices are powered with 3V3, together with the I2C bus master.&lt;br /&gt;But all the other I&lt;sup&gt;2&lt;/sup&gt;C devices are powered with 5V, showing you it's simple doable to "convert" the levels from 3V3 to 5V.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-9190398371523428235?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/9190398371523428235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=9190398371523428235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/9190398371523428235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/9190398371523428235'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/3v-to-5v-i2c-translation-problem.html' title='3V to 5V I&lt;sup&gt;2&lt;/sup&gt;C translation problem'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-3128138168471824765</id><published>2007-11-08T20:17:00.000+01:00</published><updated>2007-11-08T20:27:51.584+01:00</updated><title type='text'>Putting my application on a USB stick...</title><content type='html'>In case the 4MB of FRAM of the FoxBoard type MCM would not be sufficient, I can/will put my application on a USB stick and when the FoxBoard starts up, I can run my application from the USB stick.&lt;br /&gt;&lt;br /&gt;This way, I can make bigger applications (there's 16MB of RAM available in the MCM version) and I don't have to flash the application in FRAM all the time too.&lt;br /&gt;&lt;br /&gt;That's a time gainer and it will also prevent my FoxBoard FRAM from wearing out (although there are tens of thousands of writes that can be done).&lt;br /&gt;&lt;br /&gt;Activating the USB feature during boot-up of the Linux kernel was/is quite easy.  A small script must be put in a writeable FRAM location (see my &lt;a href="http://www.gevawebsolutions.com/wiki"&gt;Wiki&lt;/a&gt; pages for more details about this.&lt;br /&gt;&lt;br /&gt;For the newer board I have, an FS version, this will be even more luxurious, since that board has 8MB of FRAM and 32MB of SDRAM...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-3128138168471824765?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/3128138168471824765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=3128138168471824765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/3128138168471824765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/3128138168471824765'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/putting-my-application-on-usb-stick.html' title='Putting my application on a USB stick...'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-7413002118047612011</id><published>2007-11-08T20:04:00.000+01:00</published><updated>2007-11-08T20:10:27.130+01:00</updated><title type='text'>Queue is fully operational!</title><content type='html'>The queue mechanism I was working on, is fully operational!  Nice to see it smoothless working...&lt;br /&gt;&lt;br /&gt;As a test case, I've written the following software:&lt;br /&gt;&lt;br /&gt;When I press and release a button, the time is measured.  That info is sent to the message queue and when it arrives in the message queue manager, the data is analysed.&lt;br /&gt;&lt;br /&gt;First, the message type is representing the IO expander which has caused that message.  Next, I know the pin which has changed and I also know the time that pin has been low (so, the time the button has been pressed).&lt;br /&gt;&lt;br /&gt;If the time is less than 1 sec, I'm lighting up a certain LED from an IO expander which has been configured as OUTPUT.&lt;br /&gt;When the time is equal or more than 1 sec, another LED of the same IO expander is activated.&lt;br /&gt;&lt;br /&gt;This way, I know my queue mechanism is working and I know I can measure the time a button has been pressed.  Out of this, I can decide if I want to give a second (and in extreme conditions even a third) function to that button.&lt;br /&gt;&lt;br /&gt;I still have to clean up a bit, but that's another part of my domotics system which is already working.&lt;br /&gt;&lt;br /&gt;I'm satisfied about the progress&lt;br /&gt;&lt;br /&gt;Oh, I love the FoxBoard!!!  It's working so smooth!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-7413002118047612011?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/7413002118047612011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=7413002118047612011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/7413002118047612011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/7413002118047612011'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/queue-is-fully-operational.html' title='Queue is fully operational!'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-1799606453951054994</id><published>2007-11-07T20:31:00.000+01:00</published><updated>2007-11-08T20:04:47.169+01:00</updated><title type='text'>Queueing, queueing, queueing...</title><content type='html'>I'm currently busy making a mechanism whereby my IO expanders, used as inputs, are polling their inputs at a rate of a multiple of 10ms.&lt;br /&gt;&lt;br /&gt;Each input pin can be polled independently at different times (but always a multiple of 10ms, with 10ms as a minimum poll time).  For instance, if I take the PCF8575 IO expander, all 16 pins can have an individual polling time.&lt;br /&gt;&lt;br /&gt;Polling is done on a separate thread.  The thread is made as a "while ( 1 )" loop, with a "sleep" condition of 10ms.  That sleep is accomplished using the function "select()", which normally is doing some IO to external devices.&lt;br /&gt;However, you can set a time-out time and that's what I'm "misusing" for the moment.  All other parameters are 0 or NULL, while the time-out is set to 10ms.&lt;br /&gt;&lt;br /&gt;Every 10ms, a check is done to see if for (a) certain pin(s) the polling time has elapsed.&lt;br /&gt;&lt;br /&gt;For instance, suppose the polling time for pin 1 is every 40ms and for pin 3 every 60ms, then at 40, 80 and 120ms pin 1 will be checked and at 60 and 120ms pin 3 will be checked.  You see that every 120ms both pins 1 and 3 are checked!&lt;br /&gt;&lt;br /&gt;When I have the result, I should of course do something with it.  The IO pins are checking if a connected button is pressed or not.  Since I'm checking at regular times, I can know when the button has been pressed, but also when the button has been released.  So, I can measure the time the button has been pressed.&lt;br /&gt;&lt;br /&gt;This is very interesting: this way, I can give multiple functions to one and the same button.  For instance, if a button is pressed less than 500ms, it has a "normal" function (e.g. switching on/off a certain light), but if it has been pressed for more than, say, 2 seconds, I can for instance start dimming up/down that certain light!&lt;br /&gt;&lt;br /&gt;All this info is gathered at the level of the IO expander class, but it has also to be sent to another IO expander which is used as output (for instance, to control a relays).&lt;br /&gt;&lt;br /&gt;Since more than one IO expander is used as input, I needed a mechanism to not loose any information (which button is pressed, how long has it been pressed, to which IO expander is the button connected, etc.)&lt;br /&gt;&lt;br /&gt;Therefore, I've created a structure which contains all that data.  Next to this, I've created a message queue (in the same process, so not an IPC message queue).  That message queue is bringing all that information into a queue manager.&lt;br /&gt;&lt;br /&gt;That queue manager has a blocking receive call on the message queue and the moment a message arrives, the queue manager will analyse that message and see which destination it has to addressed it to.&lt;br /&gt;&lt;br /&gt;I'm currently implementing that queue mechanism and the last thing I have to do, is to allow the queue manager (messages are already sent from the IO input expanders via the message queue to the queue manager, that already works great) to distribute the received data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-1799606453951054994?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/1799606453951054994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=1799606453951054994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/1799606453951054994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/1799606453951054994'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/queueing-queueing-queueing.html' title='Queueing, queueing, queueing...'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-3109128675363465724</id><published>2007-11-04T13:44:00.000+01:00</published><updated>2008-01-27T13:04:17.445+01:00</updated><title type='text'>My development set-up</title><content type='html'>To develop my software for/on the FoxBoard, I've chosen to use the following set-up:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;My PC is a Pentium 4, 3.2GHz with 1GB RAM and two internal harddisks of 160GB each.&lt;br /&gt;Next to this, there are another two external harddisks of 160GB each.  Both external harddisks are connected using a FireWire connection (aka 1394).&lt;br /&gt;You can see my set-up below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_kyOrdQnyYdI/Ry6pY-IxDvI/AAAAAAAAABQ/tWrn2cyN7GM/s1600-h/PICT3281.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_kyOrdQnyYdI/Ry6pY-IxDvI/AAAAAAAAABQ/tWrn2cyN7GM/s320/PICT3281.JPG" alt="" id="BLOGGER_PHOTO_ID_5129223272083295986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;On the left, you see the monitor for my Linux sessions (and occasionally also some Windows applications if the right monitor gets too busy).&lt;br /&gt;Yes, I'm an animal lover,hence the wolf as a background picture (but in fact, tigers are my favourite ones...).&lt;br /&gt;&lt;br /&gt;Next to this monitor, the monitor for my Windows applications.&lt;br /&gt;&lt;br /&gt;If you click the picture, you will also see the two external harddisks (while a third one is waiting to be build into a harddisk case).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;My main OS is (sorry, Linux freaks) WinXP Home Edition SP2.  But I do like Linux more...  See further.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;On my PC, I've installed VmWare, so that I'm able to run Linux in a virtual machine (here you go, Linux freaks, I'm one of them too...)&lt;br /&gt;I've done this to avoid having to use a second PC to run Linux.  This way of working not only saves space on my desk, it also is much less power consuming&lt;br /&gt;Taking care of the environment is one of my hobbit horses and I'm doing whatever I can to save as much as possible resources...&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I'm running Kubuntu Gutsy Gibbon as Linux OS, where I've installed the SDK of Axis (with lots of modifications done by &lt;span style="font-weight: bold; font-style: italic;"&gt;John Crispin&lt;/span&gt;).&lt;br /&gt;I recently re-installed the SDK (due to a crash with Kubuntu while upgrading from verions 6.10 to 7.10, see another article in this blog...), using the SVN installation script &lt;a href="http://www.acmesystems.it/?id=714"&gt;as explained on the Acme Website&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I've also installed Samba on my Linux machine, to be able to see the content of certain directories under Windows too.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I also have two LCD monitors: one for my Windows applications and one for my Linux applications.&lt;br /&gt;&lt;br /&gt;"But, you idiot, if the environment is so important to you, why do you use two monitors then", one can ask?  Well, let me try to "defend" myself:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Both monitors are of the LCD type, so together they're consuming less than one "classic" monitor&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It's very unhandy if you have to "control" the screens of two different operating systems on one monitor&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Next to this, I'm trying to do as much as possible from within my Windows environment (NotePad++ is a God's Blessing to do those things, see just below), so I don't really need much my Linux monitor, which I switch off then of course...&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;To edit my files, I'm using NotePad++ (visit &lt;a href="http://notepad-plus.sourceforge.net/uk/site.htm"&gt;http://notepad-plus.sourceforge.net/uk/site.htm&lt;/a&gt; for more info about this wonderful editor).&lt;br /&gt;This editor is running under Windows.&lt;br /&gt;But why did I choose again for a Windows application to develop Linux stuff???  Well, see below:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I'm spoiled by the Windows GUI for more than 15 years now, so kicking the habbit is quite "heavy"&lt;/li&gt;&lt;li&gt;I didn't find any decent and competitive editor running under Linux.  I've tried Eclipse, NetBeans, KDevelop, Kate,...&lt;br /&gt;All have their own pro's and con's, but none of them could compete with the ease of use of NotePad++&lt;/li&gt;&lt;li&gt;I'm able to in fact do almost everything from my Windows environment (even running Linux tasks), so why would I switch constantly between Linux and Windows?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The only reason I really need to &lt;span style="font-style: italic;"&gt;see&lt;/span&gt; my Linux OS on my monitor, is when I need the debugger (see further), since this one is solely running under Linux.  And also (but very occasionally) when I have to restart my Linux virtual machine (but that's mostly because I've made a mistake...)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To compile my FoxBoard software, I'm using (of course) the compiler/linker which is part of the SDK provided by AcmeSystems (&lt;a href="http://www.acmesystems.it/"&gt;http://www.acmesystems.it&lt;/a&gt;).  This one is (for sure) running on my Linux virtual machine.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To debug my FoxBoard software (yes, I indeed need a debugger from time to time), I'm using Insight from RedHat (visit &lt;a href="http://sources.redhat.com/insight"&gt;http://sources.redhat.com/insight&lt;/a&gt; to know more about this debugger).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I've found a way to start my makes on the Linux machine from within NotePad++.  This is extremely handy, since I really like this editor and now I can even start my builds on the Linux machine and see the feedback in a console window of NotPad++.&lt;br /&gt;To acomplish this "trick", I wrote a small parametrised shell script that I'm calling from NotePad++.&lt;br /&gt;But there's more to it: to be able to call a Linux script from Windows, you need a tool like &lt;span style="font-weight: bold;"&gt;plink&lt;/span&gt; to "bridge" the gap between Linux and Windows.  The whole Putty suite (including &lt;span style="font-style: italic;"&gt;plink&lt;/span&gt;) can be found here: &lt;a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html"&gt;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&lt;/a&gt;.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Plink &lt;/span&gt;needs a private/public key to see if it's allowed to run a script on a Linux machine, coming from a Windows environment.&lt;br /&gt;Once &lt;span style="font-style: italic;"&gt;plink &lt;/span&gt;is installed correctly (create a private/public key using &lt;span style="font-style: italic;"&gt;puttygen&lt;/span&gt;, part of the Putty suite, for this), I can call this application with the necessary parameters to run the build on my Linux environment.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To be able to do that in NotePad++, you need to install a plug-in (NotePad++ has an open architecture, that is, you can create plug-ins for NotePad++ yourself) called &lt;span style="font-weight: bold;"&gt;NppExec&lt;/span&gt;.  This plug-in is written by &lt;span style="font-weight: bold;"&gt;Vitaliy Dovgan&lt;/span&gt; and can be downloaded here: &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=189927&amp;amp;package_id=224034"&gt;http://sourceforge.net/project/showfiles.php?group_id=189927&amp;amp;package_id=224034&lt;/a&gt;.&lt;br /&gt;The image below shows my NotePad++ editor with the console window showing the compilation steps of a build:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_kyOrdQnyYdI/Ry3FyOIxDuI/AAAAAAAAABI/vkxbSrywqtc/s1600-h/npp.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_kyOrdQnyYdI/Ry3FyOIxDuI/AAAAAAAAABI/vkxbSrywqtc/s320/npp.jpg" alt="" id="BLOGGER_PHOTO_ID_5128973017223859938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;At the end of every compilation, I've a script running that automatically downloads the new program to the FoxBoard, using FTP (file transfer protocol).&lt;br /&gt;The FoxBoard is connected to my Linux machine via my router (so, using ethernet connections).&lt;br /&gt;I've created a special directory on the FoxBoard root file system in RAM, to which I FTP my new executable after every build.  As said before, this is done automatically.&lt;br /&gt;So, very frequently downloading the application for testing purposes in that memory area cannot harm the life span of the FoxBoard memory, since it's RAM.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Once the application is more or less ready for another test phase, I'm copying the application in a USB memory stick, connect that stick to the FoxBoard, restart the FoxBoard and automatically this application is read out while booting up the FoxBoard.&lt;br /&gt;The application starts automatically to run.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Easier than this is to change code, recompile and reprogram in the FoxBoard, is next to impossible, I think...&lt;br /&gt;&lt;br /&gt;For those interested: I also have a Wiki page explaining some stuff much more in detail.&lt;br /&gt;Pls. visit &lt;a href="http://www.gevawebsolutions.com/wiki/index.php?title=Main_Page"&gt;http://www.gevawebsolutions.com/wiki/index.php?title=Main_Page&lt;/a&gt; to read more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-3109128675363465724?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/3109128675363465724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=3109128675363465724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/3109128675363465724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/3109128675363465724'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/my-development-set-up.html' title='My development set-up'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_kyOrdQnyYdI/Ry6pY-IxDvI/AAAAAAAAABQ/tWrn2cyN7GM/s72-c/PICT3281.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-6123890796735531317</id><published>2007-11-04T12:37:00.002+01:00</published><updated>2008-02-05T19:55:01.591+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NXP'/><category scheme='http://www.blogger.com/atom/ns#' term='PCF8575'/><category scheme='http://www.blogger.com/atom/ns#' term='PCF8574'/><category scheme='http://www.blogger.com/atom/ns#' term='Philips'/><category scheme='http://www.blogger.com/atom/ns#' term='LM75a'/><category scheme='http://www.blogger.com/atom/ns#' term='PCF8563'/><category scheme='http://www.blogger.com/atom/ns#' term='TDA8444'/><category scheme='http://www.blogger.com/atom/ns#' term='PCF8591'/><title type='text'>What I'm currently doing (Nov. 2007)</title><content type='html'>After having improved the I2C driver for the FoxBoard, I started to develop different component classes for I2C devices.&lt;br /&gt;&lt;br /&gt;As already said in a previous post, my whole domotics system is based on components capable of handling the I2C protocol.&lt;br /&gt;&lt;br /&gt;This protocol is very simple and yet,  very powerful.  There are only two wires involved: one data line, called &lt;span style="font-weight: bold;"&gt;SDA &lt;/span&gt;(&lt;span style="font-style: italic;"&gt;serial data&lt;/span&gt;)&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;and one clock line, called &lt;span style="font-weight: bold;"&gt;SCL&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;serial clock&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;The clock line is mainly there for synchronisation purposes between a master (the one who sends out the I2C commands, mostly a [micro]processor such as the &lt;span style="font-weight: bold; font-style: italic;"&gt;FoxBoard&lt;/span&gt;) and the slave (the one who reacts upon the commands sent by the master).&lt;br /&gt;&lt;br /&gt;A complete description of the I2C protocol can be found on the NXP (formerly known as &lt;a href="http://www.philips.com/"&gt;&lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;Philips&lt;/span&gt;&lt;/a&gt;) website:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nxp.com/acrobat_download/literature/9398/39340011.pdf"&gt;http://www.nxp.com/acrobat_download/literature/9398/39340011.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This spec dates from January 2000, but I recently found a (very recent) update of that spec here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nxp.com/acrobat_download/usermanuals/UM10204_3.pdf"&gt;http://www.nxp.com/acrobat_download/usermanuals/UM10204_3.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The fact there are only two communication wires involved, makes it very interesting wrt PCB space, when developing the hardware.&lt;br /&gt;&lt;br /&gt;That said, I'm currently developing a C++ based hardware abstraction layer.  The purpose of this layer is to hide the peculiarities one can have when a direct Linux kernel call is to be made.  It's quite cumbersome and error prone to do so, hence one of the main reasons I developed that HAL.&lt;br /&gt;Calling I2C functions is now very easy and &lt;span style="font-style: italic;"&gt;very transparent&lt;/span&gt;: understandable calls can be made, which "under the hood" do all the dirty work, away from the user.&lt;br /&gt;&lt;br /&gt;The HAL is next to finished, so I'm going one step higher in the creation of component classes for I2C devices: classes for the I2C devices themselves.&lt;br /&gt;&lt;br /&gt;Those classes are all communicating to the I2C driver in the kernel, through the HAL.  So, I immediately benefit from my own HAL class... ;-)&lt;br /&gt;&lt;br /&gt;The components I am/will using/use for my domotics system, are (all I2C controlled):&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PCF8574: an Input/Output expander (short: IO expander) which can detect changes at its input pins (when used as input) or control the status of the output pins (when used as outputs).&lt;br /&gt;The advantage of such device is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I2C controlled&lt;/li&gt;&lt;li&gt;Each pin can individually be set as input (to measure) or output (to control) at any moment in time&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;PCF8575: Similar to the PCF8574, but this one has 16 IO pins iso "only" 8 IO pins.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PCF8591: an ADC device (analogue to digital converter) capable of measuring analogue signals (light, temperature, movement) and translate it in digital information.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;TDA8444: a DAC device (digital to analogue converter), which does just the opposite of a PCF8591.  It converts digital information to analogue values.&lt;br /&gt;This device will be used to control dimmers etc.  Mostly, dimmers can be controlled by applying an analogue voltage between 0 and (mostly) 5 to 10 V.  This corresponds with no power at all at the output of the dimmer (when applying 0V) to maximum power (when applying 5 or 10V, depending on the type used).&lt;br /&gt;Those dimmers will be used to create different atmospheres in some rooms (for instance, when watching television, you want another light compared to reading the newspaper in a seat in the living room).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PCF8563: a RTC device (real time counter) which is necessary to keep track of the time in the system.  This device has a high level of accuracy and can be used to synchronise the clock of the Linux system, after -for instance- the system comes out of stand-by.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;24C32: a NVM device (non-volatile memory) which is needed to store values that will be needed again at a later time (for instance, store the intensity of a certain dimmer at a certain moment, store the reference temperature for the different rooms,...).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;LM75A: a temperature measuring device.  Such device will be placed in every room to be able to measure/control the temperature individually.&lt;br /&gt;Also, this device will be used to measure the outgoing and incoming water temperature of the floor heating system and to measure the temperature in the hot water boilers.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Maybe others will be added...&lt;/li&gt;&lt;/ul&gt;For all of the above, I'm busy creating and testing C++ classes to be able to reuse the code when more than one such component is needed.&lt;br /&gt;&lt;br /&gt;Classes which are already more or less complete (well... what is &lt;span style="font-style: italic;"&gt;complete&lt;/span&gt; anyway...):&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PCF8563&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PCF8574&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PCF8575&lt;/li&gt;&lt;/ul&gt;Here's a picture of my current test set-up (didn't develop PCB's yet):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_kyOrdQnyYdI/Ry26Z-IxDtI/AAAAAAAAABA/r2mfbJEkcLA/s1600-h/PICT3280.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_kyOrdQnyYdI/Ry26Z-IxDtI/AAAAAAAAABA/r2mfbJEkcLA/s320/PICT3280.JPG" alt="" id="BLOGGER_PHOTO_ID_5128960505984126674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On the picture above, you can see a close-up of my "test environment".  On the image, there are (click on the image to see the big version):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Two PCF8575-IO expander components (the two &lt;span style="font-style: italic;"&gt;greenish&lt;/span&gt; parts)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;One PCF8574-IO expander (top left of the white breadboard)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;One PCF8583-RTC (bottom left of the white breadboard)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Another PCF8563-RTC (small green PCB on the left of the white breadboard)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-6123890796735531317?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/6123890796735531317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=6123890796735531317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/6123890796735531317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/6123890796735531317'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/what-im-currently-doing.html' title='What I&apos;m currently doing (Nov. 2007)'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_kyOrdQnyYdI/Ry26Z-IxDtI/AAAAAAAAABA/r2mfbJEkcLA/s72-c/PICT3280.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8725121772698431885.post-349900763784146179</id><published>2007-11-04T09:16:00.000+01:00</published><updated>2007-12-09T13:55:11.989+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='foxboard'/><category scheme='http://www.blogger.com/atom/ns#' term='i2c'/><category scheme='http://www.blogger.com/atom/ns#' term='domotics'/><title type='text'>The great discovery: FoxBoard</title><content type='html'>&lt;span style="font-family:verdana;"&gt;While looking for a decent processor for my domotics system, I initially started with a good old &lt;span style="font-style: italic;"&gt;8051 &lt;/span&gt;derivative (Philips 89C668 version).&lt;br /&gt;&lt;br /&gt;However, soon it appeared this processor was way to "small" to fulfil the needs I had.  Small in the sense that it had too few memory (both ROM as well as RAM).&lt;br /&gt;Also, there was no basic functionality available, such as a robust OS, USB functionality, ethernet functionality, web server, etc. etc.&lt;br /&gt;&lt;br /&gt;Pure by luck, I met a colleague at the office who was experimenting with a couple of 8051 alternatives, to extent their automatic test cases environment (testing high quality Philips televisions).  One of their test cases was the FoxBoard.&lt;br /&gt;&lt;br /&gt;Honesty obeys me to say I'd never heard of it before.  But since I heard it was running embedded Linux (waaawww!!!!), I was immediately triggered (read: very much interested).&lt;br /&gt;&lt;br /&gt;I got some information from this colleague and one of the first things I did, was surfing on the inet to find more information about this small device.&lt;br /&gt;&lt;br /&gt;I must say: when I read the specs of that device, I was really astonished!  So much on such small board, running Linux!!!&lt;br /&gt;There was USB, RS232, Ethernet, FTP, SSH, WebServer, Telnet,...  Next to complete!&lt;br /&gt;&lt;br /&gt;I immediately got me such board and ever since, I'm working on it to develop my home automation system (aka. domotics).&lt;br /&gt;&lt;br /&gt;This is how the board I currently use, looks like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kyOrdQnyYdI/Ry2EDuIxDqI/AAAAAAAAAAo/Pqw23P9a7FY/s1600-h/foxmcm.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_kyOrdQnyYdI/Ry2EDuIxDqI/AAAAAAAAAAo/Pqw23P9a7FY/s320/foxmcm.jpg" alt="" id="BLOGGER_PHOTO_ID_5128900750104137378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is the famous &lt;span style="font-weight:bold;"&gt;MCM Classic Red FoxBoard&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;.  &lt;br /&gt;&lt;span style="font-style:italic;"&gt;MCM&lt;/span&gt; means &lt;span style="font-weight:bold;"&gt;m&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;ulti &lt;span style="font-weight:bold;"&gt;c&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;omponents &lt;span style="font-weight:bold;"&gt;m&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;odule, since this chip contains next to the processor, also the RAM and FLASH chips (and maybe more), all in one.&lt;br /&gt;&lt;br /&gt;I must say, I'm very satisfied about the board and have spent already many, many hours developing software on it.&lt;br /&gt;&lt;br /&gt;One of the first things I needed, was a decently working I2C driver.  The original one was not really performing the way I wanted it to perform, so I decided to rewrite most of the existing driver.&lt;br /&gt;That resulted in a stable, reliable and fast I2C driver which I made freely available under the &lt;span style="font-style:italic;"&gt;GPL license&lt;span style="font-weight:bold;"&gt;&lt;/span&gt;&lt;/span&gt; to the FoxBoard community.  You can find it here:  &lt;a href="http://tech.groups.yahoo.com/group/foxboard/files/GeertVc/"&gt;Tuned I&lt;sup&gt;2&lt;/sup&gt;C driver&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Since my whole system is running on the I2C protocol, I don't have to worry about this one any more.  At least, my basic protocol is working fine, the rest of the software/hardware is based on this protocol.&lt;br /&gt;&lt;br /&gt;In the mean time, there's a newer version available, which has more FRAM and RAM.  Here's a picture of the new version:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_kyOrdQnyYdI/Ry2CjOIxDoI/AAAAAAAAAAY/h_12tt3p-ho/s1600-h/foxlx.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_kyOrdQnyYdI/Ry2CjOIxDoI/AAAAAAAAAAY/h_12tt3p-ho/s320/foxlx.jpg" alt="" id="BLOGGER_PHOTO_ID_5128899092246761090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This new board has 16MB of FRAM and 32MB or RAM!  More than enough to do wonderful things with it...&lt;br /&gt;&lt;br /&gt;You can find lots of information on the AcmeSystems web site:&lt;br /&gt;&lt;a href="http://www.acmesystems.it/"&gt;&lt;br /&gt;http://www.acmesystems.it&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There's also a newsgroup about the FoxBoard, which you can find here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tech.groups.yahoo.com/group/foxboard/"&gt;http://tech.groups.yahoo.com/group/foxboard/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Attention: a Yahoo account is needed to be able to actively participate in this newsgroup.&lt;br /&gt;&lt;br /&gt;--Geert&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8725121772698431885-349900763784146179?l=thefoxboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thefoxboard.blogspot.com/feeds/349900763784146179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8725121772698431885&amp;postID=349900763784146179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/349900763784146179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8725121772698431885/posts/default/349900763784146179'/><link rel='alternate' type='text/html' href='http://thefoxboard.blogspot.com/2007/11/great-discovery-foxboard.html' title='The great discovery: FoxBoard'/><author><name>Blogux</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kyOrdQnyYdI/Ry2EDuIxDqI/AAAAAAAAAAo/Pqw23P9a7FY/s72-c/foxmcm.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
