Author Topic: $1 MCU review — looking for part suggestions!  (Read 9343 times)

0 Members and 1 Guest are viewing this topic.

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
$1 MCU review — looking for part suggestions!
« on: July 31, 2017, 04:19:30 AM »
Hey everyone! I'm reviewing $1 (@ 100 QTY) general-purpose 8/16/32-bit MCUs from a wide range of vendors, and I'm looking for leads on parts. The review will include quantitative comparisons between feature sets, benchmarking (via a 16-bit biquad filter test measuring kSPS and nJ/sample), power analysis, plus more qualitative stuff (development environment, SDKs, compiler choices, development/debugging experience, etc).

I started with a pretty humble list, then hit up AVRFreaks, where several members recommended some interesting parts. Thought I'd try my luck over here, too!

The only rule is that the part has to be $1 or less @ 100 units from reputable sources (something on Octopart, or direct from the manufacturer). If a part isn't available from U.S. based distributors, I'm cool with eBay / Ali Express / Taobao links at that point. Please no Newark close-out specials on NRND parts.

So far, the big list is:
Atmel ATTiny1616
Atmel ATSAMD10
Cypress PSoC 4000S
Freescale (NXP) MKE04
Freescale (NXP) MKL03
Infineon XMC1100
Microchip PIC16LF18855
Microchip PIC24F04KL100
Microchip PIC32MM
Nuvoton N76E003
Nuvoton M052LDN
NXP LPC811
Renesas RL78/G12
Silicon Labs EFM8LB11
ST STM8S005K6
ST STM32F030
STC IAP15W4K61S4
Texas Instruments MSP430FR2111

Anything I'm missing? Thanks!
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 12955
  • Country: nl
    • NCT Developments
Re: $1 MCU review — looking for part suggestions!
« Reply #1 on: July 31, 2017, 04:40:33 AM »
I don't see the value in such a test. At 100 units the engineering costs (*) will swamp the material costs so the point of staying under $1 is rather moot. A comparison between controllers between $8 and  $10 is way more interesting.

(*)for hobby: compare spending the extra time needed due to device limits and working the same time at the local grocery store.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 3699
  • Country: us
  • I informed you thusly
    • Personal site
Re: $1 MCU review — looking for part suggestions!
« Reply #2 on: July 31, 2017, 04:46:12 AM »
You can add SAMD11, it is still under $1, but has USB.

But, yes, I agree, it will be a real waste of time.
Alex
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 10197
  • Country: gb
    • Mike's Electric Stuff
Re: $1 MCU review — looking for part suggestions!
« Reply #3 on: July 31, 2017, 04:57:00 AM »
Seems like a lot of work for something that will be of fairly limited use as everyone's requirements will be different.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline evb149

  • Super Contributor
  • ***
  • Posts: 1575
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #4 on: July 31, 2017, 05:14:39 AM »
I agree that the ROI is low / zero / negative if the specific project is only a DIY thing that is likely to result in Qty 1-100 ever being purchased and used by one person across a multitude of personal projects.

But broadening one's viewpoint, I think that a "crowd sourced MCU comparison" could be very useful in the same sense that contributing to Wikipedia or something is very useful.  A time sink for the particular contributors, maybe, but a potentially great boon for the community overall.

Also since the prices in quantities over around 10k parts are going to be rather distorted by variations in distributor markup, customer specific volume and business relationship based discounts, lots of "direct pricing" not being publically listed, etc. it is probably not practical to expect better than maybe 25% accuracy for mid to large volume prices.

So often I just use something like the cost of approximately one reel's worth, maybe 3k to 5k parts from distributors as a general benchmark of relative costs or manufacturer listed budgetary pricing in 1k-10k range if available.

Anyway an experienced engineer will know a lot of the potential benefits and negative attributes of a part based on its general features (core type, CPU clock MHz range, series) and the "feature overview" list on page 1 of the data sheets.
But often it is the case that someone won't be at all familiar with a new line of MCUs or even some existing series that they simply hadn't worked with before.  In such a case feature and use distinctions beyond what 5 minutes of looking at price / availability and the first few data sheet pages can be very useful.  But by the time one reads the application notes, selector guides, data sheet in depth, evaluates the IDE and application samples a litte, etc. that could take a week or more per part series. 

And one cannot look to vendor supplied or even distributor supplied literature to give an honest picture of the relative merits and demerits of brand A model B MCUs vs brand C model D MCUs except in a cherry picked "See, ours is way better!" examples that may not be overall an honest / full picture.

So given that yeah I'd often have liked to see an EE-Wikipedia or whatever "MCU comparison review" Anandtech style review of the real good / bad points of particular MCUs vs. others that goes into some depth of use cases.

There are often many really interesting and unexpected "features" to unique architectures and models that can be influential as to whether the choice is the best in a given application.   And those "niche benefits" are also the ones that can take a day or a week of analysis to discover by research, maybe even that isn't possible without months / years of expertise "Hey, did you know that there's a much better way to do that on this chip that isn't well documented....".

Power management is one example.  Sure you can have a few MIPS/mA @ X-Y MHz numbers and general "standby current" numbers.  But there's a lot deeper of a story that is MCU specific.  What peripherals CAN be active / useful during a given sleep / low power mode?  Which CANNOT?  What kinds of "wake up" times do peripherals have -- can I say go into deep sleep mode, wake up @ 1kHz rep rate, turn on the HF OSC, ADC, VREF, OPAMP, take an ADC sample, and go back to sleep -- and if so what does the power consumption look like there, or is that too fast to be achieved at all on some MCUs?

What's the 5V / OV tolerance of NN GPIOs?  What's the output current drive capability of NN GPIOs? 
Are there any special good features of the debugging modes / system .. maybe some "real time" oriented debugging which doesn't trash your interrupts / timing / RTOS so much, or power use analysis by the debugger?

So actually I think a good "deep review of MCU series" is actually long overdue by the unbiased community.
It is something practically begging for some experts in various MCU series to each contribute a few paragraphs or whatever as to really good / interesting & really bad points of the MCUs & peripherals they know well, and then some effort to make some nice "round up" tables and benchmarks and stuff from various attributes and code samples.
Maybe a few dozen contributors could produce some stellar review material within a few weeks of time for submitting snippets to a wiki and then some overall editing / formatting / distillation work.

Even just something like developing some nice "standardized" benchmarks and having some volunteers port them to their favorite devkit's architecture / IDE and publishing the result would be great.  What does STM32 "Low Level" API use look like for performance / power of a PID or FOC loop vs. the "Cube" API vs. similar on the MSP432 or AVR or ....
ADC sampling rate vs ENOB vs power consumption vs # of sequenced channels in SE & Differential?
etc.

 

Offline NANDBlog

  • Super Contributor
  • ***
  • Posts: 3604
  • Country: be
Re: $1 MCU review — looking for part suggestions!
« Reply #5 on: July 31, 2017, 05:19:59 AM »
I don't see the value in such a test. At 100 units the engineering costs (*) will swamp the material costs so the point of staying under $1 is rather moot. A comparison between controllers between $8 and  $10 is way more interesting.

(*)for hobby: compare spending the extra time needed due to device limits and working the same time at the local grocery store.
Well, I think it makes sense, for some special niche. Like making a kickstarter, where you would rather keep the cost low, and you are fine for spending more time, because it is a hobby.

i would include some "reference" low cost micros, like Atmega328, STM32F103, Atmega32u4 ... for the reference. What do you get, if you pay more.
 

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #6 on: July 31, 2017, 05:37:49 AM »
I think you're all focusing on the price / quantity for the wrong reason. In no way am I saying that you should swap out your $5 MCUs for $1 ones to save money at 100 unit quantity production run. Obviously that would be ridiculously stupid.

