Posting has been a little light lately. I've been working on a little project for
Stevens and it is taking more time than expected. The job seemed simple enough: modify the code so that it would compile with the
GNU compiler instead of the old
IAR one, and make some small changes to the command interface.
I finished modifying the code so that it would compile using
gcc over a month ago. As I didn't have hardware to test it on, I tried it out on a software simulator and it apparently worked fine.
Then there were some delays in testing, but eventually we discovered, that no, the code would not run on the actual hardware. So I drag a set of hardware home, start plugging things in and my little empire starts collapsing. First it was the display screen, whose mode of failure sent me down a number of ratholes before I replaced it. Then there was the dead serial port, which I cured with a new hard drive, a new installation on
Windows and a
USB to serial port adaptor.
|
New hard drive from Iguana Micro. $70. With Windows and all my development code loaded I am using three percent of the capacity. |
Finally got my development environment put together and that's when it got interesting. Timing seems to be everything. Evidently
gcc optimizes code better than the old
IAR compiler, and so things that worked before, well, now they don't.
|
AVR In-Circuit Serial Progammer (ISP or ICSP, depending on who you are talking to).
Cover removed so we can unplug the ribbon cable.
That's a USB cable plugged in the back.
|
We are using an
AVR microcontroller running at 4 megahertz (Geez, did you have to hit so hard? That megahertz!). The
AVR uses one or two cycles per instruction, so a single cycle instruction takes one-fourth of one micro-second, or 250 nano-seconds. Some of the time sensitive operations operations require delays running from 100 nano-seconds up about ten milli-seconds. Fortunately, most of these times are minimums. It would be very difficult to deal with delays whose upper and lower limits were less than the length of time it takes to execute one instruction.
Update September 2016. Replaced missing pictures.
No comments:
Post a Comment