Computing stuff tied to the physical world

Low-level development

In AVR, Hardware on May 6, 2010 at 00:01

I’m working on some ideas which require some low-level code, and fairly accurate timing. Serial or wireless I/O are not an option, and hooking up the logic analyzer is not convenient (I may have to, if the going gets tough).

For now, here’s a very simple setup which ought to be sufficient:

Dsc 1385

Two boards, hooked up via two USB ports. They are on the same computer, so there should be no issues with voltage levels when leaving them both connected at the same time (I’m not too worried about the ground loop).

The board at the top is the Flash Board as ISP programmer (I’m not using the new capturing features here). The board below is the “target”, a plain JeeNode hooked up to a USB-BUB. Nothing fancy.

I’ve added 8 bits of “I/O” by hooking up 8 LEDs with current-limiting resistors – red on the DIO pins, green on the AIO pins as debugger, as described here.

The target board also has the option to communicate over serial (i.e. through its USB connection), but that adds code and affects timing – something which I probably can’t tolerate in my specific tests.

Nothing very unusual here, but it’s worth pointing out that a couple of years ago, a setup like this could easily have cost over 1000 <pick-your-favorite-currency>, whereas this one is well under 100.

Let’s see how it goes…

  1. So what is the intended purpose, can you gie us a hint?

  2. JC,

    Love your stuff. I really dig a lot of the stuff that you do, as you address many interesting/advanced issues. The real world is quite interesting and messy once one gets his/her hands a little dirty. “Real issues for real problems”. :)

    Anyway, I’ve done some GPS synchronization with the 1PPS (pulse per second) that has the ATMega328 easily accurate to 1/1000 of a second, and easily scalable down to about 5 millionths of a second.

    I don’t know what your timing requirements are, but let me know if this might be helpful. I can see the clock drift which is about 16-20 millionths of a second using this method.

    Best regards,


    • Impressive results. Nah, what I need isn’t anywhere nearly as demanding. Just that sending out debugging strings over the serial is going to be too slow.

      @alex – I’m just trying out some new stuff with the RF12 driver. If it works, I’ll definitely post and explain more about it…

  3. Ok for higher speed, why not just use I2C or SPI ?

Comments are closed.