I can see that these blokes would prefer an arduino product over a Stamp.
Do the arduino-based products have SLEEP / NAP equivalents or just bigger battery budgets?
Howbeit, they're "single-thread" devices.
The Parallax Propeller -- It's 8 Microcontrollers in 1 (because life's too short for interrupts.)
The two reasons I've used an Arduino are the built in A/D converter and C++ code reuse. The fact that only certain pins can be used for PWM, interupt handling, and serial I/O is a real drag. I haven't seen any power management functions, but that doesn't mean they don't exist.
The two reasons I've used an Arduino are the built in A/D converter and C++ code reuse. The fact that only certain pins can be used for PWM, interupt handling, and serial I/O is a real drag. I haven't seen any power management functions, but that doesn't mean they don't exist.
Just as an FYI, the ATmega328P, underlying the Arduino, is capable of pin change interrupts on any pin, but this functionality isn't exposed in the Arduino keyword set. You need to program the registers directly.
The Arduino can handle serial I/O on any pin, but it's software bit-bang only. There are a couple of libraries that do it, NewSoftSerial being the most popular. Hardware serial is limited to one UART on the Uno; four on the Mega.
Power management functions exist, but these too aren't exposed in the Arduino keyword set. The functionality can be derived from sleep.h, which is included in the IDE. Some third-party libraries make use of these functions.
The pin designations for PWM are indeed tied to the hardware counters that do the PWMing. This has long been the way of AVR architecture.
Many people look at the Arduino like it's something out of a Cracker Jack box. The whole Arduino ecosystem - hardware, IDE, language, libraries... is just an abstraction layer over thr AVR micros to make them more accessible to the average person.
Duplicating the Arduino and PBasic libraries via pre-loaded binaries could go a long way to making the Propeller more readily acceptable. Like the Arduino, advanced functionality would still be there, just hidden for those not interested in it.
AFAIK no one is promoting C++ as a good fit for small embedded controllers
I am:)
As you see in the original Arduino we are looking at a pretty small embedded MCU and C++ is used to make life simpler for the users. As we see C++ is use to provide objects to the kind of level that we have objects in Spin. There is no code size or performance downside to this.
We have had this discussion on the forum before which led to my creating the same functionality in C and C++ and showing that the code produced was very similar and in fact a byte or two smaller for some functions/methods in C++, Sadly I can't find that thread now.
Attached is an in depth look at the C++ for MCU situation.
Attached is an in depth look at the C++ for MCU situation.
Ah, yes - 1998! The glory days of C++! That year was probably close to the peak of C++ popularity - and it has been declining fairly steadily ever since.
There is no doubt that C++ is used in some embedded work - but mostly where size and speed don''t really matter. A network file sever is "embedded" by many definitions - but my network file server has a couple of hundred megabytes of RAM and runs a web server on top of Linux. It is a fair bet that at least some of the software on that box is written in C++ - but I'd bet a lot more of it is written in C!
But C++ on a microcontroller? Naah! C still wins.
I've posted most of these links before, but check out the tiobe index. C still climbing, and C++ (and Java) still declining. C# a long way behind. There are also general language popularity sites here and here that show C as #1. Not bad for a 30 year old language. But the most relevant to us Propeller-heads is probably embeddded.com, which here shows that C outstrips C++ in embedded work by a huge margin - and again, C is still growing while C++ is declining. A shame they haven't updated that article since 2009, but I don't think the trend will have changed much.
Yes, I'll agree that C++ can be as good as C (but no better) - provided you limit your C++ to a subset of the language that looks - funnily enough - very similar to C ...
Don't use exceptions. Don't use templates. Avoid multiple inheritance. Don't use classes. And hope that your C++ compiler to clever enough to remove all the C++ overheads you neither want nor need (like all those unused constructors and destructors) - and tough luck if your particular compiler is not that clever.
The boss turned me on to his copy of the latest "Popular Science" (the one with 'Data is Power' on the cover.) PS touts arduino, too. Their H2Whoa project is some data-intercepting, cell-spoofing drone that features an "ardupilot" (all that stuff's gotta be ardu-something and whatever-uino - gag me with a spoon.)
Moreover, several pages later, there was/is a two page RadioShack ad: a DIY project, a LED mood cube with separate R, G, and B LEDs (not "RGB"s) and, yes, a microcontroller.
There's a list of everything needed, all available at RadioShack:
solder, LEDs, resistors, and...
can you guess?...
drum-roll, please...
tah-tah-tah-tah-tah...
an arduino uno ( ...rim-shot!) ? ? ? ?
Upon considerable reflection, I think the Arduino is a Good Thing for Parallax. If it serves to get more people interested in microcontrollers, it has to result in a net positive benefit for the BASIC Stamp, but especially for the Propeller chip. It is said that a rising tide floats all boats. I can't help but to believe that this truism is more truth than "ism" when it comes to Parallax's business. "Cut your teeth on the Arduino. but advance your chops with the Propeller!"
Upon considerable reflection, I think the Arduino is a Good Thing for Parallax. If it serves to get more people interested in microcontrollers, it has to result in a net positive benefit for the BASIC Stamp, but especially for the Propeller chip. It is said that a rising tide floats all boats. I can't help but to believe that this truism is more truth than "ism" when it comes to Parallax's business. "Cut your teeth on the Arduino. but advance your chops with the Propeller!"
-Phil
A similar thought occured to me after sending some one to the PASM for beginners thread for shared hub use examples and explanations by kuroneko and jazzed. As some of us had said a beginner does not know what they need at first, same holds for micros. If you throw them into the pot hot they will likely not appreciate it. But if the arduino sucks them in to where they have need of the props feature set they will likely appreciate it all the more. So encourage whatever interests someone in technology when the need arises it can be intelligently and thoughtfully determined. Of course if you are seen as a positive resource you may get sucked into teaching/helping them more.....
Whenever I use the propeller I miss C++ and the portable IDE. Whenever I use the Arduino I miss the multiple cogs.
Exactly. There are lots of times I see the little Arduino as quite appealing but start wanting to do several things at the some time with it and I naturally begin to think...."to heck with this, 8 cogs makes this trivial to do".
A similar thought occured to me after sending some one to the PASM for beginners thread for shared hub use examples and explanations by kuroneko and jazzed. As some of us had said a beginner does not know what they need at first, same holds for micros. If you throw them into the pot hot they will likely not appreciate it. But if the arduino sucks them in to where they have need of the props feature set they will likely appreciate it all the more. So encourage whatever interests someone in technology when the need arises it can be intelligently and thoughtfully determined. Of course if you are seen as a positive resource you may get sucked into teaching/helping them more.....
Frank
I too have a positive point of view of the Arduino. One thing that I like about the Arduino is that it has set a psydo-standard for adapter boards (shields). I can go to multiple vendors to purchase similar products. I can now purchase the product that best meets my needs at a competitive price. This means that I can do quick prototyping without the need to do a PCB.
To tie this into the Propeller, I purchased an ASC from Martin Hodge when he released his first design. With this, I've been able to combine the power of the Propeller with the simplicity of using Arduino shields. The best of both worlds!
Comments
The two reasons I've used an Arduino are the built in A/D converter and C++ code reuse. The fact that only certain pins can be used for PWM, interupt handling, and serial I/O is a real drag. I haven't seen any power management functions, but that doesn't mean they don't exist.
Just as an FYI, the ATmega328P, underlying the Arduino, is capable of pin change interrupts on any pin, but this functionality isn't exposed in the Arduino keyword set. You need to program the registers directly.
The Arduino can handle serial I/O on any pin, but it's software bit-bang only. There are a couple of libraries that do it, NewSoftSerial being the most popular. Hardware serial is limited to one UART on the Uno; four on the Mega.
Power management functions exist, but these too aren't exposed in the Arduino keyword set. The functionality can be derived from sleep.h, which is included in the IDE. Some third-party libraries make use of these functions.
The pin designations for PWM are indeed tied to the hardware counters that do the PWMing. This has long been the way of AVR architecture.
-- Gordon
Nice! How 'bout "Parallax Propeller: 8 cogs, no waiting!"
Ross.
/relevant?
http://interface.khm.de/index.php/lab/experiments/sleep_watchdog_battery/
Many people look at the Arduino like it's something out of a Cracker Jack box. The whole Arduino ecosystem - hardware, IDE, language, libraries... is just an abstraction layer over thr AVR micros to make them more accessible to the average person.
Duplicating the Arduino and PBasic libraries via pre-loaded binaries could go a long way to making the Propeller more readily acceptable. Like the Arduino, advanced functionality would still be there, just hidden for those not interested in it.
I am:)
As you see in the original Arduino we are looking at a pretty small embedded MCU and C++ is used to make life simpler for the users. As we see C++ is use to provide objects to the kind of level that we have objects in Spin. There is no code size or performance downside to this.
We have had this discussion on the forum before which led to my creating the same functionality in C and C++ and showing that the code produced was very similar and in fact a byte or two smaller for some functions/methods in C++, Sadly I can't find that thread now.
Attached is an in depth look at the C++ for MCU situation.
Ah, yes - 1998! The glory days of C++! That year was probably close to the peak of C++ popularity - and it has been declining fairly steadily ever since.
There is no doubt that C++ is used in some embedded work - but mostly where size and speed don''t really matter. A network file sever is "embedded" by many definitions - but my network file server has a couple of hundred megabytes of RAM and runs a web server on top of Linux. It is a fair bet that at least some of the software on that box is written in C++ - but I'd bet a lot more of it is written in C!
But C++ on a microcontroller? Naah! C still wins.
I've posted most of these links before, but check out the tiobe index. C still climbing, and C++ (and Java) still declining. C# a long way behind. There are also general language popularity sites here and here that show C as #1. Not bad for a 30 year old language. But the most relevant to us Propeller-heads is probably embeddded.com, which here shows that C outstrips C++ in embedded work by a huge margin - and again, C is still growing while C++ is declining. A shame they haven't updated that article since 2009, but I don't think the trend will have changed much.
Yes, I'll agree that C++ can be as good as C (but no better) - provided you limit your C++ to a subset of the language that looks - funnily enough - very similar to C ...
Don't use exceptions. Don't use templates. Avoid multiple inheritance. Don't use classes. And hope that your C++ compiler to clever enough to remove all the C++ overheads you neither want nor need (like all those unused constructors and destructors) - and tough luck if your particular compiler is not that clever.
Ross.
I'm experiencing D
Moreover, several pages later, there was/is a two page RadioShack ad: a DIY project, a LED mood cube with separate R, G, and B LEDs (not "RGB"s) and, yes, a microcontroller.
There's a list of everything needed, all available at RadioShack:
solder, LEDs, resistors, and...
can you guess?...
drum-roll, please...
tah-tah-tah-tah-tah...
an arduino uno ( ...rim-shot!)
? ? ? ?
Pretty funny!!
-Phil
A similar thought occured to me after sending some one to the PASM for beginners thread for shared hub use examples and explanations by kuroneko and jazzed. As some of us had said a beginner does not know what they need at first, same holds for micros. If you throw them into the pot hot they will likely not appreciate it. But if the arduino sucks them in to where they have need of the props feature set they will likely appreciate it all the more. So encourage whatever interests someone in technology when the need arises it can be intelligently and thoughtfully determined. Of course if you are seen as a positive resource you may get sucked into teaching/helping them more.....
Frank
Exactly. There are lots of times I see the little Arduino as quite appealing but start wanting to do several things at the some time with it and I naturally begin to think...."to heck with this, 8 cogs makes this trivial to do".
Spin isn't hard, but one has to apply himself, and arduino "frees" the incompetent from intellectual effort.
http://webspace.ship.edu/cgboer/platoscave.html
If you know cogeze and you are over sixty does that make one a cogeezer?
It means you are a person with superior knowledge, talent and discrimination - a member of the cognoscenti :cool:
Ross.
I too have a positive point of view of the Arduino. One thing that I like about the Arduino is that it has set a psydo-standard for adapter boards (shields). I can go to multiple vendors to purchase similar products. I can now purchase the product that best meets my needs at a competitive price. This means that I can do quick prototyping without the need to do a PCB.
To tie this into the Propeller, I purchased an ASC from Martin Hodge when he released his first design. With this, I've been able to combine the power of the Propeller with the simplicity of using Arduino shields. The best of both worlds!
Jim...