<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-34628062</atom:id><lastBuildDate>Tue, 02 Dec 2008 02:20:05 +0000</lastBuildDate><title>Stack Overflow</title><description>I'll be primarily posting on topics related to embedded systems. Being both a hardware and firmware engineer, I'll probably mix it up a bit. As I'm a full time consultant, I'll also take the opportunity to talk about the trials, tribulations and benefits of not knowing where the next pay check comes from.</description><link>http://EmbeddedGurus.net/stack-overflow/</link><managingEditor>noreply@blogger.com (Nigel Jones)</managingEditor><generator>Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-2247845631706410900</guid><pubDate>Mon, 01 Dec 2008 00:03:00 +0000</pubDate><atom:updated>2008-11-30T19:20:41.451-05:00</atom:updated><title>Modulo Means (reprised)</title><atom:summary type='text'>In my previous post I had asked for some input on how to compute the mean of a phase comparator. Bruno Santiago suggested converting the phase readings to their cartesian co-ordinates and averaging the resulting (X, Y) data, and then converting the means of X &amp; Y back into a phase angle. Well kudos to Bruno because this is exactly what I ended up doing. However, as Bruno observed, it's not </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/11/modulo-means-reprised.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-4707820927187297059</guid><pubDate>Fri, 21 Nov 2008 19:56:00 +0000</pubDate><atom:updated>2008-11-21T14:58:57.832-05:00</atom:updated><title>Modulo means</title><atom:summary type='text'>Normally on this blog I'm either giving my opinions on embedded matters, or offering tips on how to do things better. Well today I'm turning the tables, as I'd like your help. Yesterday I ran into a rather perplexing problem, which I'd be interested to see if any of my readers can solve.

In a product I am working on, there is a phase comparator generating difference readings in the range 0 - 0xF</atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/11/modulo-means.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-6977320930991506575</guid><pubDate>Tue, 04 Nov 2008 19:53:00 +0000</pubDate><atom:updated>2008-11-04T16:07:45.455-05:00</atom:updated><title>Dogging your watchdog</title><atom:summary type='text'>Most embedded systems employ watchdog timers. It's not my intention today to talk about why to use watchdog timers, or indeed how to use them. Rather I assume you know the answers to these questions. Instead, I'll pass on some tips for how to track down those unexpected watchdog resets that can occur during the development process.

To help find these problems, it is essential to find out where </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/11/dogging-your-watchdog.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-5109305141821418408</guid><pubDate>Wed, 08 Oct 2008 22:22:00 +0000</pubDate><atom:updated>2008-10-08T18:55:13.270-04:00</atom:updated><title>Bug cluster phenomenon</title><atom:summary type='text'>I was debugging a piece of code recently when I realized that there was a scenario, albeit unlikely, in which a divide by zero could occur. Rather than just fix the bug and move on, I invoked what I call the "bug cluster phenomenon" rule. What you may ask is this rule? Well it has two variants. The first is as follows:

"Where there is one bug, there is usually another". I've observed this </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/10/bug-cluster-phenomenon.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-1118249633268280725</guid><pubDate>Mon, 08 Sep 2008 23:24:00 +0000</pubDate><atom:updated>2008-09-08T19:29:42.998-04:00</atom:updated><title>Efficient C Tips #4 - Use Speed Optimization</title><atom:summary type='text'>Back in July 2008 I promised that the next blog post would be on why you should use speed optimization instead of size optimization. Well four other posts somehow got in the way - for which I apologize. Anyway, onto the post!

In "Efficient C Tips #2" I made the case for always using full optimization on your released code. Back when I was a lad, the conventional wisdom when it came to </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/09/efficient-c-tips-4-use-speed.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-6389756337697031865</guid><pubDate>Thu, 04 Sep 2008 15:59:00 +0000</pubDate><atom:updated>2008-09-04T12:19:58.408-04:00</atom:updated><title>Low cost tools</title><atom:summary type='text'>Like many of you, I subscribe to Jack Ganssle's newsletter (If you don't then you should - go to http://ganssle.com/). In his latest newsletter #164 (alas not yet posted to the web) there is a thread on tools for monitoring serial protocols such as I2C. I was quite interested in this because it so happens I use some of the tools mentioned. What really struck me though was the fact that someone </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/09/low-cost-tools.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-612533200570094509</guid><pubDate>Tue, 12 Aug 2008 21:41:00 +0000</pubDate><atom:updated>2008-08-12T18:10:56.958-04:00</atom:updated><title>Have you looked at your linker output file recently?</title><atom:summary type='text'>Of all the myriad of files involved in a typical embedded firmware project, probably the two most feared (and yes I do mean feared) are the linker control file (which tells the linker how to link your application) and the linker output file. Today it's the latter which I'll be talking about.

The linker output file tells you a myriad of information about the way your application has been put </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/08/have-you-looked-at-your-linker-output.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-3108105731604768301</guid><pubDate>Fri, 08 Aug 2008 00:01:00 +0000</pubDate><atom:updated>2008-08-07T20:16:35.177-04:00</atom:updated><title>Improvements versus Features</title><atom:summary type='text'>I'm taking a slight detour from my usual topics to blather about what I see as an unfortunate trend that is making its way from the PC world to the embedded world. My perception is that as more embedded systems get sophisticated user interfaces, the desire to add features seems inescapable. While I don't see adding features as bad, per se, doing so instead of improving the product is a bad thing.</atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/08/improvements-versus-features.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-237993115069370038</guid><pubDate>Fri, 01 Aug 2008 19:38:00 +0000</pubDate><atom:updated>2008-08-01T16:06:32.636-04:00</atom:updated><title>Efficient C Tips #3 - Avoiding post increment / decrement</title><atom:summary type='text'>It always seems counter intuitive to me, but post increment / decrement operations in C / C++ often result in inefficient code, particularly when de-referencing pointers. For example


for (i = 0, ptr = buffer; i &lt; 8; i++)
{
     *ptr++ = i;
}


This code snippet contains two post increment operations. With most compilers, you'll get better code quality by re-writing it like this:


for (i = 0, </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/08/efficient-c-tips-3-avoiding-post.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-4417000410449809339</guid><pubDate>Sat, 05 Jul 2008 13:52:00 +0000</pubDate><atom:updated>2008-07-05T11:12:15.165-04:00</atom:updated><title>Efficient C Tips #2 - Using the optimizer</title><atom:summary type='text'>In my first post on "Efficient C" I talked about how to use the optimal integer data type to achieve the best possible performance. In this post, I'll talk about using the code optimization settings in your compiler to achieve further performance gains.

I assume that if you are reading this, then you are aware that compilers have optimization settings or switches. Invoking these settings usually</atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/07/efficient-c-tips-2-using-optimizer.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-8027764658677476567</guid><pubDate>Sat, 21 Jun 2008 01:23:00 +0000</pubDate><atom:updated>2008-06-20T21:52:00.566-04:00</atom:updated><title>Embedded Systems and the Environment</title><atom:summary type='text'>With the recent run up in the price of oil, it seems as if everyone is talking about energy and how to conserve it. For most people, the only impact they can have on the environment is through their own individual actions and choices. Engineers however, are in a different position because at a professional level, the design choices we make can have a profound effect on the environment. If we </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/06/embedded-systems-and-environment.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-8741366162153616979</guid><pubDate>Sun, 15 Jun 2008 12:10:00 +0000</pubDate><atom:updated>2008-06-15T09:15:16.436-04:00</atom:updated><title>Efficient C Tips #1 - Choosing the correct integer size</title><atom:summary type='text'>From time to time I write articles for Embedded Systems Design magazine. A number of these articles have concentrated on how to write efficient C for an embedded target. Whenever I write these articles I always get emails from people asking me two questions:

1. How did you learn this stuff?
2. Is there somewhere I can go to learn more?

The answer to the first question is a bit long winded and </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/06/efficient-c-tips-1-choosing-correct.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-8549647352177231509</guid><pubDate>Fri, 06 Jun 2008 20:06:00 +0000</pubDate><atom:updated>2008-06-06T16:40:01.055-04:00</atom:updated><title>Thoughts on the optimal time to test code</title><atom:summary type='text'>Today I'd like to take on one of the sacred cows of the embedded industry, namely the temporal relationship between coding and testing of the aforementioned code. The conventional wisdom seems to be as follows.

"Write a small piece of code. As soon as possible test the code. Repeat until the task is complete"

I know for many of you, me merely having the temerity to suggest this might be </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/06/thoughts-on-optimal-time-to-test-code.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-4736747779809733078</guid><pubDate>Tue, 20 May 2008 19:56:00 +0000</pubDate><atom:updated>2008-05-20T16:40:06.569-04:00</atom:updated><title>visualSTATE</title><atom:summary type='text'>I have been writing this blog now for about 18 months and in reviewing my posts I've noticed that my posts are often critical of technologies, manufacturers and or products. Well today is a first for me, because I'd like to offer my first product endorsement. The endorsement goes to visualSTATE from IAR . I've been using this product for about the same length of time I've had this blog and have </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/05/visualstate.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-4556668190115943368</guid><pubDate>Sun, 11 May 2008 22:44:00 +0000</pubDate><atom:updated>2008-05-11T18:59:20.282-04:00</atom:updated><title>Integer Log functions</title><atom:summary type='text'>A few months ago I wrote about a very nifty square root function in Jack Crenshaw's book "Math Toolkit for Real-time Programming". As elegant as the square root function is, it pails in comparison to what Crenshaw calls his 'bitlog' function. This is some code that computes the log (to base 2 of course) of an integer - and does it in amazingly few cycles and with amazing accuracy. The code in the</atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/05/integer-log-functions.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-1565947955488170798</guid><pubDate>Sat, 12 Apr 2008 21:39:00 +0000</pubDate><atom:updated>2008-04-12T18:28:12.268-04:00</atom:updated><title>IEC60730</title><atom:summary type='text'>Atmel has a very interesting application note on IEC60730 Class B compliance. If you aren't aware of IEC60730, there is a nice introduction here. In a nutshell IEC60730 Class B compliance is a safety standard related to household appliances. Part of IEC60730 requires that one actively monitor that a microcontroller (if one is used) is functioning correctly. This seems to be a reasonable thing to </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/04/iec60730.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-3894829517511635741</guid><pubDate>Mon, 04 Feb 2008 20:38:00 +0000</pubDate><atom:updated>2008-02-04T16:17:12.085-05:00</atom:updated><title>The perils of overloading</title><atom:summary type='text'>This post is coming to you from Sweden - a very fine country that I heartily recommend visiting if you get the chance. (If you're wondering why I'm in Sweden - I'm here on business as one of my clients is located in Gothenburg). Anyway, the fact that I'm in Sweden is relevant to this post, as to get here I had to put myself at the mercies of United Airlines. Now the fact that the flight over here</atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/02/perils-of-overloading.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-5396689279296869235</guid><pubDate>Sun, 27 Jan 2008 14:39:00 +0000</pubDate><atom:updated>2008-01-27T09:50:59.816-05:00</atom:updated><title>A new way to tell if something is an embedded system</title><atom:summary type='text'>Periodically someone tries to come up with a definition of an embedded system. For example there is an excellent and oft cited definition here. What got me thinking about this topic is the latest gadget I love to hate - my Verizon Treo phone running Windows mobile. A few years ago, there would have been no doubt that a cell phone was an embedded system. Today, the Treo, the i-Phone etc are all </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/01/new-way-to-tell-if-something-is.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-7807421594317876942</guid><pubDate>Fri, 18 Jan 2008 10:44:00 +0000</pubDate><atom:updated>2008-01-18T06:20:18.160-05:00</atom:updated><title>Electronic Component Footprints</title><atom:summary type='text'>As well as writing code and designing hardware, I also do PCB layout. I started doing this after I discovered it was often faster for me to layout a board myself than to try and convey all my requirements to a board layout person. If you've ever done PCB layout, you'll know that getting information about a device's footprint is a real pain. What you may not know is that this is a major source of </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/01/electronic-component-footprints.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-7333651425344032029</guid><pubDate>Sun, 13 Jan 2008 13:48:00 +0000</pubDate><atom:updated>2008-01-27T21:26:01.218-05:00</atom:updated><title>Omniscient Code Generation</title><atom:summary type='text'>Hi Tech Software has recently been making a lot of noise about its "Omniscient Code Generation". In a nutshell, the technology appears to defer code generation until the entire program has been compiled, and then look at everything before generating the final object code. The end result is a dramatically more compact (and presumably faster running) program image. I haven't had a chance to play </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2008/01/omniscient-code-generation.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-2513660516502687916</guid><pubDate>Thu, 30 Aug 2007 00:58:00 +0000</pubDate><atom:updated>2007-08-29T21:28:25.462-04:00</atom:updated><title>An unfortunate consequence of a 32-bit world</title><atom:summary type='text'>Back in the bad old days when I was a lad, one learned about microprocessors by programming 8 bit devices in assembly language. In fact I can still remember my first lab assignment - namely to multiply two 8 bit unsigned quantities together to get a 16 bit result (without the use of a hardware multiplier of course). One of the indelible lessons that comes from doing an exercise such as this, is </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2007/08/unfortunate-consequence-of-32-bit-world.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>6</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-2745133029857861737</guid><pubDate>Thu, 02 Aug 2007 23:36:00 +0000</pubDate><atom:updated>2007-08-12T22:00:07.202-04:00</atom:updated><title>Application notes code quality</title><atom:summary type='text'>All manufacturers of microcontrollers publish application notes. Some of these application notes are of course nothing more than gussied up advertising drivel. However, many of these application notes contain useful information that can cut days, and sometimes weeks off a project.
Having read hundreds of these application notes  over the  25 years I've been doing this, I've come to the conclusion</atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2007/08/application-notes-code-quality.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-8393396047841865818</guid><pubDate>Thu, 14 Jun 2007 01:22:00 +0000</pubDate><atom:updated>2007-06-13T21:37:17.070-04:00</atom:updated><title>Size matters</title><atom:summary type='text'>Periodically I get printed propaganda from the semiconductor manufacturers touting their latest and greatest ICs. Evidently the marketing folks are convinced that size matters because the size of the IC is almost the first thing they tell you now. A recent example from Maxim has the headline: "Smallest, Most Efficient and Flexible Notebook Fuel-Gauging Solution".

Well size does matter. However, </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2007/06/size-matters.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-5525445163395768730</guid><pubDate>Mon, 04 Jun 2007 15:19:00 +0000</pubDate><atom:updated>2007-06-09T12:38:30.493-04:00</atom:updated><title>Understanding Stack Overflow</title><atom:summary type='text'>I suspect that many, if not all bloggers are somewhat narcissistic. In my case it shows through in that I use one of the free services that keeps track of how many visitors I get and what brought them to this blog. Well, it turns out that many of the visitors to this blog get here not because of the brilliance of my writing, but because they did a Google search on "stack overflow" often qualified</atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2007/06/understanding-stack-overflow.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34628062.post-309228071519842695</guid><pubDate>Sat, 19 May 2007 23:50:00 +0000</pubDate><atom:updated>2007-05-20T08:23:07.787-04:00</atom:updated><title>Continued Fractions</title><atom:summary type='text'>Once in a while something happens that makes me realize that techniques that I routinely use are simply not widely known in the embedded world. I had such an epiphany recently concerning continued fractions. If you don't know what these are, then check out this link.

As entertaining as the link is, let me cut to the chase as to why you need to know this technique. In a nutshell, in the embedded </atom:summary><link>http://EmbeddedGurus.net/stack-overflow/2007/05/continued-fractions.html</link><author>noreply@blogger.com (Nigel Jones)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></item></channel></rss>