Jul 09

Nyquist Signal Expansion with Python

I’ve recently been reading up on software defined radio (SDR).  An epiphany that I had recently was that if we have sampled a signal so that we meet the Nyquist criteria, we can reproduce the points between the points we took. Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2013/07/nyquist-signal-expansion-with-python/

Jun 05

These are not the bits you’re looking for

I’ve noticed recently that the number of bits available in an ADC is slowly creeping up.  That makes me excited… until I look at the system accuracy.  Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2013/06/these-are-not-the-bits-youre-looking-for/

Jun 05

Two wrongs make a working prototype

I had an interesting problem show up when I was working on a project at the beginning of the year.  It involved an Analog Devices Blackfin 51x series processor.  We went to transition to their new IDE and that’s when we started noticing problems with the Flash RAM. Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2013/06/two-wrongs-make-a-working-prototype/

Jun 05

Freescale KL25 Peripheral Selection Guide

I previously wrote my review of the Freescale KL25.  Since then I’ve finished my first design with the KL25. The second spin of the board will see several of the peripherals and pins rearranged.  Most of this has to do with things that I glossed over in the documentation desire to get the product to market.  None were killers, but required some work-around or are being changed to improve functionality.   Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2013/06/freescale-kl25-peripheral-selection-guide/

Feb 09

Freescale KL25 Cortex M-0+ Review

One of the projects I’m working on I chose to use one of the new Freescale KL25 MCUs.  They have an ARM Cortex-M0+ core and lots of peripherals to boot, including ones specifically designed for low power usage.  Below are some of the reasons why I chose it, and what my experiences with it have been.

Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2013/02/freescale-kl25-cortex-m-0-review/

Dec 11

Editing PIC .hex files

… or how to edit a .hex file instead of recompiling it for every option.

I had a product a while back where the customer needed to program it, but we didn’t want them to have to hassle with compiling it for every (10,000+) permutation.  I had a whole build system set up when this was just a few hundred files that would do all the compilations for me (thank you python!).  That was now out of the question.  There were a few hurdles to do this on a PIC, but we achieved it Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2012/12/editing-pic-hex-files/

May 19

The Case of the Random Lockup

We had a bug that just wouldn’t go away. Sometimes it would show up quickly, sometimes it would show up after the code had been running for a few days… but it would show up. What’s the programmer to do?

Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2012/05/the-case-of-the-random-lockup/

Feb 06

Two clicks to program a PIC

Sometimes you end up having to program a device with many different types of firmware. For a project I’ve used PICs on, this was the case. Here’s how to setup things so that all it requires is two clicks to load the firmware from windows explorer.
Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2012/02/two-clicks-to-program-a-pic/

Feb 04

Multithreading, Python and passed arguments

Recently I’ve had a project that required precompiling the firmware for a device so that the end user could program the device, but not have the source code. We’re not talking about a few versions of the code, but almost 1000. This is something that no person would want to do, especially since it would have to be redone every time the source code changes. Python to the rescue. It was simple enough to write a program that would copy the source code, change a bit of information in a header file, compile it and save the binary to the appropriate location. Controlling other programs is pretty easy with the subprocess module. That’s great and all, but doing it single-threaded, that’s so 90s. Python makes multithreading pretty simple using its multiprocessing library. The trick is not stepping on any toes when you do it.

Read the rest of this entry »

Permanent link to this article: http://blog.curioussystem.com/2012/02/multithreading-python-and-passed-arguments/

Jan 07

Of embedded black boxes

Over the last few months I’ve been working on projects using PIC microcontrollers. At first I had a rather negative view of the PIC processors. Since I started coding on them, I have come to realize that it is the compiler that I have issues with much more than the hardware. The compiler we’ve been using by CCS is designed to get projects up and running quickly by abstracting the hardware from the coder. So, instead of directly writing to the registers, you call one of their functions. We’ve found this works well when it is a mature processor and when we’re not trying to do too many things at once. Where we ran into lots of frustration was with new processors. We thought we had the code written correctly, yet it wasn’t working. Now instead of just having our code and hardware errata to look at, I also had to figure out what the CCS code was doing… which means slogging through the disassembled code and looking up the mnemonics for the different assembly operations.

Now, you need to understand where I come from. I’m a Professional Engineer. When I vouch for something, I’m saying that it works. When I have the black box of a intrinsic compiler functions, it makes me a little less sure about what is occurring. That’s one of the reasons why I like the MSP430. TI does a very good job of letting me know what’s going on with the chip. There’s not much left to the imagination when using it. The analog functions are well documented and there are good code examples. The Stellaris line of ARM Cortex-M3 chips tries to make both camps happy. It has good documentation of things, but it also comes with a large driver library that encapsulates many of the functions for an engineer to rapidly program on it.

My beef with embedded processor abstraction through libraries or intrinsic functions is that it usually doesn’t keep up with the latest processors and that it is too easy to do something that modifies something else and then you don’t know where the problem is being generated because the functions work separately or in a different order. Oh, and they take more memory, on memory constrained processors. What’s your experience?

Permanent link to this article: http://blog.curioussystem.com/2012/01/of-embedded-black-boxes/

Older posts «

» Newer posts