OZ_Willy:
No offence intended, but I think the two moderators are being a little hypocritical here.
Was not the whole Arduino platform for which this forum is based on, built to SIMPLIFY the coding of AVR's?
I don't believe I am being hypocritical. I think the whole IDE does an absolutely great job of simplifying coding for AVRs. With an easy-to-use interface you can be programming without Make files, complex linking, and needing to know a lot of detail.
Let me tell you a story ...
A little while back (couple of years) I had a PICAXE board. That used Basic rather than C. It was even simpler than C, right?
My son and I got some blinking lights going. Fine. So far so good. It went something like this (from here ).
do
high B.1 ; switch on output B.1
pause 1000 ; wait 1 second
low B.1 ; switch off output B.1
pause 1000 ; wait 1 second
loop ; loop back to start
Now the equivalent code on the Arduino is:
void setup ()
{
pinMode (1, OUTPUT);
} // end of setup
void loop ()
{
digitalWrite (1, HIGH);
delay (1000);
digitalWrite (1, LOW);
delay (1000);
} // end of loop
I seriously don't think that is much more complicated.
But anyway, back to the story ... Then we wanted to make a "morse code" player. We wanted to make some subroutines (that you called with "gosub") to play the beeps for each letter. Then we hit a snag.
We made a subroutine to play a dot. And one to play a dash. And then one for each letter (eg. gosub dot, gosub dash, gosub dot, etc.)
There is a limit on PICAXE of the total number of gosubs you can have in a program.
In the case of our part (the PICAXE 08M) it was:
All 'M' parts (obsolete) number:15 1 nested:4
That is, you could have a maximum of 15 gosub statements in the entire program! Whether or not they were nested (if you nest them you can only nest 4 deep).
That's a pretty amazing limitation. It means you can use them for blinking lights and doing simple stuff, but when you want to do something semi-serious you can't - not easily. So, suddenly it is more complex. Because you are working around limitations in the "simpler" system.