Dave,
By a “simple” I mean not processing large amounts of data or having complex graphical user interfaces.
That’s not my definition of simple! I mean logically complex and time critical. Actually, with an SD card or two, a PIC can process large amounts of data – not difficult.
A dictonary definition of a microcontroller is “a control device which incorporates a microprocessor.”
You introduced the distinction, not me, I said the difference was blurred.
The Ardunio Due is multi-tasking it has two cores.
No, it only multitasks if code is written do do that. Though best avoided, most micros with a timer can be programmed in C to multi-task. Might be possible in PBY too – how does it handle interrupts?
The comment ” They grow or have requirements that might be hard to fit in the space available or get to run fast enough. I guess Robert hasn’t been burned yet, but that’s luck rather than judgement.” about projects is not a given.
Not a given, but what’s been said suggests it!
… On the contary when passing a prototype, with working PBP code to the “professional” programmers to write code in C or C++ they have requested more memory and faster processor to suppoert their bloted code. Using comms libaries to bit-bang a pin rather than using the USART on the chip and floating point libaries because the converted raw data to engineering units and than did the math. This totally ignored the fact that the ADC and DAC reference was 4.096V so each bit was a whole unit scaled so the required division and multiplication could be done with bit shifting.
This is a programmer problem not a language issue. Interestingly, John Haine’s example makes the same mistake with: analogWrite(ledPin, val * 0.25) Though functionally correct, it adds about 1000bytes to the executable compared with val / 4. The C compiles converts / 4 into a shift, but because most AVR chips don’t have hardware floating point 0.25 loads the floating point software library. I expect PBY does the same. 0.25 isn’t a problem on a Nucleo because it has FP hardware. This stuff matters when space and speed are tight.
…
Many libaries are open source but not all. Even the open source ones may be obfuscated. And how many hobbyists bother to look at what is in the libary? And is it good code?
Obfuscated code isn’t open source! Not many dig into libraries because it’s rarely necessary, but if there’s any doubt about quality, we can. And re-write it if necessary.
Don’t forget this started as thread about PWM generation. As classic job for a PIC. Writing a GUI isn’t.
I haven’t forgotten! Early on I pointed out that most microcontrollers do PWM, Certainly not exclusive to PIC. Touch screens are a common interface these days. If a customer wants one, it’s our job as programmers to provide. The bigger PICs can run a GUI, all that’s needed is skill and tools.
Have a look at the ESP8266. Does PWM, and comes with WiFi and a basic web server. Allows motors to be controlled from a web browser rather easily. But not if one insists that PBY and PIC are the answer…
If anyone wants to traverse a mill table with a wiper motor, then MIchael’s NE555 module is good enough. microcontrollers are for more difficult requirements, like a multi-axis CNC. Our difference boils down to this: I disagree that simple tools are all that’s needed! If BASIC was able to meet all programming needs, it would rule the roost. The truth is BASIC has serious limitations*. To me, the recommendation to use BASIC is equivalent to being told I don’t need a milling machine because files are cheap and simple.
🙂
Dave
* So does c/c++, but there are fewer of them!