Learning Microchip's New AVR Lineup vs PIC vs ARM??

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

Hey folks. Big fan of older AVRs. ATmega, ATtiny, etc. Have many tutorials on my website that use these devices.

 

Here's the deal. I have a project that requires a microcontroller in SOIC package that support I2C and SPI independently. Knowing that the classic ATtiny wouldn't meet my needs, curious me decided to take a look on DigiKey to see if there's anything I missed. "Whoah, cool, a new AVR microcontroller line-up... ATiny416/816/1616". Read a few pages into the datasheet... pinout looks different (to be expected with a new Manufacturer and all), but it looks like I2C and SPI use unique pins - perfect!

 

Then I started to read more into the datasheet. Had a minor panic attack. Everything is different! I know, old news for all of you, but totally new realization for me. Even the venerable AVRISP mk2 is no long supported. Seems like Atmel Studio 7 is still used though... for now.

 

Let me get to my point. I'm all about change, but I would like to be strategic in what I invest my time learning. Do you see value in learning this new lineup, or is Microchip just going to change the formula again down the road? Should I abandon ship and just learn PICs? Or should I go for something totally different like ARM? I know this is a tough, and loaded question, but looking for your opinion on what is the most "future-proof" in the evolving microcontroller-scene.

 

Thanks for your feedback.

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

I’d say the answer is arm. The learning curve isn’t so much with the arm core but more with the peripherals. Each manufacturer does things differently.

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

quantic wrote:
Do you see value in learning this new lineup, ...
Yes

quantic wrote:
... or is Microchip just going to change the formula again down the road?
Yes

http://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs

quantic wrote:
Should I abandon ship and just learn PICs?
Learn both as both are solutions to problems (compute-bound, memory-bound, I/O-bound, power-bound)

quantic wrote:
... on what is the most "future-proof" in the evolving microcontroller-scene.
If one could only ask Carnac the Magnificent.

YouTube

Carnac the Magnificent

TheOfficialCarson

Published on Dec 17, 2010

https://www.youtube.com/watch?v=9m_dT0wsrGI (1m38s)

 

Edit: power

 

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

Last Edited: Thu. Nov 2, 2017 - 10:32 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

quantic wrote:

...looking for your opinion on what is the most "future-proof" in the evolving microcontroller-scene.

 

The most reliable way to future-proof yourself is to learn to be 'processor agnostic'.

 

 

Quote:

agnostic

[ag-nos-tik] 

 

noun

...

adjective

...

7.(especially of digital technology) not limited or dedicated to a particular device, system, etc. (often used in combination):

platform agnostic software.

 

'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

It might be that MPLAB will eventually support AVRs properly, but when I tried it out a few months ago it was essentially not working. Morten of Atmel /Microchip said it was not to be in the near future.

In general, ARM seems to be the future.

"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

If you have previous experience of "old style" tiny/mega then why not stick with those? Mega48/88/168p range for example. Or if you really want "less pins" then maybe some of the more "loaded" tiny's like 2313 or 1634?

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

quantic wrote:

...a microcontroller in SOIC package that support I2C and SPI independently.

 

When you say 'independently' what exactly do you mean?

 

1) I2C...master or slave?

2) I2C...constantly being read or only at start up? If constantly, how often?

3) SPI...master or slave?

4) SPI...constantly being read or only at start up? If constantly, how often?

 

 

I have had both I2C and SPI devices on the same wires. SPI devices have a /CS line so you may as well use it, in which case they ignore other line activity. I2C can be a bit trickier depending on what devices they are.

'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

As a general rule, Tinys are Slaves. e.g. TWIS or USI.
Megas can be Master or Slave.
.
With all device decisions you first have to specify your project requirements.
As soon as you look at Brian's reply in #7, everything becomes clearer.
.
SOIC is easy to solder by hand. But other packages are both smaller and suitable for machine soldering.
.
David.

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

Brian Fairchild wrote:
The most reliable way to future-proof yourself is to learn to be 'processor agnostic'.

 

Absolutely!

 

Seriously: 98% of the job is generic - reading & understanding datasheets,  reading from registers, writing to registers, handling interrupts, manipulating data.

 

Once you understand those principles, they are easily transferable to any architecture.

 

The trouble seems to be that people really don't understand principles - they just copy recipes.

 

frown

 

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

david.prentice wrote:
With all device decisions you first have to specify your project requirements.

+9999999999999999999999999999999999999999999999999999999999999999999999999999999999999

 

Here we go again:

 

Design First

 

Device Choice & Code later.

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

 I have a project that requires a microcontroller in SOIC package that support I2C and SPI independently.

I guess, in addition to the above comments, I'd ask:

 

Building 1, or 1 million?

 

If you are only building a few boards, then who really cares about a few dollars difference in micro's price, or having a few "spare" / "too many" pins.

 

You could select a $2 - $3 Arduino Nano type board, with a Mega328, power supply, reset switch, LED, USB interface, and I/O pin breakout; that has both SPI and I2C on separate pins, and be working on your first cut prototype!

 

(I2C is on PortC.4 and PortC.5 pins, SPI is on PortB.2,3,4 and 5 pins).

 

Easy decision.

 

JC

 

 

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

Thanks, great feedback so far. Not looking to mass produce anything, so price isn't a factor. I work more in the 'proof of concept' phase which requires hand soldering components, so QFPs and QFNs are too difficult for me (perhaps one day). SOIC seems to be a really nice package to work with, but I can only find the older ATtiny's in SOIC.

 

clawson wrote:
If you have previous experience of "old style" tiny/mega then why not stick with those? Mega48/88/168p range for example. Or if you really want "less pins" then maybe some of the more "loaded" tiny's like 2313 or 1634?

 

I'd like to stick with my trusty ATmega168, but the SMD offerings are just too limited (just QFN and QFP).

 

JohanEkdahl wrote:
It might be that MPLAB will eventually support AVRs properly, but when I tried it out a few months ago it was essentially not working. Morten of Atmel /Microchip said it was not to be in the near future. In general, ARM seems to be the future.

 

That's interesting to hear. I figure at some point Microchip will discontinue support of Atmel Studio in favor of MPLAB.

 

Brian Fairchild wrote:

quantic wrote:

...a microcontroller in SOIC package that support I2C and SPI independently.

 

When you say 'independently' what exactly do you mean?

 

1) I2C...master or slave?

2) I2C...constantly being read or only at start up? If constantly, how often?

3) SPI...master or slave?

4) SPI...constantly being read or only at start up? If constantly, how often?

 

 

I have had both I2C and SPI devices on the same wires. SPI devices have a /CS line so you may as well use it, in which case they ignore other line activity. I2C can be a bit trickier depending on what devices they are.

 

The plan is to have a microcontroller serve as an I2C slave to a Raspberry Pi while also interfacing to with a SPI device. The Raspberry Pi has built-in pull-ups on SDA and SCL, so while switching between I2C and SPI master is possible with some interface circuitry, I think it's cleaner to find a chip that supports both on dedicated pins.

 

Kartman wrote:
I’d say the answer is arm. The learning curve isn’t so much with the arm core but more with the peripherals. Each manufacturer does things differently.

 

ARM sounds interesting. I don't have any experience with these, but I'll definitely something I can look into!

 

 

 

 

 

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

SOIC seems to be a really nice package to work with

There are certainly lots of different naming schemes...

 

Mega328's come in TQFP, which is still a "gull wing" chip, I think.

If you can solder the SOIC, then I think soldering a TQFP would be essentially the same.

(I've not looked at the tech spec's, and pin spacings, etc...).

 

I agree, VQFN and MLF have the tiny contacts on the edge of the chip without any external leads are both intimidating and challenging.

I've soldered a few of those, and I swear at myself for designing that chip into the system every time, but I've never had a failure on the ones I did solder.

Flux and practice, and a good magnifier, are the keys to success in this regard.

 

I've never attempted to assemble a board with ball grid, (UFBGA), chips.

I suspect that doing so won't happen in this life time.

 

There are numerous prior Threads on soldering.

I recall my hesitancy, (fear!), of switching from years of through hole component designs and board builds to surface mount.

I now prefer the surface mount design, and only occasionally do an "old school" through hole design, primarily to use up some old components.

 

Make the transition!

 

JC 

Last Edited: Thu. Nov 2, 2017 - 09:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

quantic wrote:
SOIC seems to be a really nice package to work with, ...
More than several PIC, PIC24, dsPIC, and some PIC32 are in SOIC.

quantic wrote:
I figure at some point Microchip will discontinue support of Atmel Studio in favor of MPLAB.
Then third parties will run with that as Microsoft Visual Studio is a juggernaut.

 


https://visualgdb.com/tutorials/avr/

http://www.avrfreaks.net/forum/platformio-do-or-do-not-thats-question#comment-2267111

Linear Technology

Setting up Linduino, Visual Micro, & Atmel-ICE for Hardware Debugging

Dan Eddleman - Senior Applications Engineer
Malavika Sajikumar - Firmware Engineer

Jan 10th 2017

http://www.linear.com/solutions/7718

Introduction

The Linduino is Linear Technology’s Arduino compatible system for distributing firmware libraries and example code to customers of Linear Technology’s integrated circuits. The design is based on the Arduino Uno, using the Atmel ATmega328 processor, while adding a 14-pin QuikEval™ connector that can be plugged into nearly 100 daughter boards. ...

...

Visual Studio

Marketplace

Visual Studio Code > Debuggers > Native Debug

https://marketplace.visualstudio.com/items?itemName=webfreak.debug

GDB, LLDB & Mago-MI Debugger support for VSCode

...

 

https://marketplace.visualstudio.com/items?itemName=webfreak.debug#review-details

...

 

Federico Zuccardi Merli

9/4/2016

I'm using this for embedded debugging, through OpenOCD and other gdb servers.

...

 

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

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

DocJC wrote:

SOIC seems to be a really nice package to work with

There are certainly lots of different naming schemes...

 

Mega328's come in TQFP, which is still a "gull wing" chip, I think.

If you can solder the SOIC, then I think soldering a TQFP would be essentially the same.

(I've not looked at the tech spec's, and pin spacings, etc...).

 

I agree, VQFN and MLF have the tiny contacts on the edge of the chip without any external leads are both intimidating and challenging.

I've soldered a few of those, and I swear at myself for designing that chip into the system every time, but I've never had a failure on the ones I did solder.

Flux and practice, and a good magnifier, are the keys to success in this regard.

 

I've never attempted to assemble a board with ball grid, (UFBGA), chips.

I suspect that doing so won't happen in this life time.

 

There are numerous prior Threads on soldering.

I recall my hesitancy, (fear!), of switching from years of through hole component designs and board builds to surface mount.

I now prefer the surface mount design, and only occasionally do an "old school" through hole design, primarily to use up some old components.

 

Make the transition!

 

JC 

 

You know, perhaps you're right, maybe I should learn to solder QFPs. Would open the DOORS to many other microcontrollers options. I have some QFP to DIP adapters from Adafruit, so could learn on those. Thanks for the moral support.

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

quantic wrote:

You know, perhaps you're right, maybe I should learn to solder QFPs. Would open the DOORS to many other microcontrollers options. I have some QFP to DIP adapters from Adafruit, so could learn on those. Thanks for the moral support.

 

If you can do SOIC then you can do 0.8mm QFP. Even 0.5mm QFP isn't too bad.

 

For one-offs Schmartboards are well worth the money.

'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

quantic wrote:
I have some QFP to DIP adapters from Adafruit, so could learn on those.
ELM by ChaN's method has no adapters (QFP on kapton tape)

50mil pitch SMT protoboard is easy to work.

 

ELM

Extreme Wiring on the Prototyping Board

Update: December 16, 2014

http://elm-chan.org/docs/wire/wiring_e.html

http://www.busboard.com/surfacemountpcbs

 

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

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

I suggest learning the Arduino system.  This is an integrated microcontroller development system based on the AVR mega328p, mega32u4, and the mega2560.  It is a combination of standardized libraries that handle common microcontroller operations coupled with C (or C++) code.   The development boards (the UNO, Nano, Leo, and Mega) are mass-produced and cheap; about $2.80 US for a Nano with a bootloader and USB interface IC on it.

 

The libraries are standard across different CPU families so the code that compiles for the AVR-based Nano model with compile (with little or no change) on the ARM-based Due model.  The libraries are abstract enough to be useful across hardware platforms.  For example, the Wire library that handles I2C (TWI in AVRland) has :

    begin()                      You are Master or Slave
    requestFrom()           You are the Master
    beginTransmission()  You are Master
    endTransmission()     You are Master
    write()
    available()
    read()
    SetClock()
    onReceive()             You are a Slave Device
    onRequest()            You are a Slave Device

 

Arduino started as an Italian teaching tool and became a world-wide standard because the world needed a microcontroller standard and the chip companies weren't providing one.

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

quantic wrote:
You know, perhaps you're right, maybe I should learn to solder QFPs. Would open the DOORS to many other microcontrollers options. I have some QFP to DIP adapters from Adafruit, so could learn on those. Thanks for the moral support.

 

That's the right decision. You'll see it's much easier than you think, actually it's faster than soldering a DIP, because you just drag the solder across the pins, check for solder bridges, correct them and that's it. The most important tool is a good quality flux. But since you already know how to solder SOIC, it's the same, just with smaller pitch (as mentioned in #13).

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

Here is one soldering Thread, in my first post on the Thread I note my first attempt was not a great success.

By Post #18 I added a few photos to show success.

As this link is to the old Forum, the photos aren't visible within the post, you have to click on them to see them.

 

Give it a try, you won't be disappointed.

 

JC

 

And a shot of the frying pan method (post #13) for when I didn't want to solder each connection by hand.

Again, have to click on the photos to see the images.

 

Last Edited: Thu. Nov 2, 2017 - 10:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would like to be strategic in what I invest my time learning. Do you see value in learning this new lineup

 Avoiding Architecture and Vendor Wars entirely, I think I'd say the peripherals on ATtiny814/etc are somewhat typical of the more complex peripherals that ALL microcontroller vendors are putting on ALL of their chips these days, and therefore time spent puzzling out how the peripherals work is likely to be "valuable practice" regardless of final chip decisions.  Perhaps the "usefully familiar" CPU architecture would be helpful.

 

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

DocJC wrote:

And a shot of the frying pan method (post #13) for when I didn't want to solder each connection by hand.

There is a link directly to the post in the top right corner of each post.

Post link in top right corner