Author Topic: Microcontroller after Arduino  (Read 21033 times)

0 Members and 1 Guest are viewing this topic.

Offline Thane of Cawdor

  • Regular Contributor
  • *
  • Posts: 81
Microcontroller after Arduino
« on: November 19, 2013, 07:41:28 am »
Hi

I want to try other microcontroller systems other than the PICAXE and Arduino. Which microcontroller should I use?

Please take in consideration which ones are going to be the next industry standard, have a low price etc.

Thanks
« Last Edit: November 20, 2013, 08:47:18 am by Thane of Cawdor »
 

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 813
  • Country: au
Re: Microcontroller after Arduino
« Reply #1 on: November 19, 2013, 08:04:05 am »
PICAXE is overpriced for what it is. Arduino however seems to be doing a good job of keeping pace with the times.
For now Arduino seem to be the benchmark with enough plug in bits to keep most people happy.

There was talk of an ARM based Arduino clone but i don't know if it ever eventuated.

Regards
PeterG
Testing one two three...
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 3502
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Microcontroller after Arduino
« Reply #2 on: November 19, 2013, 08:29:50 am »
You'd be crazy to. Ready-made, ready-programmed stuff like Arduino is great to play with and learn on, but it's a whole world away from the professional market.

At the very least, download MPLAB X and learn to use a PIC without needing someone's pre-programmed boot loader. If you're at all serious about professional development, look into the enormous range of ARM based microcontrollers from companies like NXP, ST, TI and Freescale. It might also be worth looking at MSP430 if you need the lowest power, or one of the Far Eastern manufacturers like Generalplus for the lowest cost. (Good luck with that last option!)

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3098
  • Country: us
Re: Microcontroller after Arduino
« Reply #3 on: November 19, 2013, 08:37:09 am »
Well, you could start programming the Arduino using a more professional development environment, like Atmel Studio.
Which would also open up the other AVR microcontrollers, and perhaps the Atmel ARM chips as well.

Quote
would you be able to use the Arduino environment when making a professional product?
Maybe.  It depends on "how professional", how much of the environment you wanted to use, and how many lawyers you have impeding you.  (The Arduino folks have SAID that you're allowed  to develop commercial not-open-source products based on the environment.   But then they (and many of the 3rd party library developers) have pinned on SW licenses that really are not well-matched (or "appropriate at all") to deeply embedded products.   Mostly from ignorance of the implications...  IMO, the Arduino libraries are on-par (quality-wise) with some of the libraries from chip vendors (which is to say, "not awful."  And you have source so you can maintain them yourself.  (OTOH, they're probably a bit below the libraries that you get from the better compiler vendors.))

The Arduino environment now encompasses AVR, PIC32 MIPS (ChipKit mpide), TI MSP430 (Energia), and several ARM chips (Maple (STM), Due (Atmel), Teensy3 (Freescale)), so any of those offers a similar "jumping off" point to non-Arduino development on those chips.

Studying the Arduino code that supports a particular chip (remember, all open-source) is also a good way to learn a fair amount about how that chip works.
 

Online BravoV

  • Super Contributor
  • ***
  • Posts: 6444
  • Country: 00
  • +++ ATH1
Re: Microcontroller after Arduino
« Reply #4 on: November 19, 2013, 08:50:47 am »
If you still insisting on Arduino like environment, google for the word "Energia", its a "Arduino Clone" runs on powerful TI Arm M4F core.

Again, as others have suggested, try to leave Arduino if you're going to get the "serious" performance out of your mcu. Arduino is good only as introduction tool into MCU world, but thats it, once you reached certain level, Arduino will be like "Lego" vs "real bricks & cement".

My 2 cents.

Offline Corporate666

  • Supporter
  • ****
  • Posts: 2004
  • Country: us
  • Remember, you are unique, just like everybody else
Re: Microcontroller after Arduino
« Reply #5 on: November 19, 2013, 09:27:23 am »
I don't think you can really talk about "next industry standard" without talking about which industry.

