What's your "GO TO" compact AVR?

Go To Last Post
35 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First of all: Hi Everyone, I've been a lurker for a while, but I thought it was time to join this board. Nice to meet you all ...

 

On to my question: I've been recently working on a compact PCB which featured an ATTiny85. I choose this particular mcu because it's compact, cheap, hand solderable (SOIC package) but most importantly: it doesn't need a lot (almost none) of external components and complex schematics. Unfortunately I ran into it's limitations regarding the memory. Both the Program Memory as well as the RAM turned out to be a bit to limited for my needs.

 

So I was wondering, what is your "go to" compact MCU for simple, compact prototyping projects (working with OLEDs, sensors, simple IO, etc ...)? The ATTiny is already over 10 years old, So I could imagine there is already a better alternative. 

 

I must admit that I mostly know the Atmel and ESP families, but maybe there is a much better alternative. (I'm already looking into the STM32 series.)

 

Any suggestion is welcome! Cheers.

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

I don't see the problem. You can prototype with a mega328P. XMINI-328P, UNO, NANO, Pro Mini, ...
Any final device can use TQFP for hand soldering. MLF for machine assembly.
.
If the final design will "fit" into a Tiny1634, Tiny85, ... goforit.
.
For breadboarding purposes you can always put SMD onto a DIL adapter. Yes, there are one or two hardware features on a tiny85 that are not present on the Mega328.
.
Oh, there are BluePill, BlackPill, ... for an STM32F103. There are newer and better STM32. There does not seem to be much of a market for $3 SAM Pill boards. But be realistic. A $10 board that does exactly what you want is more useful than a $3 one with limitations.
.
David.

Last Edited: Fri. May 19, 2017 - 12:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi David, thanks for your response! I was just wondering if there were any IC's that fit my description. I know most of the ATTiny's, I know a few ATMega's, and I've just learned about the STM32 controllers. Maybe there are some new IC's that I'm not aware of that would give me a little more speed and memory in a simple and cheap package. (Is seems the STM32 is a good example, although it seems it needs a lot of passives compared to an ATTiny). 

 

Someday someone will probably tell me: "Are you still using the ATTiny85? Why don't you use an ATFooBar99!?", I just want to beat that to the punch ... ;)

 

Just for the record: I'm not a professional looking to mass produce an consumer product. I'm just an enthusiastic maker that enjoys developing his own PCB's. Hope that's ok. 

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

I would stick to the "popular" devices. e.g. mega328P or STM32F103
.
Just learn how to do almost everything on the popular chip.
If and when you have a project that does not seem to be possible, ask here.
.
Yes, there will always be an alternative chip. Is it worth the learning curve?
.
David.

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

What does "compact" really mean? Are you talking about physical package size? Obviously if you could handle BGA assembly you could get some fantastically complex silicon in a very small physical package. 

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

 

 

I was just wondering if there were any IC's that fit my description.

???  What AVR models do >>not<< fit your general description?

You pick the model to fit the application.  IME it generally starts with pin count.  I have production apps that use a few pins, and ones that use the centipede TQFP100.

If "one-size-fit-all" ( or just a few sizes) then there would be no need for hundreds of AVR8 models and thousands of flavours.  Not to mention brain-dead and Xmega and ...

 

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

I find I use Tiny10 a lot. A whole computer in a SOT-23.

274,207,281-1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

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

If that is the kind of answer you're looking for: I love the Xmega32e5, it's cheap and powerful. If I need more pins I go to the Xmega32a4u. If that still isn't enough then there is the a3u. For most prototyping I use my own breakout board with an xmega128a3u.

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

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

I am sure that the Tiny10 might suit certain projects.
.
It would not be wise choice for development. I would choose the biggest and best endowed of a family.
If the debugged project can fit in less pins, less memory, less price, rebuild for the most suitable target.
.
This strategy suggests mega2560, xmega128A1U, xmega384C3 ... which might seem overkill.   (corrected part numbers thanks gchapman)
The sheer availabilty of cheap 328P hardware suggests using it whenever possible.
Mega324, 644, 1284 have JTAG compared to 328P debugWIRE.
Clearly the 100-pin project is known at the outset.
.
David.

