Author Topic: Switching from AVR?  (Read 2418 times)

0 Members and 1 Guest are viewing this topic.

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: se
Switching from AVR?
« on: December 12, 2018, 07:55:23 am »
Hey all!
Sorry if this is the wrong forum for this question.

I’ve used Atmel’s AVR lineup for a while now both with Atmel studio, standalone gcc compiler and Arduino. I’m tired of the bulky Atmel studio and the lacking features of Arduino (Also the difficulty with custom hardware and customizing the functionality of the modules of the AVR)

It also feels like the old 8-bit AVR's are outdated, often having worse power specs than faster running µC. I’ve tried the newer Xmega lineup but I found the documentation lacking. Ever since Atmel was bought by Microchip it’s just gone downhill.

I’ve looked at the TI MCP430 family and STM32 (way over kill for my needs). I’m just looking for a versatile µC family that I can use for low power battery applications all the way to high performance applications all while not needing to relearn a whole lot.
 

Offline perieanuo

  • Frequent Contributor
  • **
  • Posts: 838
  • Country: fr
Switching from AVR?
« Reply #1 on: December 12, 2018, 08:41:05 am »
Hi,
Don't blame compilers, use eclipse and cut the rope if you dislike as.eclipse has specific branch for atmel.
Yhe two are fine, TI and stm.One of my ex companies choosed stm after thorough reflexion with dev department, me I just prefer TI.cost difference may decide here if some cts for each microcontroller matters.why I prefer T?TI generally never deceived  me in products (zero micros deceased for thousands of sold  boards, while for example PIC had high fail rate with same voltage regulators used to fabric 5/3v3).
For home project, the discussion may be different.
Regards,pierre


Envoyé de mon iPad en utilisant Tapatalk
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Switching from AVR?
« Reply #2 on: December 12, 2018, 01:22:27 pm »
.
« Last Edit: August 19, 2022, 02:05:23 pm by emece67 »
 

Offline malagas_on_fire

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: pt
  • Kernel Panic
    • Malagas Lair
Re: Switching from AVR?
« Reply #3 on: December 12, 2018, 02:14:21 pm »
For those who like the gvim /vim editor there are some plugins available that uses the instalation of arduino ide.

A makefile and simple editor might work for some.

https://collectiveidea.com/blog/archives/2017/04/05/arduino-programming-in-vim
If one can make knowledge flow than it will go from negative to positve , for real
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Switching from AVR?
« Reply #4 on: December 13, 2018, 03:50:03 am »
Quote
the difficulty with custom hardware and customizing the functionality of the modules of the AVR
If you think the AVR "modules" are complex and confusing, and the xMega documentation is lacking, and Atmel Studio is bloated, you'll probably really HATE most of the likely replacement candidates.  :-(
 
The following users thanked this post: JoeO, Kilrah

Online wraper

  • Supporter
  • ****
  • Posts: 16844
  • Country: lv
Re: Switching from AVR?
« Reply #5 on: December 13, 2018, 04:30:57 am »
You could try Silicon Labs EFM8. And if need something more powerful, their ARM MCUs using the same free IDE (Simplicity Studio).
 

Offline josip

  • Regular Contributor
  • *
  • Posts: 151
  • Country: hr
Re: Switching from AVR?
« Reply #6 on: December 13, 2018, 09:39:10 am »
There are many Cortex-M0+ devices from different companies, from 24 to 100 MHz, down to 1V supply voltage.
 

Offline nick_d

  • Regular Contributor
  • *
  • Posts: 120
Re: Switching from AVR?
« Reply #7 on: December 13, 2018, 11:02:14 am »
 The STM32 is definitely the go. ST takes a kind of a "kitchen sink" approach, i.e. throw in hundreds of hardware peripherals alongside the licensed ARM core, of which not more than 3 or 4 will ever be used in any particular design, which is slightly revolting from the purist's point of view, but sensible in an economic sense because the cost of the masks dominates everything including the cost of the extra wasted silicon... And stocking costs are also significant.

So choose an STM32, if you are a hobbyist get one on a PCB. I can recommend the 1bitsy, with the Black Magic Probe for programming it. Cheap and open source and leads to a good result, but there may be a learning curve to set up your tools, libraries and and development environment. Or if you want the closed source but easier one that supports the Arduino environment then the Teensy has worked for me.

AVR is obsolete. They were AWESOME in their day when Flash was a new thing and most micro's had a divide by 10 or so clock, and I did many commercial projects with them: display and printer controllers, data acquisition, etc. However, those days are gone. AVRs have traditionally been quite expensive, recently they've dropped their prices by more than half to compete with ARM (mainly STM32 I suspect) but they are still much less cost-effective. For truly cheap and slow controller applications, 8051s can be had for CENTS (I forget brand, can check if you need), for anything else it is crazy not to use a modern ARM microcontroller.

cheers, Nick
 

Online wraper

  • Supporter
  • ****
  • Posts: 16844
  • Country: lv
Re: Switching from AVR?
« Reply #8 on: December 13, 2018, 11:53:44 am »
For truly cheap and slow controller applications, 8051s can be had for CENTS (I forget brand, can check if you need), for anything else it is crazy not to use a modern ARM microcontroller.
1t 8051 is faster than AVR. Also for fast response to events 8 bitters can be faster than ARM if no heavy calculations are used.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Switching from AVR?
« Reply #9 on: December 13, 2018, 12:27:20 pm »
This is an interesting thread... I am considering looking at exploring STM32 and/or TI's possibly the rather expensive CC1352R.

Currently I have PIC development tools, various PICKITs and also U64 from CCS. These tools have served me well and allow fast in circuit programming and with a bit of hardware juggling the odd hardware breakpoint.  I have also dabbled with AVR and have an Atmel AVR Dragon for development.

Can someone please advise what the recommended hardware tools are for STM and TI?  I don't just want an evaluation board I would like a tool that I can connect to my own design via a few pin header for programming and debug.

What is a Black Magic probe? Any good?

Thanks
« Last Edit: December 13, 2018, 12:30:47 pm by NivagSwerdna »
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Switching from AVR?
« Reply #10 on: December 13, 2018, 01:14:51 pm »
For truly cheap and slow controller applications, 8051s can be had for CENTS (I forget brand, can check if you need), for anything else it is crazy not to use a modern ARM microcontroller.
1t 8051 is faster than AVR. Also for fast response to events 8 bitters can be faster than ARM if no heavy calculations are used.

8051 seems like a step backwards from AVR. They are a much worse compiler target, and not much fun to program in assembly language either. Sure ... if you just want something super-cheap and the program will be small.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16844
  • Country: lv
Re: Switching from AVR?
« Reply #11 on: December 13, 2018, 01:36:57 pm »
8051 seems like a step backwards from AVR. They are a much worse compiler target, and not much fun to program in assembly language either. Sure ... if you just want something super-cheap and the program will be small.
There are decent compilers like Keil C51 (comes free with Simplicity studio) and it's all you should care about.
 
The following users thanked this post: grantb5

Offline josip

  • Regular Contributor
  • *
  • Posts: 151
  • Country: hr
Re: Switching from AVR?
« Reply #12 on: December 13, 2018, 02:13:33 pm »
Can someone please advise what the recommended hardware tools are for STM and TI?  I don't just want an evaluation board I would like a tool that I can connect to my own design via a few pin header for programming and debug.

There are many TI low-cost MSP430 launchpad boards for about 10$ with on board open source (software and hardware) updatable  FET (SBW) master. Just pick one that came with on board target device similar to yours. LP can be used with off board target, for flashing / debugging any device by SBW interface (VCC, GND, RESET and TEST lines).

If you want only FET tool with JTAG / SBW interface packed in box, than there is MSP-FET http://www.ti.com/tool/MSP-FET

I don't see any point in MSP432 (renamed tiva, M4 with TI peripherals), but TI put all cards on it. And FRAM.
« Last Edit: December 13, 2018, 02:18:59 pm by josip »
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: Switching from AVR?
« Reply #13 on: December 13, 2018, 05:33:29 pm »
There are decent compilers like Keil C51
Having recently finished a project with an EFM8 microcontroller, I can tell you that Keil C51 is anything but decent. There is a lot of unnecessary dickery to do to get a piece of code running semi-well with C51.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1275
  • Country: gb
    • bitdynamics
Re: Switching from AVR?
« Reply #14 on: December 13, 2018, 06:18:11 pm »


AVR is obsolete.


Sorry but i disagree.  When you have a simple, easy task, without too much complex maths, then an AVR, with its simple datasheet, decent built in peripherals (like an EEPROM!) very simple compiler and IDE, is just the ticket.   For anything that needs to be truly robust, then that simplicity also really helps.  Unless you are going to write complex HALs for ARMS yourself, then you WILL be using other people's libraries for any ARM project, and that brings a level of risk with it.  Most of the silicon is also now very mature and robust, with the very few errata well understood or ironed out entirely.


Horses, for courses....... :box:
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14168
  • Country: de
Re: Switching from AVR?
« Reply #15 on: December 13, 2018, 06:47:07 pm »
There is not that much difference in the performance and typical application between AVR, PIC16/18, 8051, EFM8 and MSP430. So unless one absolutely needs some specific periphery or very high volume  there is no real need to look at a 2nd 8 bit µC.

So the step up would be more like an ARM based µC. There are also MIPS based ones, but not that common.

The applications are a little different and there are still cases were an 8 bit µC is more suitable, usually small code projects.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16844
  • Country: lv
Re: Switching from AVR?
« Reply #16 on: December 13, 2018, 07:06:10 pm »
There is not that much difference in the performance and typical application between AVR, PIC16/18, 8051, EFM8 and MSP430. So unless one absolutely needs some specific periphery or very high volume  there is no real need to look at a 2nd 8 bit µC.

So the step up would be more like an ARM based µC. There are also MIPS based ones, but not that common.
For MCU is often more important what it has around that core rather than core itself. For example EFM8 series have quite interesting peripherals at a very low price. For example you can have USB, 1% internal oscillator, versatile 12 bit ADC, built in 100mA Vreg and other goodies at the cost of Attiny24A. BTW EFM8 is 1T 8051.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Switching from AVR?
« Reply #17 on: December 13, 2018, 07:19:38 pm »

8051 seems like a step backwards from AVR. They are a much worse compiler target, and not much fun to program in assembly language either. Sure ... if you just want something super-cheap and the program will be small.

When I did a project with an NXP 80C251 I used Pascal.  Today, I might use something like:
http://turbo51.com/

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Switching from AVR?
« Reply #18 on: December 13, 2018, 07:27:52 pm »
I wouldn't think the AVR is dead just yet.  People migrate toward Arduino, get frustrated at the device size and, really, the entire infrastructure but they never take a step back to ICSP programming, perhaps from the command line.

I like the ATmega128.  It has a lot of pins and plenty of peripherals.  avr-gcc and avr-libc work quite well and I just use a Makefile and the Linux command line along with gedit.  This is a very productive environment and, since the chip pins are all available, I can do what I want. 

The ATmega328P of the Arduino is a capable chip if you blow off the Arduino stuff that cripples it.  But it will always have a low pin count so if you need more pins, look elsewhere.  Like the ATmega128...

The ATmega series chips are very nice to work with.  Most are 5V and that might be a big deal when it comes time to connect things.  gcc generates very nice code.
 

Offline wholder

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
    • Wayne's Tinkering Page
Re: Switching from AVR?
« Reply #19 on: December 13, 2018, 10:09:54 pm »
I also got frustrated with using the Arduino IDE, especially when trying t program the ATtiny-series chips.  So, I decided to created my own, simplified IDE.  The first version, which I wrote back in 2014, was targeted at just the ATtiny4,5,9,10, 6 pin chips (which explains the name.)  However, I've recently been working to upgrade it to support the ATtinyx4 and ATtinyx5 series chips.  I still have a lot of work to do and many new features I want to add but, if anyone feels adventurous, please feel to give it a try.  Full source code and/or an executable Jar file (it requires Java 8, or later to be installed) is available here:

  https://github.com/wholder/ATTiny10IDE/

Also, my recent video "How Does It Work?" () shows my IDE in action.  So, watch that for a quick overview of the IDE in action starting at 1:04.

The newly-added support for the ATtinyx4 and ATtinyx5 series chips is still a bit rough, but I'm working to improve it and welcome suggestions and hope to add support for other chips in the ATtiny family as time permits.

Wayne

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf