$1 MCU review — looking for AVR part suggestions

Go To Last Post
172 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:

Some time ago I dipped a part of my littlest pinky toe in the ARM world. (STM32F103C8T6)

It's a 32 bit processor but the I/O structure (timers, etc) is apparently mostly 16 bit.

That's one of my pet peeves with some ARMs. I cannot see the sense in a 32b MCU, with 16b Timers ?

Some 8b MCUs even allow Timer cascade to 32b, such is the demand for the better dynamic range/precision.

 

NXP 'gets this' & have (IIRC) 32b timers and 32b prescalers, and Nuvoton are close, with 24b timers.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:

Ah, so that is the "steering" part.

Triggers a memory about a story floating on (or sunk deep into) the 'net.

It was about a uC occasionallly losing bits in it's I/O configuration registers. The whole uC (or FPGA?) kept running happily, just some outputs stopped outputting the right signals untill the uC got a hardware reset. Then it worked all perfectly for a while, so no hardware pins blown, but the problem kept recurring.

The likely culprit was probably marginal decoupling / emc design, whatever but investigating and PCB revisions take time.

 

So as a (temporary) solution they put the whole I/O configuration in flash and used a periodic interrupt to rewrite it to the I/O ports.

That's more common than you realize, and is somewhat standard ESD hardening. Always a good idea to 'refresh the config', where practical.

 

Worse was the part where we found Reset was more of a 'Reset Request', and it could disable under ESD stress tests - outcome was a Power Removal watchdog design, that I'm surprised is not seen much.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

In case anyone was wondering if I ever got around to finishing this write-up, the answer is "Yes! Finally!"

 

Check out The Amazing $1 Microcontroller on my blog.

 

It took several months of on- and off-again work, but I got through all 21 parts I selected.

 

I'd like to thank everyone on this thread for their help --- I got steered in the right direction toward the new tinyAVR 1-Series (which pulled in some impressive performance), and I also got some suggestions for other parts that ended up getting included, too.

 

If there are things you think need to be mentioned that I'm forgetting, please drop a line on this thread (or, shamelessly plugging my blog, as a comment on this post smiley)

 

Thanks again for the wonderful discussions!

Last Edited: Mon. Nov 6, 2017 - 07:12 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow ... and that's from only a skim.

Plan is to put a comment onto that web page "soon"

Thanks for the follow-up.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jay, a stunning roundup of the chips and the oft ignored tools. This must have taken you some time. I'm glad you investigated some of the more obscure parts that, whilst I'd heard of, have never really appeared on my radar.

 

A couple of comments - the PIC16 series aren't RISC - they are accumulator based, not single cycle and not load/store. Microchip grabbed the moniker and repurposed it for their own ends.
One thing I found missing was the voltage range of the various devices - the M051 and XMC1100 for example are 5 volt parts which for ARM ('arm') based parts sorta sets them apart.

 

As for using Arduino shields, I have used the prototype ones ( the ones with lots of holes) to build up some test hardware for the XMC1100 and STM32 parts. I've even used used one with a small solderless breadboard on top for some quick prototyping.

 

Great work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

the PIC16 series aren't RISC - they are accumulator based, not single cycle and not load/store. Microchip grabbed the moniker and repurposed it for their own ends.

Thanks for the comment --- RISC is a loaded term (as you can imagine), so I've added additional clarity to explain that while it is RISC in the sense that each instruction is precisely one word long and executes in a single cycle (unlike CISC parts like the 8051), it is *also* an accumulator-based architecture, which is quite different than most RISC parts. I hope you think this change makes the information more useful.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just thought I'd let you know: Your navigation pane does not behave well on smallish screens. The bottom of it is off the screen and it is not scroll'able. Only if I zoom out to about 70% can I see the whole navigation pane. At 100% the last visible entry is "Dev Tools".

 

Chromium Version 59.0.3071.109 , display is 1366 x 768.

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:

Just thought I'd let you know: Your navigation pane does not behave well on smallish screens. The bottom of it is off the screen and it is not scroll'able. Only if I zoom out to about 70% can I see the whole navigation pane. At 100% the last visible entry is "Dev Tools".

Good call — I will fix this as soon as traffic calms down (I can't even get a login page).

 

EDIT: No quick fix, other than removing content, unfortunately. I'll look at some core CSS changes I can make long-term to shrink that down, but there's a lot of dependencies I'll have to work through. Sorry about the inconvenience!

 

By the way, for people who tried visiting earlier and got 503'd, I've made some changes to my network configuration, and I think the site should be back up for most users.

 

I'll save you the scrolling: https://jaycarlson.net/microcont...

Last Edited: Mon. Nov 6, 2017 - 11:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is a superb reviewyes. Thanks for keeping us posted.

 

It's amazing what you get for < $1 these days.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will say one error in the notes is that the AVR have a flat ISR, the new tiny's (tiny1616 was the one you picked), have a two level.

 

Now since it a relativ new chip I'm not sure if the Compiler support it.

 

And then it's not clear when you run 10MHz and when 20MHz on the AVR, (And find it a bit funny that you have to trick your 5V device to run 3.3V :D )

 

I don'e see that you have a 3v3 volt rule.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://jaycarlson.net/microcont...

Comments

 

AVR
1. "And interrupts are one of the weak points of the AVR core: there’s only one interrupt priority, ..."
   tinyAVR 1-series has two interrupt priority levels (datasheet, CPUINT)
2. like megaAVR, tinyAVR 1-series is Harvard architecture but with unified memory (datasheet, Memories, Memory Map)
3. tinyAVR 1-series UPDI is more capable than megaAVR debugWIRE

 

Parametric Reach
megaAVR
XMEGA AVR are a follow-on to some megaAVR.
--
ATmega2561   - 16MHz, 64 pins, 256KB,  8KB
ATxmega384C3 - 32MHz, 64 pins, 384KB, 32KB
--
ATmega1280    - 16MHz, 100 pins, 128KB, 8KB + 56KB on EBI
ATxmega128A1U - 32MHz, 100 pins, 128KB, 8KB + 16MB on EBI

 

Atmel Studio
"The excellent IntelliSense engine that Microsoft spent years perfecting has been replaced by some sort of Atmel-proprietary “Visual Assist” technology that ..."
1. IntelliSense and AVR is available from third party(ies)
2. Visual Assist from Whole Tomato Software

 

Microchip Customizations
"As these compilers [XC] are quite expensive and ..."
About 1USD/day though the dongle is 1495USD

 

Discussion
megaAVR
"While the megaAVR has a perplexing debugging experience that requires two completely different interfaces and protocols to work with the part, ..."
fyi, once debugWIRE is enabled then stay with it until done.
"... low-cost, open-source programmers (which don’t support the UPDI interface)."
pyupdi is Python UPDI programming via an inexpensive USB UART; debug via UPDI is currently only Atmel-ICE or Power Debugger

PIC32
"... expensive compilers ..."
Can chipKIT PIC32 GCC be invoked from MPLAB X?

 

Thank you!

 

------------------------------------
Notes
1. IntelliSense with most AVR is available from VisualGDB
2. IntelliSense is in Visual Studio Code and AVR might be available via the Native Debug extension
3. The next release of PlatformIO may restore AVR debugging; Visual Studio(s) are some of the IDE that integrate PlatformIO
4. LLVM AVR may be a current or future alternate to AVR GCC
5. ATmega328PB is approaching 1USD each for 100 though it has a supply and demand problem that's easing 17Q4 (should be resolved 18Q1)
6. 32KB tinyAVR 1-series is likely for '18 and probably under the price limit

Ref.
VisualGDB, https://visualgdb.com/tutorials/...
Visual Studio Code, https://code.visualstudio.com/
Native Debug, https://marketplace.visualstudio...
PlatformIO, AVR, http://platformio.org/platforms/...
PlatformIO for Visual Studio Code, https://marketplace.visualstudio...
Whole Tomato Software, https://www.wholetomato.com/defa...
XC8 PRO subscription, http://www.microchip.com/Develop...
Featured MPLAB XC Compiler Licenses, http://new.microchipdirect.com/p...
LLVM, Changes to the AVR Target, http://releases.llvm.org/5.0.0/d...
Python UPDI driver for programming "new" tinyAVR devices, https://github.com/mraardvark/py...
chipKIT, http://chipkit.net/

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow! That's a very impressive write-up.

 

There seems to be an inconsistency between the chart and your writing.

 

You wrote:

 

Unfortunately, the STC8 simply does not care about power consumption — so it barrels along at 1.62 mA (still not the worst part in this round-up — not by a long shot).

 

However, the chart shows that the STC8 consumed 5470 microamps in your test. It was the STM8 that consumed 1620 microamps (1.62 mA).

 

There's also a few typos, such as "sense" in the sentence "but has sense expanded" (should be "since") and "faired" (should be "fared").

 

Besides those, I didn't see any other issues.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"And interrupts are one of the weak points of the AVR core: there’s only one interrupt priority, ..."

 All things considered, I much prefer the AVR "one priority but lots of vectors (separate vectors for uart rx and tx, even!)" over something like the PIC "two priorities = two vectors" scheme.  Or even the 68k "7 priorities with one vector per priority."

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I see that Jack Ganssle has linked to the survey in his latest newsletter...

 

Quote:

Many readers sent this link, which explores 21 different microcontrollers, pondering the strengths and weaknesses of each. Some vendors will not be pleased...

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

McuOnEclipse has also linked to it.

https://mcuoneclipse.com/

 

Quebracho seems to be the hardest wood.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just saw an announcement, yesterday (Nov 21, 2017) for a 0.25 USD MSP430. Did not note details except  that one of the proposed uses is an RS-232 to RS-232 "bridge". 

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
an RS-232 to RS-232 "bridge". 

commonly known as a "piece of wire" ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just saw an announcement, yesterday (Nov 21, 2017) for a 0.25 USD MSP430. Did not note details

 

It's a chip with 0.5kB of FRAM program memory, and ... more peripherals and RAM (also 512b) than you'd expect to see on a chip with that little memory.  (Essentially, I guess you get to get to do a "little bit of stuff" with "your choice" of one or two peripherals.)  An interesting strategy?  (Also, TI seems to be following through with their "FRAM is the way" opinions.  Also interesting.)  256 instructions is ... not much.

 

 

proposed uses is an RS-232 to RS-232 "bridge". 

Really?  I only one serial thing ("eUSCI")...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Electronic Design

Electronic Design

25 Functions in a 25-Cent Micro

Texas Instruments’ value-line MSP430 16-bit micro costs only 25 cents and comes with 25 preconfigured apps.

by William Wong

Nov 20, 2017

http://www.electronicdesign.com/embedded-revolution/25-functions-25-cent-micro

...

1. The MSP430FR2100 is the top end of the family. It adds the 8-channel, 10-bit SAR ADC with 1.5-V reference and temperature sensor.

...

https://www.mouser.com/Search/Refine.aspx?Keyword=MSP430FR2100

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MSP430FR2100 

 The new chips are the FR20xx, even smaller and cheaper than the 21xx series.  Alas, like many of the chips advertised as meeting a particular price point, the "small quantity" price isn't that great.  Lots of chips are similarly priced, including a bunch of the new AVRtinys.

 

 

>> RS-232 to RS-232 "bridge". 

Really?  I only one serial thing ("eUSCI")...

Ahh.  one hardware UART, one SW uart using timer interrupts.  "half dupex."

The "25 functions" is apparently a set of build-able, app-notes with downloadable code, designed to be "easily customizable."  They have a fancy "flipbook" in annoying format (heh.  Rather like the old Microchip "tips&Tricks"?)

Pages