Last Edited: Fri. May 19, 2017 - 09:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I use a lot of ATmega328P's in the DIP package.  They are cheap and have plenty of flash.  If I am feeling lazy I use a cheap Chinese Nano that has USB and a 6-pin header for programming and debugging in a package not much bigger that a 28 pin DIP and at a cost less than a bare 28 pin ATmega328P.

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

 

Torby wrote:

I find I use Tiny10 a lot. A whole computer in a SOT-23.

 

Very impressive! :)

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

Nice! Thank you for your info!

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

MichMich wrote:
The ATTiny is already over 10 years old, So I could imagine there is already a better alternative.
The tinyAVR 1-series.

The 16KB tiny 1-series in narrow SOIC-14 is a recent arrival at microchipDIRECT.

MichMich wrote:
I must admit that I mostly know the Atmel and ESP families, but maybe there is a much better alternative.
If want to stay AVR then XMEGA as mentioned but an upgrade from AVR is to ARM Cortex-M0+ in SAM D or SAM L.

An alternative to SAM L is PIC32MM especially since it comes in SOIC and up to 64KB flash and 8KB RAM.

There's MIPS GCC for PIC32 though might be some effort to get it up to PIC32MM as that's recent to Microchip's portfolio; if enough flash and RAM then the zero price version of XC32 might work.

 


http://www.avrfreaks.net/forum/attiny417-attiny814-attiny816-attiny817

https://www.microchipdirect.com/ProductDetails.aspx?Category=ATTINY1614

http://www.microchip.com/design-centers/32-bit/sam-32-bit-mcus/sam-d-mcus

http://www.microchip.com/design-centers/32-bit/sam-32-bit-mcus/sam-l-mcus

http://www.microchip.com/design-centers/32-bit/architecture/pic32mm-family

http://platformio.org/platforms/microchippic32

http://www.microchip.com/mplab/compilers

 

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

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

david.prentice wrote:
A $10 board that does exactly what you want is more useful than a $3 one with limitations.
About double the 10USD for this ARM Cortex-M0+ Microchip third party board :

MattairTech LLC

MattairTech

MT-D21E Microchip / Atmel SAM D21E / L21E / C21E ARM Cortex M0+ USB development board

https://www.mattairtech.com/index.php/development-boards/mt-d21e.html

 


http://www.ebay.com/itm/MT-D21E-Microchip-Atmel-D21E-L21E-C21E-ARM-Cortex-M0-Arduino-Development-/131296219501

 

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

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

Very valuable information. Thank you gchapman!

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

Torby wrote:
I find I use Tiny10 a lot. A whole computer in a SOT-23.
Likewise for the follow-on to tiny10 in tiny102 and tiny104 though not in SOT-23 (DFN, narrow SOIC)

AVR GCC has undergone improvements for the reduced core AVR (tiny10, tiny102, tiny104, etc)

 

http://www.avrfreaks.net/forum/new-chips-attiny102-attiny104

https://gcc.gnu.org/gcc-7/changes.html

 

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

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

david.prentice wrote:
xmega384A1U
XMEGA128A1U or XMEGA384C3

 

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

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

I recommend the Arduino Nano clones on eBay with the Mega328P CPU.  Here's a listing:

http://www.ebay.com/itm/2PCS-Mic...

 

These are selling for less than $3 each with a PCB, a USBserial interface IC and connector, a crystal, a reset switch, bypass caps, LEDs, and an LDO voltage regulator.  All assembled, pre-tested,  loaded with a quality bootload program, and supported by a maintained free-downloadable-and-documented IDE development system.  32K Flash for programs, 2 K SRAM, 1K EEPROM

 

I believe that they would be the next step up from a Tiny85.  The small boards are stackable using Arduino header pin-connectors with 0.1" spacing.

They can be plugged into a 0.1" sea-of-holes blank electronics prototyping/development board.

 

One side of the Nano has 0.1 pins for an 8x1 row connector plug with the pin-out:  A3_A4(SDA)_A5(SCL)_A6_A7_GND_Reset_Vcc. This roughly resembles the pins available on the Tiny85, but with built-in I2C (called TWI here) routines.  Add another 8-pin socket for SPI high-speed interfacing to a TFT screen and pin-change interrupt pins (and physical stablility).

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

Often, the tiny 10 doesn't have enough pins. I usually reach for an xMega E5 part then.

 

Having fun with Arduinos lately. Arduini? For a couple bucks you get the avr, regulator, ceramic resonator, usb connector all ready to use.

274,207,281-1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

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

I've been really doubting the "importance" of the small pin count chips recently.  Sure, an 8 or 14 pin SOIC is easier to solder than a 32pin QFN like an ATmega8/88/168/328, but if I'm really aiming for "compact" modern packaging ought to be something I learn to deal with.  And it's NOT much larger, and it DOES have a lot more flexibility of peripherals, memory sizes, and etc...

 

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

MichMich wrote:
The ATTiny is already over 10 years old, So I could imagine there is already a better alternative. 

Well, yes.  Probably close to 20.  Maybe even a bit longer.  Say 20 years old.

 

But so is >>any<< AVR model series.  I suppose you could say the Xmega is half that.  And the brain-dead series.  And the 'PBs and PB-like Tinys.

 

I reiterate the whole purpose of the snipe hunt.  Why ask about Atmel (no longer exists) AVR (at least 20 years old) models, and ask for a recommendation?  If we are farming, do you couch the tractor question the same way?  My favourite that I'd make a fan-boy recommendation for can only draw a one-bottom plow.  What good is that to you if you have 80 acre chunks of bottom land to work?

 

-- If you are concerned with "age", then why are you considering AVR8?

-- If you are concerned with quick-prototyping, then what difference does it make?  Pick [as mentioned] a ready-made dev board like an Arduino flavour.  If overkill, who cares?  For a one-off if you save that hour or more of dev it more than pays for the platform.

-- If you are designing for nnn production run, then what difference does go-to or favourite make?  Again, none:  you pick the AVR series with the needed peripheral set, and the model with the needed memory space.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

I started long ago with a 16F84 (probably first flash programmable uC ever?)

Didn't like assembly, especially with that limited instruction set.

Switched to at90s2313 as soon as I discovered that it came with GCC (Wonderful people over there).

When experience & program size grew, switched to a Mega8 (Of which I still have 30 or so).

Sometimes I use another of the Mega series if it has peripherals / memory I need for a project

they are pretty much arbitrarily exchangable. (compiler, programming, etc).

 

I have NEVER used any of the tiny series.

Main reason is that a lot of the peripherals work a lot different (universal serial interface, etc).

It is just not worth the effort to rewrite my libraries for a different chip to save a few pennies on the hardware side.

 

When playing with some graphical TFT lcd's I quickly decided that the AVR Mega series just does not have the beef to drive them properly.

So it was time to grow again a bit.

Looked a bit at the Xmega's, but they were so different from the Mega's that it almost seemed like a complete new architecture.

Then I noticed the STM32F103C8T6 and they seem wonderful, even though I only made a blinking led on them, now more than a year ago.

But they seem to have plenty of beef even though they are near the bottom of their family.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

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

Paulvdh wrote:
Switched to at90s2313 as soon as I discovered that it came with GCC
Paulvdh wrote:
noticed the STM32F103C8T6 and they seem wonderful

Which compiler "comes with" the STM32?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Many compilers support the STM32.   e.g. GCC, KEIL, IAR, ...

 

There are many IDEs that will use the GCC tools.   Some require paid licences but generally provide Evaluation versions.

The commercial IDEs will work well but their Evaluation / Demo versions are often size or feature limited.

 

ST provide their own version of Eclipse that uses GCC tools which is a bit painful.   I am sure that it will get there in the end.

 

Manufacturers supply the relevant header files for their devices.

The Compilers will all use the standard device headers.

 

It is just as straightforward to use KEIL or Rowley(GCC) to build SAM projects or STM32 projects or ARM devices from any manufacturer.

 

When a Manufacturer produces its "own version of Eclipse",  it tends to only allow its own devices.

Much like AS7 only supports Atmel devices.

 

However hard ARM tries to make its technology accessible to Users,  the chip Manufacturers try to "lock you in" to their products.

 

Oh,  and if you start with MBED or Arduino,   you don't need to know that much about the low level hardware.    MBED uses an online ARM compiler but can export to local IDEs.

Arduino builds for SAM3X (Due), SAMD21 (Zero),  STM32 (stm32duino) with GCC Tools.

 

David.

