Hey take it easy, I hardly meant to offend ! I was not "judging" your
skills whatsoever (I am beginner too, I also used printf in my
first days of programming...and gave up on it on the same day, as soon
as I timed it with my oscilloscope and my eyes poped out when they saw
how long it took to run and how much KB it "stole" from my tight
Mega32 !). I was really only showing my appreciation of David Brown's
humour, nothing more, not at all laughing at the specific target/object
of this humour, honest !
:) It's cool.
I'm not feeling too bad, as my second C project is up and running, and
the boss is pleased.
If I wanted fast and small, I'd have done it in ASM. But half of the
point of this exercise was to get my feet wet with C.
So, both points accomplished. I have GCC up under AVR studio, a working
project, and I feel reasonably confident with the code.
I'm less pleased with the sensor performance, but I need to look at some
more sophisticated ways to handle the data.
And that, is something I wouldn't want to have to do in ASM.
Here's a studio question though:
When stepping thru the code, the pointer isn't always pointing to the
line properly.
Sometimes when it exits a function, it ends up pointing at the last
brace, sometimes not.
Sometimes when it enters a function, it ends up pointing at the first
brace, sometimes not.
Basically, I'm never SURE that the pointer is pointing to the code
that's about to be executed.