Here’s the scenario: you’ve got a microcontroller-based synthesizer. The synthesizer has a lot to do. It needs to check inputs like potentiometers, sliders, and keys. It needs to indicate its state to the user with LEDs and displays. And most importantly, it needs to generate noise. The standard method of handling all these tasks is to order them in a loop and handle them one at a time ad infinitum. But, not all of these tasks are as important as the other tasks. How can they be sorted and how can the system ensure that the most important tasks are handled before tasks of lesser importance? Let’s dig in.Continue reading
A wise grizzled old engineer once told me that the most important rule of embedded engineering is, “Always use quality tools.” Without quality tools that you can 100% trust, you’ll never be certain of the source of a problem. You’ll constantly be asking yourself, “Is it me or is it the tools?” I’ve validated this engineer’s axiom multiple times, staring for glacial epochs staring at code which should work but doesn’t. I once spent a solid month tweaking and tweaking simple code only to find in the end that a manufacturer’s compiler was incapable of executing logical shifts correctly. I’ve vowed in the past never to suffer again and I reinforced my opinion during this microcontroller selection process. That’s a later part of this story. First, let’s look at how I started this selection process.
I think I’ve been down in the design hole too long because I’m not sure how I missed that Atmel updated AVR Studio to version 5. I know what you open sourcerers are saying: “You should be using Linux or have built your own computer and your own OS by now. IDEs are for weak simpletons. The compiler is all you need.” (I’m looking at you Todd Bailey.) There are a couple of mitigating facts here. One, I’m lazy. An IDE like AVR Studio provides an organized environment where everything is easy to find. I don’t have to build makefiles and the sort. For the lazy and beginners, this is a boon, hiding away some of the less than obvious aspects of embedded programming. Two, I travelled from hardwareland to softwareland and not the other way around. I taught myself how to code after becoming an analog hardware engineer. I wasn’t raised on a steady diet of kit PCs as a kid. I run Windows on my Macbook to run all my engineering software and it works. Maybe one day I’ll get into Linux for fun and to improve my street cred. Anyways, what’s to like about AVR Studio 5?