Last Edited: Sat. May 20, 2017 - 02:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
Many compilers support the STM32.   e.g. GCC, KEIL, IAR, ...

I don't doubt that.  I was asking about the "come with".  I've been involved in many many AVR8 purchases over the years, and a good number involving the models that paul mentioned.  I never got a batch that "came with" a compiler.

 

david.prentice wrote:
ST provide their own version of Eclipse that uses GCC tools which is a bit painful.  
 

So that is the one that "comes with" the chip purchase?

 

Even after all these years, I get confused.  No matter anyway, as Atmel is no more.  For a dozen or so years after this site started, Atmel respondents hear as well as other missives from Atmel insisted that Atmel had no "preferred" compiler brand.  Yet certain libraries and similar were only provided in binary form, and only for a couple selected compiler brands.

 

There was an overlap in time where the "no preferred brand" kept repeating, and there was integration of GCC into AVRstudio.

 

Is that the "came with"?  But the '2313 has been around since day 1 or 2 of AVR.  Preceding GCC, right?

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

If I buy an AVR chip from Farnell,   it does not "come with" any Compiler.

 

Traditionally,   Atmel worked with IAR.   A lot of the early App Notes were written for IAR.   You had to buy IAR.

I don't think that AS3 or AS4 ever built IAR programs.   But they would accept some IAR built executables for simulation/ debugging.

 

All versions of Atmel Studio have had the "Atmel AVR Assembler"

 

As far as I can remember,  AS4 used GCC tools from WinAVR but it came with nothing.  Later,   AS4 had GCC Tools from their own "toolchain"

AS5, AS6, AS7 have all used GCC tools.   All of these installations "came with" GCC tools.

 

ST used to have an arrangement with "Cosmic" I think.    This went bad,  and hence they have been creating their own ARM IDE that is free and unlimited for all STM32.

ST also provides a free and unlimited licence for KEIL but only for Cortex-M0.    And the clever trick is: "use ST Cortex-M0" licence and cripple the regular Evaluation licence that works with other makes.

 

In an ideal world,   IDE and Tool Vendors would sell their programs for a reasonable price.    And I as a hobbyist would be quite happy to pay a reasonable price.

Someone has to pay the wages if Tool Vendors are going to stay in business.   e.g. with paid licences and a certain amount of Manufacturer subsidy.

If I was professionally employed,   the cost of Tools is not so important.

 

David.

Last Edited: Sat. May 20, 2017 - 03:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tiny2313, because I have a very bad habit of designing elaborate boards with an 8-bit-wide parallel bus for all the even older chips therein, and in the 2313 you can have rs-232 AND an unmolested 8-bit-wide port (B).  Even some larger chips (eg. 168) don't have an unmolested bus (yes, the tiny2313 has some alternative functions on PORTB, but I rarely need them).  Also still a fan of the jolly old DIP sockets, because I am an old cat and my paws shake.

 

For lots of I/O pins I go with the 8535s (and 8515s(!!)), even though they are ancient.  I have lots of PLCC44 sockets (including some ZIF ones!) and one of the beauties there is that I don't have to put programming hardware on the board - I can program them separately, and then just move them over.  Try THAT with a SOIC or a BGA (yes, there are SOIC sockets.  They're fantastically expensive).

 

I do have an application in mind for an 8-pin AVR, but I am still worried that the programming hardware is going to interfere with the handful of other SPI devices (eeprom, RTC) on the board, so I'll either have to program it separately or just say heck with it and use a 2313, because on that chip the pin functions are on different pins.

 

S.

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

Scroungre wrote:
I do have an application in mind for an 8-pin AVR, but I am still worried that the programming hardware is going to interfere with the handful of other SPI devices (eeprom, RTC) on the board, so I'll either have to program it separately or just say heck with it and use a 2313, because on that chip the pin functions are on different pins.
Programming is down to one wire on tinyAVR 1-series (UPDI)

UPDI is shared with PA0; if that's acceptable then a tinyAVR 1-series in wide SOIC will have a complete 8-bit port with the one SPI on port A or port C.

If that's not acceptable then it's in QFN-24 hot air soldered onto a QFN DIP adapter; need just enough dexterity to bump align the QFN on the adapter before soldering.

Proto Advantage

Proto Advantage

QFN-24-THIN to DIP-24 SMT Adapter (0.5 mm pitch, 4 x 4 mm body)