If you look at the biggest microcontroller companies, Atmel isn't even in the top 10.  Neither is Microchip.  But both of them dominate the hobby world.  The truly big boys are NXP, Renesas, ST, Panasonic, TI, Freescale, etc.  But many of their chips are used in specific applications.

I think that if you want to pick something, definitely go with someone who has ARM chips.  I personally don't like Atmel but they aren't a bad chip - same with Microchip/PIC.

My personal preference is Cypress PSoC because they have programmable blocks, much like an FPGA... and they have M8, 8051 and ARM core versions available, plus the dev software is excellent.  Once you know how how to code a MCU in C, it's not that much different moving between them.  But the FPGA-like functionality is a big leaning bonus that will help you get into real FPGA work in the future, or at least familiarize you with the concepts and relieve you of the constraints of how many  built-in devices a certain chip has.
It's not always the most popular person who gets the job done.
 

Offline Thane of Cawdor

  • Regular Contributor
  • *
  • Posts: 81
Re: Microcontroller after Arduino
« Reply #6 on: November 19, 2013, 09:32:34 am »
Thanks

I just can't get my head around FPGA's, they seem very difficult to program and use to me. How would one get started in FPGA's?
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Microcontroller after Arduino
« Reply #7 on: November 19, 2013, 11:25:16 am »
If you still insisting on Arduino like environment, google for the word "Energia", its a "Arduino Clone" runs on powerful TI Arm M4F core.

Again, as others have suggested, try to leave Arduino if you're going to get the "serious" performance out of your mcu. Arduino is good only as introduction tool into MCU world, but thats it, once you reached certain level, Arduino will be like "Lego" vs "real bricks & cement".

My 2 cents.

Energia also works with the MSP430 which is a 8bit MCU like the AVRs and lower end PICs.
There's also MPIDE which works with the Chipkit boards.

The larger the government, the smaller the citizen.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 6048
  • Country: gb
Re: Microcontroller after Arduino
« Reply #8 on: November 19, 2013, 11:35:46 am »
If you still insisting on Arduino like environment, google for the word "Energia", its a "Arduino Clone" runs on powerful TI Arm M4F core.

Again, as others have suggested, try to leave Arduino if you're going to get the "serious" performance out of your mcu. Arduino is good only as introduction tool into MCU world, but thats it, once you reached certain level, Arduino will be like "Lego" vs "real bricks & cement".

My 2 cents.

Energia also works with the MSP430 which is a 8bit MCU like the AVRs and lower end PICs.
There's also MPIDE which works with the Chipkit boards.

The MSP430 is 16-bit.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #9 on: November 19, 2013, 12:03:14 pm »
Quote
Which microcontroller should I use?

It generally doesn't matter, if you are a hobbyist. If you want to make a living off of it in the future, it would be crazy for you to invest in an 8-bit platform - ARM or some industry-specific platforms (from Renesas or Freescale or Infineon for example) would be far better.

As long as you code in a high level language like C, all mcus are pretty much the same from a coding perspective. You are far better off thinking about your ability to dissect a large project into little pieces and then integrate them together into a workable product.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #10 on: November 19, 2013, 12:10:22 pm »
I would also be very cautious investing in platforms whose futures are less certain, like xmega, avr32 (the home-grown version, not their ARM offerings), or pic32.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #11 on: November 19, 2013, 12:12:03 pm »
As for ides, if you are into the ARM products, I would recommend CoIDE: fully functional, with the best project wizards I have ever seen. spotty device support, however.
================================
https://dannyelectronics.wordpress.com/
 

Offline Thane of Cawdor

  • Regular Contributor
  • *
  • Posts: 81
Re: Microcontroller after Arduino
« Reply #12 on: November 19, 2013, 12:15:34 pm »
So is there a certain development board/microcontroller and software that you recommend in the range of ARM products?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #13 on: November 19, 2013, 12:30:45 pm »
For rich features, I would pick TI's launchpads - for its value proposition (low price and the CCS IDE). The analog part of early versions of the chip has some bugs.

For varieties, I would pick ST's offerings - all those discovery boards are inexpensive and loaded with hardware debuggers.
================================
https://dannyelectronics.wordpress.com/
 

Offline JoeO

  • Frequent Contributor
  • **
  • Posts: 525
  • Country: us
  • I admit to being deplorable
Re: Microcontroller after Arduino
« Reply #14 on: November 19, 2013, 12:50:41 pm »
They are inexpensive because TI knows it will make money when their parts are used in a product.
The day Al Gore was born there were 7,000 polar bears on Earth.
Today, only 26,000 remain.
 

Online Berni

  • Super Contributor
  • ***
  • Posts: 2620
  • Country: si
Re: Microcontroller after Arduino
« Reply #15 on: November 19, 2013, 01:08:41 pm »
It does not really matter what chip you go to, once you have worked with a few different ones you see that they are all the same thing, just the peripherals are slightly different.

The most important thing is that you use C. All professional MCU programming is done in C, not basic or any weird amalgamation of languages. Did i mention to use C?

Also try to not use peripheral libraries. Read the datasheet and write your own SPI or UART driver so you learn how it works more in depth. Also sometimes writing your own driver is more efficient or gives you access to features that you otherwise don't. Also writing your own peripheral code means you are not bound to the compilers internal libraries so your code will compile fine in any version of the compiler, and in all other ANSI C compilers in the world. (Also it manufacturers alaways provide example code of how to interface to peripherals to help you out if you get stuck)

Also try making higher level libraries your self like a graphics library that can draw shapes,bitmaps and text on to a graphical screen or something to get experience writing actual C code instead of just making a little main loop where you call a few arduino librarys and magic happens.

Getting in to the correct mindset of a programmer is the most valuable thing to learn. Anyone can look up what a certain library function does in a user manual, but you will encounter a lot of problems that there is no magic library you can call to do it and you need to write it your self. In that case you need to be able to break down a complicated problem in to a series of smaller programs that C is capable of solving. I see this problem with newbie programmers a lot, when there is no function they can call to do what they want they throw up there arms and say its impossible instead of thinking a bit and noticing that if you combine a few functions and add a loop for example that could solve the problem.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6589
Re: Microcontroller after Arduino
« Reply #16 on: November 19, 2013, 01:18:18 pm »
I would recommend PICs and some 8051s (Silabs make some interesting ones.)
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Re: Microcontroller after Arduino
« Reply #17 on: November 19, 2013, 01:56:54 pm »
Hi,

I also recommend you to start learning C for embedded work. You can check the Microchip PIC range of 8, 16 and 32 bit micros. Once you've learned one of them, it is much easier to migrate from 8->16->32 bit. (not necessarily in that order). Also, there are plenty of books out there for them. I'm not so sure about the statements that the future of the 32 bit PICs is uncertain, although they seem to lag in some fields behind the ARM competitors. Nevertheless, they offer some really powerful chips in their portfolio. If you want to go the ARM way, consider the Discovery boards from ST. They are very feature packed (IMHO, better than TI) for their price. I bought brand new F3 Discovery board off ebay with STM32F303 (ARM Cortex M4) and ST MEMS Gyroscope and Accelerometer on board for 15$ or so.

As for software, if you choose Microchip stick with MPLAB X, it's much better now than before. For ARM i would recommend you IAR Embedded Workbench for ARM or Keil, both of them have free licenses with code restriction to 32kB(which is more than enough for small to medium projects). I've tried CoIDE, which is based on Eclipse, but i didn't like it too much. The range of supported processors is awfull. Also, ST offers some autocode generation tools for their micros (like MicroXplorer) which help you to setup IOs, ADC and etc. very quickly and easily.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 18271
  • Country: nl
    • NCT Developments
Re: Microcontroller after Arduino
« Reply #18 on: November 19, 2013, 02:57:05 pm »
Also try to not use peripheral libraries. Read the datasheet and write your own SPI or UART driver so you learn how it works more in depth. Also sometimes writing your own driver is more efficient or gives you access to features that you otherwise don't.

Also try making higher level libraries your self like a graphics library that can draw shapes,bitmaps and text on to a graphical screen or something to get experience writing actual C code instead of just making a little main loop where you call a few arduino librarys and magic happens.
The device libraries for simple stuff like SPI et al are usually pretty useless. However when it comes to ethernet, USB, filesystems, etc I do recommend to just look for suitable libraries. The amount of work involved is just too much. Ask yourself how sensible is it to re-invent the wheel? Writing stuff from scratch can be fun but building on other people's work leaves you time to fine-tune the task at hand and come up with better and new ways. Imagine you have to put your car together every time you go shopping. Just some food for thought.

Learning C is a good starting point but I'm sure we'll be seeing scripted languages in microcontrollers soon.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3098
  • Country: us
Re: Microcontroller after Arduino
« Reply #19 on: November 19, 2013, 05:08:18 pm »
Quote
you have successfully convinced me to start learning C. Where do I start(complete beginner)?
Oh, an Arduino is probably a pretty good start.  The "Arduino language" *is* C (well, C++, but these days when someone says "learn C", they probably also want you to learn some of the C++ concepts that have been back-ported.)

The whole "don't use libraries" thing is pretty controversial, BTW.  Yes, you can learn a lot by writing all of your low-level code, library functions, and device drivers.  But that's relatively contrary to "modern programming practice" and "industry trends" - as peripherals increase in complexity, you're more likely to be be using libraries provided by someone else.  Whether you use arduino libraries, or ASF libraries, or Imagecraft libraries, or TivaWare (nee StellarisWare) libraries, or CMSIS libraries; they all have advantages and disadvantages.  Writing your own LCD driver is ok, though full of possible mistakes that you really don't need to make if your goal is a sous vide cooker controller.  Writing your own tcp/ip stack, or ignoring a perfectly good set of posix standard libc functions (like avr-libc or newlib) would be pretty foolish unless you have a particularly strong reason.
 

Offline filip_cro

  • Regular Contributor
  • *
  • Posts: 71
  • Country: hr
Re: Microcontroller after Arduino
« Reply #20 on: November 19, 2013, 05:35:31 pm »
It's not so much about making libraries, it's about understanding how uC works. Same reasons why we study assembler in high school.  I personally also find Ardruino harder to use then avr-gcc C.
I think that you should know what register is doing.
« Last Edit: November 19, 2013, 05:38:03 pm by filip_cro »
 

Online Berni

  • Super Contributor
  • ***
  • Posts: 2620
  • Country: si
Re: Microcontroller after Arduino
« Reply #21 on: November 21, 2013, 07:24:59 pm »
The device libraries for simple stuff like SPI et al are usually pretty useless. However when it comes to ethernet, USB, filesystems, etc I do recommend to just look for suitable libraries. The amount of work involved is just too much. Ask yourself how sensible is it to re-invent the wheel? Writing stuff from scratch can be fun but building on other people's work leaves you time to fine-tune the task at hand and come up with better and new ways. Imagine you have to put your car together every time you go shopping. Just some food for thought.

Learning C is a good starting point but I'm sure we'll be seeing scripted languages in microcontrollers soon.

Yes for those you want to use a library for sure. I have my personal favorite FAT32 library (by Elm Chan) that i ported to many many things by now.I was mostly talking about writing libraries for simple things where you can write it in a few hours. Stuff like SPIs, UARTs, graphics etc. But if you are learning C stay away from those complex protocols for now, start small and work your way up.

Im not so sure about seeing interpreted scripts getting common on MCUs yet. Even today C still remains the way of doing real world stuff. Most high performance PC applications are still done in C/C++ like games and large programs like photoshop. The nice thing about C is that it still keeps you pretty low to the hardware while not being cumbersome assembler, also compilers can optimize C code to run pretty damn fast.

Also yes doing a bit of assembler is quite helpful since it gives you a good understanding of how a commuter works internally, do a few simple things like loops and such in it, just don't write a big complicated program in it. Nobody writes whole programs in assembler when they have to get something done. In practice assembler just comes in as a supplement to C for doing wierd sneaky things that C wont let you do or want something cycle accurate.

As for chips to learn C on i would recommend the PIC18F family and the 16bit PICs. One of those little ARMs would also be a good choice.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 3502
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Microcontroller after Arduino
« Reply #22 on: November 21, 2013, 08:14:26 pm »
I learned C on a PIC18F device, and although trying to learn the language + the IDE + the architecture of the PIC all at the same time felt like a brick wall at the time, it was well worth the effort. The time has paid for itself many times over and continues to do so.

More recently I decided to learn an ARM based microcontroller (STM32, Cortex-M0 series), on the simple basis that they're much faster, much more capable, and absolutely no more expensive than 8 bit PICs. (Seriously, just take a look at the difference in price/performance ratio for a similar set of memory and peripherals between, say, PIC18 and STM32... it's crazy! Microchip, take note...)

I decided to use manufacturer-supplied libraries when learning the ST part, but with hindsight, I'm not sure that was such a good idea. The peripherals in the STM32 are quite complicated, of course, but they need to be learned anyway. Adding a layer of abstraction in the form of the library didn't really help, it was more like a layer of obfuscation; most of the library functions boil down to a check that their parameters are valid followed by some bit twiddling, and I think it would have been easier (and faster) to twiddle the bits directly.

Online IanB

  • Super Contributor
  • ***
  • Posts: 9608
  • Country: us
Re: Microcontroller after Arduino
« Reply #23 on: November 21, 2013, 08:40:26 pm »
Hi

I want to try other microcontroller systems other than the PICAXE and Arduino. Which microcontroller should I use?

Please take in consideration which ones are going to be the next industry standard, have a low price etc.

Thanks

Arduino is a friendly wrapper around core Atmel micros. So I think a convenient and accessible next step would be to start programming the Atmel micro directly using something like Atmel Studio (as indeed others have mentioned).

When you are a student it is important not to focus too much on learning "this micro" or "that micro", but rather try to learn the general concepts and principles of how microcontroller development environments work. As a professional you should be able to switch from one system to another with relative comfort as a large part of your knowledge should be transferable.

Incidentally I have opened up consumer products and seen Atmel micros inside them, so they do get used commercially.
I'm not an EE--what am I doing here?
 

Offline ddavidebor

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: it
    • Fermium LABS website
Microcontroller after Arduino
« Reply #24 on: November 21, 2013, 09:22:05 pm »
Just use the micro you want.

I'd sugges you start with 8 bit. Is cheap, simple, well documented.

A pic or avr will do fine, just pic is a bit cheaper to start due to the pickit.

If you want to do things pretty "electronic" that is ok. A basic C and a bit of assembly will do it. (assembly is boring but it really help)

If you want to do more "computer" thing you will need something like arm or 32 bit and more complex development platform (with 8 bit you just need a pickit, a pic, a few component and a breadboard to build up the world, with bigger chip is more complex)

Arduino is great if you are a computer guy. But if you want to become serious in EE stop using it.
It will burn you brain after a certain level. With arduino you can't solve some real-world problem because they're alredy solved for you.

And, company don't want another arduino guy. The mental attitude you use on a arduino IS NOT THE ONE YOU WILL USE TO DESIGN, TEST AND DEBUG PRODUCT.

You will notice it as soon as you've done a bit of "serious" assembly.



Davide Bortolami,
Fermium LABS srl
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf