News for hackers. Stuff that matters.
Re:ARMing a Breadboard – Everyone Should Program an ARM by ChuckMcM on Saturday October 10, 2015 @10:48AM (#10365636)
I too am often surprised at how often people reach for an Atmel 8 bit AVR chip rather than an ARM. It is a testament to the momentum that Atmel built, the avr-freaks community and the amazing cost effectiveness of it all.

But now we're seeing ARM chips with built in clocks, and fewer base components required and I think the end of that AVR dominance is on the horizon. And that is why Dialog is buying Atmel[1].

Getting started with ARM is easy with one of ST's Nucleo boards (which are kinda Arduino Shield compatible, the biggest issue I have hit is that i2c at 3.3v is an issue on some boards). Their Discovery boards are even more capable but can be a bit more work to breadboard with.

Once ARM put out a supported GCC on launchpad.net it really made it easy to get a development environment up (no more crosstool or other package for building a cross compiler).

[1] http://fortune.com/2015/09/21/dialog-buying-atmel/

Re:ARMing a Breadboard – Everyone Should Program an ARM by shortsightedsid on Saturday October 10, 2015 @03:42PM (#10366707)
I'm using a PIC12 in product that replaces an existing one. At Volume Pricing 8 Bit PICs are pretty much incomparable to ARMs. A quick check on Digikey shows that for 10000 pieces, the cheapest 8 Bit Micro is a PIC10 - 35Cents/Unit (that's for today only). ATTiny is about 2 Cents more but that can change. The cheapest 8051 from Energy micro is in the same range as well.

The cheapest ARM Cortex M3/M0 or even a ARM7 is $1+. When you are shipping products (and not doing a hobby project), BOM cost is a major factor. If you sell a Million Units each with a micro in them, the cost difference is about $700,000. Even keeping cost aside, size matters. The smallest 8 Bit micros from Atmel or Microchip or any 8051 is around 3x3mm. Most ARM micros are much larger.

Rule of thumb that I use is to pick the micro by function, price and size. Sometimes a 8-Bit micro is more than enough for the job. Buying something that costs more, bigger in size and for which the MHz is not an advantage is an overkill.

Having said that, a companion product that also working on requires the MHz and so, a Cortex-M3 fits perfects there.

Re:ARMing a Breadboard – Everyone Should Program an ARM by another on Saturday October 10, 2015 @09:32PM (#10367685)
> At Volume Pricing 8 Bit PICs are pretty much incomparable to ARMs. A quick check on Digikey shows that for 10000 pieces, the cheapest 8 Bit Micro is a PIC10 - 35Cents/Unit (that's for today only)... The cheapest ARM Cortex M3/M0 or even a ARM7 is $1+.

I don't think that statement reflects the situation today.

Cost differences at the low end have become increasingly narrow, where they are present at all. Using just Digikey pricing at 10k, as above, it's easy to find M0/M0+ parts in the range of $0.40--$0.50/ea at 10k.

> The smallest 8 Bit micros from Atmel or Microchip or any 8051 is around 3x3mm. Most ARM micros are much larger.

These parts are obviously available in a range of package sizes, but the smallest M0+ MCUs are also 3x3mm.

Re:ARMing a Breadboard – Everyone Should Program an ARM by sa2ajj on Saturday October 10, 2015 @11:47PM (#10367967)
Could you please provide links [to DigiKey]?
Re:ARMing a Breadboard – Everyone Should Program an ARM by ChuckMcM on Sunday October 11, 2015 @05:54PM (#10371244)
Digikey has a pretty good web site for search, start with ARM M0+ and then select for what you want. I picked the 3x3MM QFN package as a selector and got a number of Kinesis parts, here is one that in 100 unit quantities is .50 each. In 10K I'm sure that is under 40 cents. http://www.digikey.com/product-detail/en/MKL03Z8VFG4/MKL03Z8...

This particular part 8K flash and 2K RAM. Now the M0+ is better for these low end parts because it has the Thumb instruction set which gives it better code density than the original M0

Re:ARMing a Breadboard – Everyone Should Program an ARM by sa2ajj on Monday October 12, 2015 @02:26PM (#10376194)
Thank you, will do :)
Re:ARMing a Breadboard – Everyone Should Program an ARM by cottonseed on Sunday October 11, 2015 @12:15AM (#10368026)
The cheapest ARM on Mouser is the same price: 0.35/part for 5k in an SOIC-8 (6x6mm). ARM chips are available in 2x2mm chip-scale packages.
Re:ARMing a Breadboard – Everyone Should Program an ARM by klagermkii on Saturday October 10, 2015 @11:46AM (#10365863)
Most hobby electronics projects aren't really CPU limited though, so using ARM doesn't really bring relevant advantages. Having a standard platform, including the peripherals like PWM/ADC/timer etc which are going to vary wildly between ARM implementations, is far more important for people starting out and are trying to solve their problems via Google.

The 5V chips are also better at taking punches from miswired projects.

Re:ARMing a Breadboard – Everyone Should Program an ARM by ChuckMcM on Saturday October 10, 2015 @12:39PM (#10366017)
My experience is that most hobby projects are RAM limited when people are using the AVR chips. Whether its trying to hold a copy of an LCD view, or any sort of moderate data structure. The ATMega328 is 8K of RAM. The M0+ chips seems to all come with 64K of RAM, and given that folks are writing in C/C++ rather than Assembler that is quite helpful.

I agree with you on the general tolerances to abuse though. I've filled out a couple of surveys sent to me by semiconductor folks (I often get one after attending a free training session) and I've mentioned several times that a short/overvoltage hardened chip would be a useful thing for me. You can do that with off chip parts but since manufacturers are wondering what to do with an abundance of silicon surface area to distinguish their products, I continue to suggest that would be one way.

Re:ARMing a Breadboard – Everyone Should Program an ARM by aexaey on Saturday October 10, 2015 @12:48PM (#10366063)
> The ATMega328 is 8K of RAM

No, just 2K. [0]

> The M0+ chips seems to all come with 64K of RAM

That would be 8K. [1]

[0] http://www.atmel.com/devices/atmega328.aspx

[1] http://www.st.com/web/en/catalog/mmc/FM141/SC1169/SS1817?sc=...

Re:ARMing a Breadboard – Everyone Should Program an ARM by ChuckMcM on Sunday October 11, 2015 @01:17AM (#10368165)
Thanks, I was talking to the Atmel Tech On Tour folks today and the part I'm really interested in of late is the R21 which has both radio parts and the M0+ in a tiny package.

It has up to 32K of RAM and 256K of flash [2], the larger Cortex chips have the big RAM numbers as you note.

[1] http://design.avnet.com/axiom/atmel-sam-r21-atmel-cortex-m0-...

[2] http://www.atmel.com/Images/Atmel-42223-SAM-R21_Datasheet.pd...

Re:ARMing a Breadboard – Everyone Should Program an ARM by CamperBob2 on Saturday October 10, 2015 @11:40PM (#10367943)
I agree with this take on it. I either find myself using an Arduino or other cheesy AVR board, or a "serious" FPGA platform. There never seems to be much demand around here for mid-grade controllers or SoCs. If I can't get the job done with an Atmega256, I'll drag out the heavy artillery.
Re:ARMing a Breadboard – Everyone Should Program an ARM by vvanders on Saturday October 10, 2015 @11:43AM (#10365847)
Avr devtools are also fantastic since they licensed the Visual Studio shell.
Re:ARMing a Breadboard – Everyone Should Program an ARM by Sanddancer on Saturday October 10, 2015 @12:54PM (#10366088)
Very much yes, if for no other reason than their automagic conversion of . to -> as needed for classes. It's a tiny thing, but when you're dereferencing a lot of classes, needing to hit one convenient button is nicer than three.
Re:ARMing a Breadboard – Everyone Should Program an ARM by TD-Linux on Saturday October 10, 2015 @05:51PM (#10367135)
One of the reasons that 8-bit AVRs are still popular is that the architecture was specially designed for C - compared to many other popular 8-bit microcontrollers, it has a C-style stack, lots of registers, and low latency for most instructions. The 8-bit PICs are much less amenable to C compilers.

I also use the ST micros for most of my projects, but the AVR is also a great device with a well supported toolchain - I think it's generally easier for most beginners due to easy to use peripherals and simpler clock trees than the ST chips, while still being production-ready.

Re:ARMing a Breadboard – Everyone Should Program an ARM by Sanddancer on Saturday October 10, 2015 @12:53PM (#10366080)
For your i2c issue, the translation circuit is just a couple MOSFETs and ensuring both sides of the converter have their pull-ups.[1] Bit annoying when you're dealing with the circuit, but there are worse problems to be had.

[1] http://playground.arduino.cc/Main/I2CBi-directionalLevelShif...

Re:ARMing a Breadboard – Everyone Should Program an ARM by ChuckMcM on Saturday October 10, 2015 @01:03PM (#10366106)
That it a good solution, and in the case of the ST Micro chips the i2c lines can be pulled to 5V without issue, but in terms of compatibility Arduino shields which use i2c rarely pull them to 5V with weak pullups, expecting you to do that with the chip instead.
Re:ARMing a Breadboard – Everyone Should Program an ARM by jwatte on Saturday October 10, 2015 @06:39PM (#10367269)
The documentation and ease of use of Atmel peripherals, and the electrical robustness of the chips, is something I like. Don't need an ARM to blink some LEDs when a sensor triggers. For ARM, I like both the OpenCM 9.04 ($9 board) and teensy 3 ($19 board.) Both of them can take 100 mil headers and be breadboarded if needed.
Re:ARMing a Breadboard – Everyone Should Program an ARM by the-dude on Saturday October 10, 2015 @11:37AM (#10365828)
With a development board: yes. But if you want to do hack something on a breadboard or make your own PCB it is really convenient to have THD ( through hole device ).

The ARM used in the article is the only TDH available AFAIK.

Re:ARMing a Breadboard – Everyone Should Program an ARM by sokoloff on Saturday October 10, 2015 @12:15PM (#10365947)
Breadboard, yes, but if you're making your own PCB, I'd argue that SMD for the micro is easier (not to include BGA, but everything with perimeter pins, I think SMD is easier, even for the home hobbyist).

For SMD-only parts, there are SMD to DIP adapters readily available to let you use them on breadboards; for relatively low-frequency digital work, there's no problem using them, so being available in through-hole isn't a practical advantage.

Re:ARMing a Breadboard – Everyone Should Program an ARM by ChuckMcM on Saturday October 10, 2015 @12:40PM (#10366024)
And the "winner" is something like the Teensy which is an SMD part but its mounted on a board that gives it pins like a DIP chip.
Re:ARMing a Breadboard – Everyone Should Program an ARM by Sanddancer on Saturday October 10, 2015 @12:42PM (#10366033)
NXP makes a smaller LPC that's also PTH, the LPC810. It's only 8 pins, but it looks a lot sexier for certain designs than the ol' standby ATtiny85, because it's got things like built-in i2c.

Oh, and with a mild amount of bravery, soldering SMD components isn't that difficult. A cheap toaster oven that you know damn well will never ever ever be used for making food again can do a decent enough job of doing the reflow for you.

Re:ARMing a Breadboard – Everyone Should Program an ARM by userbinator on Saturday October 10, 2015 @12:45PM (#10366047)
My go-to for applications that don't need more than an 8-bit MCU is PIC and 8051. Quirky architectures, but they're also cheaper in large quantities.
Re:ARMing a Breadboard – Everyone Should Program an ARM by kjs3 on Saturday October 10, 2015 @01:15PM (#10366149)
I use 8051 for anything I do 8-bit as well. There are an almost infinite variety of speed/memory/peripheral combos available, still comes in hobby-friendly packages, and vast libraries of code and solid dev tools.

Never could stomach PIC. 8051 is 'quirky'; PIC is 'wtf?'. YMMV.