http://www.proto-advantage.com/store/product_info.php?products_id=2200068

(in the Assembly pull-down menu, Pins and IC Assembled)

...

Chip Procurement

...

Likewise for SOIC.

 

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

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

gchapman wrote:

Programming is down to one wire on tinyAVR 1-series (UPDI)

Not sure if I have a programmer that will do that.  I have ISP MkII (USB) and Atmel-ICE.  (And don't you still need /RESET and power? I will go look that up)

 

Furthermore, if I'm going to use a DIP adapter, why not start with a DIP chip in the first place?

 

Thanks anyhow for the ideas.  Sooner or later I'm going to have to join the 21st century, but not today.  S.

 

PS - That DIP adapter is hideously wide.  DIP chips are only 0.3" wide, that adapter is 0.7".  Yikes!

Edited to add postscript

 

Last Edited: Sat. May 20, 2017 - 06:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Scroungre wrote:
Not sure if I have a programmer that will do that [UPDI].  I have ISP MkII (USB) and Atmel-ICE.  (And don't you still need /RESET and power?
Yes for power; /RESET is shared with UPDI.

Atmel-ICE is UPDI capable though will need Atmel Studio 7 and a recent tinyAVR device pack file.

Scroungre wrote:
Furthermore, if I'm going to use a DIP adapter, why not start with a DIP chip in the first place?
Indeed though AVR are limited in DIP; that's not the case for PIC.

 


Atmel-ICE

Connecting to a UPDI Target

http://www.atmel.com/webdoc/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B/index.html?GUID-4D88049D-94FD-427B-8C9B-FF741FEA685B

Atmel Packs

ATtiny

http://packs.download.atmel.com/#collapse-Atmel-ATtiny-DFP-pdsc

 

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

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

What's your "GO TO" compact AVR?

Xmega32E5

 

That about sums it up!

 

JC 

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

gchapman wrote:

Scroungre wrote:
Not sure if I have a programmer that will do that [UPDI].  I have ISP MkII (USB) and Atmel-ICE.  (And don't you still need /RESET and power?
Yes for power; /RESET is shared with UPDI.

Atmel-ICE is UPDI capable though will need Atmel Studio 7 and a recent tinyAVR device pack file.

 

Ah.  I didn't know it would do that.  Tanks muchly.  Will have to try it someday.  S.

 

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

Switched to at90s2313 as soon as I discovered that it came with GCC

"Came with"?  What exactly is the history of avr-gcc WRT Atmel "officially"?  My impression is that in the at90s days, if you wanted avr-gcc you had to download winavr or similar separately, and it wasn't until AS5 that Atmel started to provide "one-stop shopping."

In that sense, ALL of the current ARM chips "come with" arm gcc as well...  (Now, I wasn't paying much attention in those days, since I was still regarding a 2k microcontroller as something that one programmed in assembler, and I wasn't actually programming them, either.)

 

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

Scroungre wrote:
PS - That DIP adapter is hideously wide.  DIP chips are only 0.3" wide, that adapter is 0.7".  Yikes!
Best I can find is 595mil wide.

There are QFN-to-DIP boards that are narrow enough where the QFN is next to the pin holes; not certain these are generic so one may be making a custom adapter.

Schmartboard, Inc.

Schmartboard

Schmartboard|ez .5mm Pitch, 12 and 24 Pin QFP/QFN to DIP Adapter (204-0015-01)

http://schmartboard.com/schmartboard-ez-5mm-pitch-12-and-24-pin-qfp-qfn-to-dip-adapter-204-0015-01/

Schmartboard QFN to DIP with breadboard picture

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

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

Hmm.  It seems to me that with surface-mounted pins (as the Proto had) and without the Schmartboard solder tech (long slots with solder in them) one might be able to get an adapter down to 0.3" wide.  Might.

 

'til then, I'll stick to using 0.3" wide DIP chips.

 

S.

 

PS:  To be fair, I once did build a giant rack of adapter boards, moving SMT SRAM onto DIP packages, partially because I wasn't entirely confident in the soldering and partially because that way I could fiddle the pinouts to make the [mother-]board layout gorgeous.  They were 0.6" wide and plugged into suitable sockets, nestled up right beside each other (nine per unit).  S.