The breadboard microcontroller experimenter has a host of platforms to work with that can be had in the familiar DIP format. Old-school people can still find classic 8-bit platforms, the Ardunisti have their ATMegas, and PIC lovers have a pile of chips to choose from. But ARM experimenters? Out of luck, because as we have previously reported, popular past devices such as the LPC810 in a DIP8 package are now out of production.
News comes from China though of a tiny ARM Cortex M0 for pennies that may not be in a DIP8, but is in almost the next best thing. The Synwit SWM050 can be had in a TSOP8, which though it’s not quite as friendly as its larger SOIC8 cousin, is still easily solderable onto a DIP8 adaptor for breadboard use. Spec-wise it’s 5 V tolerant, has an 8 kB FLASH and 1 kB of RAM, 6 GPIOs, and can clock away at a not incosequential 36 MHz.
We have [Sjaak] to thank for the discovery of this device, and for doing a lot of work including getting some die shots taken to dig up and make sense of the Chinese documentation, and to provide some dev tools should anyone want to play with it. There’s even a small breakout board for the experimenter unwilling to design their own.
Earlier this year we marked the passing of the DIP8 version of the LPC810 microcontroller, and for those mourning it we made an important point. It’s now normal to use one of the vast array of single board computers instead of a bare microcontroller, you might wish to ask yourself why you would do so.
Thanks [Ziew] for the tip.
Cypress has a couple of ARM MCUs in a similar package that are also quite cheap. No reason to jump on an unknown supplier.
The PSoC 4000 line has an 8-SOIC package, and they’re less than 50 cents each, in quantity orders, but it tops out at 16 MHz.
If you’re willing to do TSSOP (which is really easy if you’re doing custom PCBs and use an electric hotplate or oven for the soldering), then there are heaps of STM32 options in TSSOP with far better (English-speaking) support than something with only Chinese datasheets.
You can even buy an STM32F030 on PCBs from eBay, ready-breadboardable for your code prototyping before doing the PCB design.
I’ve never had any problems with soldering TQFP or QFN to adapter boards.
Nevertheless, I prefer to buy complete boards ready with programming adapter, simply because they’re so cheap and convenient.
I can’t find them on lcsc, looks like they got bought up maybe.
there are 8 an 16 pin versions , see
https://lcsc.com/product-detail/Synwit_SWM050Q2S7-65_C111817.html
https://lcsc.com/product-detail/Synwit_SWM050I2P7-65_C111818.html
Sorry, I meant Dynastream which uses Nordic. Ready to use with programming header, https://www.digikey.com/product-detail/en/garmin-canada-inc/N5150M5CD/1094-1021-ND/5413880
I like it because it isn’t going away.
What about using the nRF52840 dongle?
Cheaper, much more capable, comes with a DFU bootloader, and also has a programming header (although not populated, but it’s easy to solder).
This thing even runs Micropython.
https://www.nordicsemi.com/eng/Products/nRF52840-Dongle
I also like using the Nordic NRF bluetooth boards. They are under $20. You don’t have to use the bluetooth but its in a 20mmx20mm package for the SOIC version. You get the M0 and plenty of peripherals. The best part is the product is not going away. Great support too.
That is like 40X more expensive in small quantities. Hardly the comparison.
That is like comparing a used moped to a brand new sedan.
I wasn’t comparing costs. The article talks about parts that come and go. Too many have short life cycles. I am talking about an M0 that is on a board, ready to use, with programming header, that has a long life cycle. I started using them years ago and they are still available. You can buy cheaper boards with the same M0 on them through China but they lack FCC if you are worried about that sort of thing.
I use the SAMD09/10/11 in soic14. Small, cheap, and enough pins to still use the 2 jtag pons for debugging. Arm and under 1 USD.
Showing a large gap in my knowledge here… would someone quickly sum up the advantages to the average hobbyist of using a mini ARM over a PIC, or ATMEL (eg Arduino), or ESP8266 and so on? For the average sorts of projects one would typically use a small micro-something for?
“Just because”, or “to learn ARM” are both sufficient answers. I have drawers full of the above and time invested; I’m just wondering what I might gain by learning and using using a mini ARM. Thx.
“Just because”, or “to learn ARM”.
If you’re programming in C or higher, then for most projects the peripherals matter more than the core in a microcontroller.
I have use ARM chips on different series or from different vendors without switching development tools chains.
The peripherals are series/vendor specific, but there are peripheral drivers/framework to make life a bit easier.
I code in bare metal and IMHO I found it easier to read the 1000+ page reference manual than to decipher what those framework/driver parameters. YMMV.
Assuming the term mini arm is a low pincount arm microcontroller..
There isn’t one specifically; hobbyist tend to use the chip they are most familiar with and not the one that is the best for the job.. for the ‘proffesionals’ it comes down to the best chip (peripheral wise) and the smallest (memory wise) which does the job, so the margins on the final product are better.
Some benefits of ARM vs others:
– 32 bit core
– Opensource toolchains
– multiple vendors using the same processor core (no vendor lock in except for the peripherals)
– higher clockspeeds
– more/faster peripherals
These are things in general and may not apply to every other microcontroller (ie the AVR is supported by GCC, but microchip is not)
It is up to you to choose if you want to invest time and money into a new microcontroller. Personally I think there is a great feature for ARM, and their marketshare is getting bigger in favor of the more traditional microcontrollers.
My thanks to alphatek & sjaak (and nice work, sjaak!)
Floating point math
Not in cortex-M0/M1/M3 only in cortex-M4/M7
even then, the default in C is double precision. You must be most meticulous in your C code to cast your numbers carefully or else your floats are really doubles and the compiler will generate miserably slow code.
If you’re doing something that just happens to be math intensive or need some of the more advanced peripherals on a 32bit ARM. Most of the time an AVR is ideal.
I use stm32l0 a lot because it has better low-power modes than most other uC’s, better than AVRs for sure. This allows me to build stuff that runs on a coin cell for a long time.
* no funny memory configuration. Memory mapped for everything and no weird addressing modes like bank switching or pointer only access. Both RAM and FLASH are in the same address space. i.e. code/data can be in RAM or FLASH. None of the messy declaration/and special macros to use data in code space e.g. AVR as data and code are in separate memory space.
* more RAM and FLASH thanks to the smaller geometry.
* much better code efficiency, faster execution speed, 32-bit operations doesn’t take more cycles than 8-bit
* better or more complex (for better or worse) peripherals and most of the time comes with DMA
* Hardware debugging (SWD/JTAG) allows you to do run time debugging, set breakpoint, look at variables/peripheral registers.
More here: http://www.emcu.it/STM32/WhyUsingCortexM3/WhyUsingCortexMx.html
Few dime is very precise definition :)
ATTiny10 cost $0.24
LPC811 cost $0.40
ST32L011 cost $0.50
and also may qualify for few dime, but come from reliable vendors
it is $0.42 for oncies at lcsc.com which is the chinese digikey/mouser.
from the lede, i was expecting to see a DIP ARM, and i did not see a DIP ARM, and i was disappointed.
i am used to using stm32 boards (red pill or discovery), and that is fine, i don’t know why i would switch to a different ARM if i’m still using a pcb to access its pins.
but really, pic is grand!
“It’s now normal to use one of the vast array of single board computers instead of a bare microcontroller, you might wish to ask yourself why you would do so.”
I hope this was meant as a joke…
“Ardunisti”? What?
Funny seeing this here the day after watching this:
https://youtu.be/VYhAGnsnO7w
Coincidence? Yah probably but I guess it shows the direction our hobby is continuing to move in.
we’re all going to look for cheaper than rice micros forever. its the engineering way. I was surprised just as he was at the amount of information for that $0.03 micro, program once really isn’t a detractor if you can ICE. i mean time costs more to program it than it is worth….