It's not that it's not suitable, I'm just trying to understand why crippling certain functions are good thing.
Remember as you say, the bare 328 and others, are fully functional, and I have used them so for years.
I'm approaching this backwards. From full ops to reduced ops. So a head scratcher for me.
Not to mention learning that int8_t is now int, _delay_ms() is now delay(), PORTD 0 & 1 are unusable in the boards, and so on and so on. In the native Arduino language.
I spent a few hours trying to figure out why D0 & D1 would not go low or go into output mode (including reflashing the bootloader on the STK500. Thanks to westfw above I found out that I can't use it on an Arduino board!
Thanks, I do appreciate all of your input(s). You just didn't understand my direction of flow.
Looking at someone else's sketch, I'm trying to learn the syntax. Not necessarily how to program an AVR, as well as finding out the limitations of the boards.
It's not crippling.. just another set of tools. Let's define what the Arduino is:
- A range of boards to choose from. Some may use the ATMEGA328, some don't. But above all, they are standardized on pin maps.
- The micros have a bootloader integrated, most of them are serial.
- You can upload programs via the Arduino IDE, or commandline tools.
- Sketches are preprocessed C++ programs. They include a few libraries:
- Millisecond time base
- Basic serial library, with asynchronous data receive (interrupts)
- Functions for GPIOs, PWM and ADCs
- A gazillion number of user libraries, of varying quality
- A setup() and loop() convention, which is basically:
void main() {
backgroundSetup();
setup();
while(1){
loop();
}
}
Coincidentally, people rant on just about everything I just mentioned. The classic boards standardization have weird mechanical dimensions (off-grid). The IDE has no debugger, is limited to use (it provides no details such that beginners are not intimidated). The provided software libraries are confusing or inefficient.
You got to take it for what it is, or find alternatives. You can skip almost all of the software libraries if you want to. You can program (almost) bare programs compiled with GCC into an Arduino. Most arduinos also feature an ISP header, so you could even bypass the bootloader if you want. Or you could program the bootloader onto any ATMEGA328 and use Arduino software on your own boards.
It's up to you. I rarely use Arduino, but for what it is (rapid prototyping), it does the job quite well.