3 ms·
> $5 nowadays you can have a 1GHz+ quad core ARM Cortex-a53 with FPU and NEON support. And probably no realtime clock, or well-documented ADC / DAC. Sometime
by dragontamer 9y ago
> $5 nowadays you can have a 1GHz+ quad core ARM Cortex-a53 with FPU and NEON support.
And probably no realtime clock, or well-documented ADC / DAC.
Sometimes, all you gotta do is:
1. Measure a voltage from something (external temperature sensor: such as a Thermistor: a resistor whose resistance changes based on the temperature. Apply a constant current to a Thermistor, and you'll get voltage that varies with temperature)
2. Change the voltage somewhere else. (IE: ramp a motor up or down based on the temperature).
3. Do this from ~500 to 10,000 updates per second (ie: 500Hz to 10kHz / An update every 2ms to every 100 us).
Don't be fooled by CPU specs. They're actually rather unimportant in the microcontroller world. Good features to have are like... integrated OpAmps, ADCs, DACs, Timers, and other features that allow you to do job #1 and #2 better. Even an Arduino/ATMega runs at 20MHz, giving you 2000-cyles per 100-microseconds. And that's why Arduinos are so popular, because they have all the ADCs / Timers needed to do the job, and 20MHz is way faster than what most people need.
A more "premium" chip would have OpAmps, which will offer finer voltage control and more customization for the hardware engineer. I guarantee you: if you're doing hardware (aka: reading voltages and setting voltages), you will NEED a bunch of OpAmps on the board somewhere. So chips that come with integrated OpAmps can really cut down on external parts.
Most of these cheap parts go up to 100MHz (ie: 10,000 cycles per 100-microseconds), but really don't have a need to go beyond that. Besides, higher MHz means more power usage... and a lot of these uCs are designed to run on button-batteries for literally months (assuming you get the right amount of sleep). So power-efficiency severely trumps processor speed in their typical use case.
--------------------
Anyway, consider this. If you have a 1GHz chip but your ADC converter only runs at 50kHz, then you practically can't do more than 50k updates per second. Because at best, your system is only able to read the voltage level once every 50kHz.
It takes a bit of time for voltages to settle down and make a decent measurement. I'd imagine that for most of these chips and systems, they're limited by peripherals and not by CPU power.
- LeifCarrotson 9y ago> or well-documented ADC / DAC. Oh, they're well-documented alright, over these 4000 pages of PDFs from our various portals and manuals and peripheral standards and ARM standards and SDK code and...probably a few other places. So thoroughly documented you could never finish reading it all before the chip is obsolete!