It's more like, "hey, what's out there these days, in 2017? What do all these manufacturer's development environments look like? If you're starting a new, long-term project, what parts should you consider?"

I picked "100 units" because it's sort of where pricing trends start to happen. It's a quantity that professionals and hobbyists can both wrap their heads around. And it's also small enough that it avoids shopping / negotiating directly with an MCU vendor. Look, last time I did a high-volume commercial product, I called up NXP and told them what I wanted to pay for their MCUs. So looking at quantities of 1k, 10k or 100k gets more challenging, because it really depends on your relationships with the vendors.

And I picked $1 price point because without a price limit on this comparison, it's overwhelming to whittle things down. These days, $1 buys you a mid-range, general-purpose basic microcontroller that's got dozens of I/O, half a dozen or more PWM channels, 10 or 12 bit ADC, decent sets of timers, and enough flash and RAM to cover most general-purpose entry-level needs. Personally, I think limiting price to $1 is a great way to give people some intuition about these families — and if you need more, you can always shop up in price, as most of these families are quite large, and vary quite little as you get up into the $10 price (from a broad perspective, what's the difference between the STM32F0 ecosystem and the STM32F4 ecosystem? Not much)

 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 12955
  • Country: nl
    • NCT Developments
Re: $1 MCU review — looking for part suggestions!
« Reply #7 on: July 31, 2017, 05:40:03 AM »
I don't see the value in such a test. At 100 units the engineering costs (*) will swamp the material costs so the point of staying under $1 is rather moot. A comparison between controllers between $8 and  $10 is way more interesting.

(*)for hobby: compare spending the extra time needed due to device limits and working the same time at the local grocery store.
Well, I think it makes sense, for some special niche. Like making a kickstarter, where you would rather keep the cost low, and you are fine for spending more time, because it is a hobby.
I disagree. For a kickstarter you will want the product ready on time. The idea is out there so the competition is watching.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline NANDBlog

  • Super Contributor
  • ***
  • Posts: 3604
  • Country: be
Re: $1 MCU review — looking for part suggestions!
« Reply #8 on: July 31, 2017, 05:46:22 AM »
I disagree. For a kickstarter you will want the product ready on time. The idea is out there so the competition is watching.
Anyone smart enough would develop the hardware prototype, including the firmware, before going for kickstarter. The really smart people only release a 3d render, and get millions for a not feasible idea though.
 
The following users thanked this post: kony

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #9 on: July 31, 2017, 05:49:39 AM »
And one cannot look to vendor supplied or even distributor supplied literature to give an honest picture of the relative merits and demerits of brand A model B MCUs vs brand C model D MCUs except in a cherry picked "See, ours is way better!" examples that may not be overall an honest / full picture.

So given that yeah I'd often have liked to see an EE-Wikipedia or whatever "MCU comparison review" Anandtech style review of the real good / bad points of particular MCUs vs. others that goes into some depth of use cases.
Yes! You hit the nail on the head. The other thing I noticed is that the internet is full of these engraved-in-stone beliefs ("ARM always beats 8-bit", "AVR is faster than everything else because it's single-cycle", "8051 is old and shouldn't be used", "It doesn't make sense to learn a new MCU if you can help it"), and in my testing, many of them evaporate.

Early observations (not finalized!):
  • Siliicon Labs' 8051s are cycle-for-cycle similar to the AVRs in performance, but run at much higher clock rates.
  • One of the biggest determiners for power consumption is whether the core is supplied by an internal 1.8V LDO or not; this is not as well advertised in the datasheet or on distributor web sites as it should be.
  • The Renesas RL-78 is one of the best MCUs in this price range (considering performance and power consumption), has fantastic free dev tools, and it's virtually unheard of in the U.S.
  • Nuvoton's Cortex-M0 parts are probably the simplest ARM MCUs to use, as they have much simpler power topology. They feel like an 8-bit MCU, which would be great for beginners looking to move up to ARM. They have $10-20 dev boards and free dev tools. But you pay heavily for all this with terrible power consumption numbers
  • Different M0 vendors seem to have quite different interrupt structures for their peripherals, which can affect latency hugely
  • ARM-GCC produced much faster (but much larger code) in all my tests when compared to MDK using comparable optimization settings. No flame war until final testing is finished, please.
« Last Edit: July 31, 2017, 05:53:27 AM by funkathustra »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 12955
  • Country: nl
    • NCT Developments
Re: $1 MCU review — looking for part suggestions!
« Reply #10 on: July 31, 2017, 05:50:09 AM »
The really smart people only release a 3d render, and get millions for a not feasible idea though.
LOL!  :-DD
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline blueskull

  • Supporter
  • ****
  • Posts: 7776
  • Country: cn
  • Power Electronics PhD Candidate
Re: $1 MCU review — looking for part suggestions!
« Reply #11 on: July 31, 2017, 05:50:12 AM »
If you are kickstarting, and plan to offshore your production, my suggestion is to try STM8, STM32 and STC. These are widely used in China due to the firmware protection. If you release a product in China that makes money that has weak code protection, your competitor will get the firmware and even decompiled source code the next day.

STM8 and STM32 have very good reputation in code protection, so does the new AVR (ATXMEGA, ATTINY-A, etc.). Chinese MCU companies, by definition, take this very seriously. For instance, STC pays bounty for people finding a way to crack their MCU.

If the MCU you chose simply uses a fuse or simple software bit to protect its firmware, then forget about it. There are lots of companies in China do intrusive MCU decrypting with focused ion beam and scanned electron microscopy technology. Universities rent their FIB machines for very low price, and they don't ask what you're using it for. You pay $20 per hour, you get the FIB and a technician, no questions asked.
SIGSEGV is inevitable if you try to talk more than you know. If I say gibberish, keep in mind that my license plate is SIGSEGV.
 
The following users thanked this post: evb149

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #12 on: July 31, 2017, 05:58:54 AM »
If you are kickstarting, and plan to offshore your production, my suggestion is to try STM8, STM32 and STC.
Or even if you're a hobbyist working here. The STC, dollar-for-dollar, looks fantastic when compared to other 8-bit MCUs. They have decent English datasheets, and their parts are readily available on Ali Express, which many U.S. shoppers are becoming comfortable using, and Taobao (which hardcore shoppers are fine wtih). All STC parts have a UART bootloader and UART debugging (via a monitor program), so if you've got a USB-to-UART dongle laying around, that's all you need. Developing in Keil is much grosser than the Silicon Labs' 8051 parts, though, which use their free, Eclipse-based IDE — while still calling the (excellent) Keil C51 compiler under the hood.

The STM8 is a fantastic microcontroller that ships with a great peripheral library, and has many features found only on Cortex MCUs (slew rate / drive strength, lots of clocking options, and a nice core design). Biggest problem for me is that STVD feels like it belongs in Windows 98.

STM32F0 is pretty average when compared to other Cortex-M0 parts, but it's really cheap in China, and, like the STM8, supports $5 ST-Link debugging. Lots of good, free, Eclipse-based tools.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 3699
  • Country: us
  • I informed you thusly
    • Personal site
Re: $1 MCU review — looking for part suggestions!
« Reply #13 on: July 31, 2017, 05:59:31 AM »
Siliicon Labs' 8051s are cycle-for-cycle similar to the AVRs in performance, but run at much higher clock rates.
8051 will lose just because of a single accumulator. C compilers suck at dealing with that.

The Renesas RL-78 is one of the best MCUs in this price range (considering performance and power consumption), has fantastic free dev tools, and it's virtually unheard of in the U.S.
But if you do have a problem, good luck getting any support. Manufacturer will not respond unless you are buying millions, and there is no public support, since nobody uses them in hobby and small scale projects.

Different M0 vendors seem to have quite different
interrupt structures for their peripherals, which can affect latency hugely
interrupt latency is defined by the core. Structure of interrupt source may result in needing to handle more interrupts to achieve the same goal though.

ARM-GCC produced much faster (but much larger code) in all my tests when compared to MDK using comparable optimization settings. No flame war until final testing is finished, please.
Try it with LTO. On big projects I see 10-20% reduction in size.

PS: I'm pretty set on ARM parts, I'm not moving to anything else unless there is a HUGE advantage. Anything else just not worth my time and hassle.
Alex
 
The following users thanked this post: Yansi

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #14 on: July 31, 2017, 06:10:04 AM »
8051 will lose just because of a single accumulator. C compilers suck at dealing with that.
It's funny that you're literally doing exactly what I was just making fun of — people applying old, tired opinions that don't necessarily hold up in 2017.

While what you said was true of compilers when the AVR was designed, it's not necessarily true in 2017. In fact, the fact that the 8051 has fine-grained balance between data space and access time (MOVs and operations can take 1, 2, or 3 cycles to execute -- basically the number of bytes long the instruction is -- based one where the data is) gives you control over performance, in many scenarios. In my testing, an ATTiny and an EFM8 were both tested with identical code to perform high-pass filtering using a 16-bit direct form I biquad implementation. They have almost identical performance numbers. This largely comes down to memory access, with Silicon Labs' pipelined core structure helping edge it out over the ATTiny. To add insult to injury, the EFM8 at the same price point runs at 72 MHz from an internal oscillator, while the ATTiny can only hit 8 MHz from an internal oscillator. And the EFM8 @ 72 MHz uses less power than an ATTiny @ 8 MHz. Obviously, this was *one test* and the results are preliminary.

Of course, Cortex-M0 parts that cost the same have come in and wrecked both of these in terms of raw processing performance and nJ-per-sample power consumption figures (but not power consumption in wait/sleep modes!)

Again, not starting a flame war -- there's lots and lots and lots of good reasons to pick an AVR part, but just make sure to check your numbers before you talk about performance or power consumption.
« Last Edit: July 31, 2017, 06:12:44 AM by funkathustra »
 

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #15 on: July 31, 2017, 06:15:42 AM »
PS: I'm pretty set on ARM parts, I'm not moving to anything else unless there is a HUGE advantage. Anything else just not worth my time and hassle.

Which ARM part, though? I'm testing eight of them. All have wildly different performance, features, and development ecosystem friendliness.

Also, there's a lot of applications where I've spent way more time hassling with low-power modes trying to get an ARM microcontroller to get near what I get on a low-power 8-bit guy. It always comes down to the application.

I think you're going to love reading my write-up when I'm finished.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 3699
  • Country: us
  • I informed you thusly
    • Personal site
Re: $1 MCU review — looking for part suggestions!
« Reply #16 on: July 31, 2017, 06:15:56 AM »
It's funny that you're literally doing exactly what I was just making fun of — people applying old, tired opinions that don't necessarily hold up in 2017.
I should probably rephrase my statement: "Free and open C compilers suck at dealing with that.". I have no doubt that proprietary win-only compiler may have improved. I personally don't care, I don't want to be stuck in a hell of proprietary tools.

And there is no reason to spend a whole lot of effort on making 8051 work, IMO.
Alex
 

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #17 on: July 31, 2017, 06:19:24 AM »
I should probably rephrase my statement: "Free and open C compilers suck at dealing with that.". I have no doubt that proprietary win-only compiler may have improved. I personally don't care, I don't want to be stuck in a hell of proprietary tools.
"Open" you're not going to get with Keil, but free? Yes. Silicon Labs gives away full versions of Keil's C51 compiler when you install their free Eclipse-based IDE, Simplicity Studio. And, it's completely cross-platform — which should entice some hobbyists to check it out, since they tend to be on macOS / Linux more often than other developers.

And there is no reason to spend a whole lot of effort on making 8051 work, IMO.
600 nA sleep current, with RAM retention, with an RTC running.
 
The following users thanked this post: wraper

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 3699
  • Country: us
  • I informed you thusly
    • Personal site
Re: $1 MCU review — looking for part suggestions!
« Reply #18 on: July 31, 2017, 06:22:01 AM »
Which ARM part, though?
Well, I work for Atmel/Microchip, and I do like SAM parts (SAM D specifically). I used STM32 a lot in the past, and have no problems with them either.

All have wildly different performance, features, and development ecosystem friendliness.
I only do bare-metal, so vendor ecosystem is not a problem, they all universally suck. And requirement for performance is very specific to a project. I doubt there is a way to do a good chart-like comparison. There may be details that may make or break a project that you will not notice without extensively using the part.

Also, there's a lot of applications where I've spent way more time hassling with low-power modes trying to get an ARM microcontroller to get near what I get on a low-power 8-bit guy. It always comes down to the application.
This is true at times, but much less in recent years. And in my experience ARM datasheets are much more honest about their power consumption numbers.

I never had a problem hitting datasheet number straight out of the box. With AVRs I had to dick around a lot to get anywhere close to the claimed number.
Alex
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 3699
  • Country: us
  • I informed you thusly
    • Personal site
Re: $1 MCU review — looking for part suggestions!
« Reply #19 on: July 31, 2017, 06:29:43 AM »
"Open" you're not going to get with Keil, but free? Yes.
Until they change their mind (or contract expires), and then you are screwed.

Keil already scaled down maintenance on anything but ARM after acquisition my ARM. It is a matter of time until they kill it entirely.

600 nA sleep current, with RAM retention, with an RTC running.
This is so far the best argument, but ARMs nowadays are mostly ~2 uA sleep under the same conditions. And the gap narrow every year.
Alex
 

Online coppice

  • Super Contributor
  • ***
  • Posts: 2849
  • Country: gb
Re: $1 MCU review — looking for part suggestions!
« Reply #20 on: July 31, 2017, 06:58:19 AM »
This is so far the best argument, but ARMs nowadays are mostly ~2 uA sleep under the same conditions. And the gap narrow every year.
The ARMs are actually getting worse for their sleepy state consumptions. At the finer geometries they are moving to its really hard to to get the leakage as low as at, say, 180nm or 130nm. There might be breakthroughs. 180nm leaked like a seive in the early days, but most makers managed to get very respectable leakage later on. Right now the 90nm, 65nm and 45nm geometries being used for new MCUs are still comparatively leaky.
 
 
The following users thanked this post: funkathustra

Online nctnico

  • Super Contributor
  • ***
  • Posts: 12955
  • Country: nl
    • NCT Developments
Re: $1 MCU review — looking for part suggestions!
« Reply #21 on: July 31, 2017, 07:12:20 AM »
"Open" you're not going to get with Keil, but free? Yes.
Until they change their mind (or contract expires), and then you are screwed.

Keil already scaled down maintenance on anything but ARM after acquisition my ARM. It is a matter of time until they kill it entirely.
If you get a license which never expires and can be installed on any PC then you won't need Keil's support. I have used Keil's compiler for 8051 and I must say it does a pretty good job. Still like any architecture similar to the 8051 (like 8 bit PIC) you have to write C code with the architecture in minder otherwise the code will be extremely slow.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: wraper, funkathustra

Online wraper

  • Supporter
  • ****
  • Posts: 6359
  • Country: lv
Re: $1 MCU review — looking for part suggestions!
« Reply #22 on: July 31, 2017, 08:05:18 AM »
Of course, Cortex-M0 parts that cost the same have come in and wrecked both of these in terms of raw processing performance and nJ-per-sample power consumption figures (but not power consumption in wait/sleep modes!)
Also cortex M at such price don't have such interesting peripherals. For example, with EFM8UB1 I can get MCU with crystal-less USB, 5V tolerant GPIO, internal 3.3V voltage regulator which can supply up to 100 mA to external devices and 12 bit ADC for around $0.60 @100pcs. That is pretty amazing.
 

Online NorthGuy

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: ca
Re: $1 MCU review — looking for part suggestions!
« Reply #23 on: July 31, 2017, 08:36:29 AM »
I think making such comparison is a brilliant idea. Don't forget to post the results.

I found you one of the newest PIC18s for 99 cents:

http://www.microchipdirect.com/ProductSearch.aspx?Keywords=PIC18LF24K40-I/SS

Unfortunately PIC16F1454 with USB didn't make it under the dollar limit.

If you want to measure sleep current on PICs, use LF versions instead of 5V versions, e.g. PIC16LFxxx instead of PIC16Fxxx - they have sleep current in nA.

Also, traditional benchmarks do not reflect performance very well. You may try something non-traditional, e.g. how fast you can toggle a pin, how fast you can squash a bug - e.g. change an output in response to the rising edge on input, how fast you can send/receive UART etc. Although, even then you'll be mostly evaluating C compilers rather than chips.

 

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: $1 MCU review — looking for part suggestions!
« Reply #24 on: July 31, 2017, 09:07:34 AM »
I think making such comparison is a brilliant idea. Don't forget to post the results.
Absolutely! I'm writing up an extensive section of pages on my blog which will have a large comparison piece, along with separate in-depth reviews and analysis for each family, which will include "gotchas" that each platform inevitably has, along with some qualitative discussion about available IDEs, peripheral libraries, documentation, and other resources.

I found you one of the newest PIC18s for 99 cents:

http://www.microchipdirect.com/ProductSearch.aspx?Keywords=PIC18LF24K40-I/SS
Oooh, thanks for the link — I looked for a PIC18 under a buck and couldn't immediately turn something up. Will add this to the list.

If you want to measure sleep current on PICs, use LF versions instead of 5V versions, e.g. PIC16LFxxx instead of PIC16Fxxx - they have sleep current in nA.
Yup, using the LF parts for everything, since all benchmarking and power measurements will be conducted at 3.3V (sorry, AVR).

Also, traditional benchmarks do not reflect performance very well. You may try something non-traditional, e.g. how fast you can toggle a pin, how fast you can squash a bug - e.g. change an output in response to the rising edge on input, how fast you can send/receive UART etc. Although, even then you'll be mostly evaluating C compilers rather than chips.

Totally agree! Just to get into a little bit more of the mechanics of what I'm doing, in addition to comparing specs, I'm doing three code-oriented tasks on each platform:
  • Wiggling a pin as fast as possible. Analyze number of instructions and cycles per wiggle — doing a bitwise complement like this gives you an idea of how the platform works under the hood; is it a CISC architecture that can directly complement a bit in an SFR? Does it have to do a read-modify-write? Does the machine cycle equal the clock cycle?
  • 64-sample high-pass filter implemented as a 16-bit direct-form I biquad. Gives a good indication of math and memory performance, as well as efficiency (as I'm measuring nJ-per-sample in addition to pure maximum sample rate)
  • Implement a DMX-512 receiver attached to an RGB LED; minimize power consumption by using wait states and low-frequency clocking. Looking just at the MCU, this helps develop some basic intuition about peripheral programming and clock management / pin muxing. It shows off power consumption figures when operating in non-deep-sleep / non-fully-active state. But it also shows off how good (or disgusting) the manufacturer-supplied SDK and peripheral libraries are, what the features of the IDE include, and if the code-gen tools are worth using (especially when you have that one extra quirk — that DMX-512 requires detecting a framing error as a 'start of frame' indicator, and some peripheral libraries / code-gen tools don't do this for you).
« Last Edit: July 31, 2017, 09:11:18 AM by funkathustra »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf