Making the case for in-circuit debugging tools


If you are in the market for a PIC microcontroller programmer, you may want to consider a model with an In-Circuit Debugger (ICD). [Rajendra] put together a great tutorial on using an ICD when debugging PIC firmware, which makes a pretty convincing argument for owning one.

In his tutorial, he happens to be using a MikroElektronika PICflash2, but he says that there are plenty of other ICDs out there if you are not keen on this particular model. The PICflash2 not only acts as an ICD, but as the name suggests it works as an ICSP as well.

[Rajendra] walks us through a short debugging session using some simple code that reads data from an LM34DZ temperature sensor, displaying the results on an LCD screen. While he isn’t actually hunting for bugs, he does show how easy it is to step through the PIC’s code one statement at a time, evaluating variables and registers along the way.

[Rajendra] does point out that using an ICD does occupy a few I/O pins while running, limiting your resources just a bit. We think that being able to debug code as it runs is pretty reasonable tradeoff if you don’t necessarily need each and every pin available for use.

Learn to debug msp430 chips using IAR

If you haven’t done any debugging with microcontroller programs [Kphlight] posted a follow-along guide for debugging MSP430 chips. You can see above that he’s using the TI Launchpad and has chosen the free (but code limited) IAR Embedded Workbench that is one of the IDE’s that TI provides for the kit. The example builds a Pomodoro timer with just five LEDs and one resistor. You’ll flash the code to the chip, step through each line of the firmware, and learn how to manipulate register data during code execution.

It’s a great primer for the uninitiated, and we’d love to see one using open-source tools like DDD and GDB. If you do write one, don’t forget to send us a tip about it. If you want to give open source a try with this hardware check out our own tutorial.

Tools: Saleae Logic, logic analyzer


A logic analyzer records bus communications between two chips. If you’ve ever had a problem getting two chips to talk, or wanted to reverse engineer a protocol, a logic analyzer is the tool you need to spy on the bus.

The Logic is a USB logic analyzer with eight channels and sampling rates up to 24MHz. Among hobby-level logic analyzers, the Logic has a good mix of features and decent sampling rates. We’ve been following Joe Garrison’s work on the Logic for a long time. If you’ve ever considered bringing a product to market, you can learn a lot from Joe’s blog that documents his development process.

When it debuted, the Logic was so popular that it was hard to buy one. It’s now widely available, and Saleae gave us one to try. Read our review below.

[Read more...]