What is a good first microcontroller?

Discussion in 'Embedded Systems and Microcontrollers' started by jonah1, Dec 17, 2010.

  1. jonah1

    Thread Starter New Member

    Dec 17, 2010
    I am an experienced C/C++/Java developer but I have no experience with embedded systems, low level programming, or with hardware. I want to get into RC Boats/Submarines as a hobby and I was wondering what would be a good microcontroller to learn on? I don't mind writing assembly or reading whatever is necessary to learn what I need to know. I'm just looking for a starting point to begin learning.

    I would prefer one that has an emulator and I need to be able to do everything in Linux because I don't know how to use Windows.
  2. hgmjr


    Jan 28, 2005
    If you want to get into hardware quickly and for around $30, I suggest you check into Arduino at www.arduino.cc. The Arduino UNO is a good starter board. The development software is at the Arduino website. The programming language is C-language. Once you get comfortable with this then you can graduate to rolling your own hardware.

  3. nickelflipper

    Active Member

    Jun 2, 2010
    Not into Linux, but here are just some random ideas to explore for suitability:

    LPCXpresso : 32 bit Cortex-M0 & Cortex-M3

    TI Launchpad : 16 bit MSP430 value series

    Microchip PICs and Atmel AVRs : very popular 8 bit and up micro's. GCBasic is an open source compiler/project that uses FreeBasic (Linux version/compatible) to create the GCBasic.exe.
  4. dikshitmm

    New Member

    Dec 17, 2010
    Hi Jonah,

    If you *really* want to learn a microcontroller, start with a simpler one - 8051 or PIC, preferably some open source hardware that will allow you to study the schematics too. I suggest 8051 because there is tons of material and development tools and support forums available that will help you with it. Once you know how a microcontroller works, it will be easier for you to learn the more complex x86, ARM etc microcontrollers.

    A lot of material on 8051 is available here:

    Going for a microcontroller that you can't possible code with assembly alone would be a big step - especially if you really want to learn about them.

    I would not recommend Arduino since it greatly simplifies things by hiding most of its inner workings in the libraries and provides a bunch of functions to access them. You never know what goes on inside.

    Thus, if you just want to get your project done quickly without much of R&D, go for Arduino and similar development kits. If you want to learn about things under the hood, go for any simple development platform (Arduino included, if you drop their IDE and libraries and use AVR assembler/compiler directly) and use their own IDE for your beginer programs.

    I would also suggest the open source PIC Cocoon 2 from Gadget factory. It is a simple and economical PIC18 platform which can be coded in assembly using MPLAB with MPASM (both freely available from Microchip) and also provide a USB interface with demo applications. It has 16 lines of IOs for add-on boards what they call wings.

    The board docs are here:

    I hope this helps,
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    Ask 10 people, get 10 answers. :D'

    I'd say PIC, but I'm biased. Don't try to do assembly on the 16F series if you are just starting out, you'll hate and become a hermit.

    Your choices for starting out are roughly: Arduino / PICAxe /BASIC Stamp series, which are prebuilt boards with some form of language readily available and a programming system built in.

    At the discrete level, most everything "hobbyist" these days is PIC or AVR. A good deal of commercial products use PICs as well.

    Pick a dev board, work with it a while so you know how interrupts, I/O and memory work on a uC. Once you learn one, the others are similar enough not to be entirely new, but not so similar that you can use the same dev tools or programmer on them.

    I guess a better defined question is what is your intended application? USB and SD Card reading/transfer is often done with PICs, as they typically have more peripherals on-board for the price. Building your first robot is usually done with an Arduino for simplicity at sacrifice of a bit of speed. It varies quite a bit. If you are going to design for a specific area of applications, the recommendation will likely change.
  6. hgmjr


    Jan 28, 2005
    I think our friend jonah1 has surcome to whale1. You would think he would have known better from previous experience.

  7. dikshitmm

    New Member

    Dec 17, 2010
  8. ke5nnt

    Active Member

    Mar 1, 2009
    Well, like someone else said, ask 10 and get 10 answers. I myself am fairly new to microcontrollers and programming languages. I can tell you I've been having a ton of fun with it. When I was first starting, I went with the PIC micros from Microchip since they're cheap and widely available. I was undecided between learning Assembly, or C but ultimately went with Assembly. The absolute best thing about Assembly, is while you learn it, you really come to understand how MCUs function since the code you're writing is specifically manipulating bits of information. When you write "BSF PORTB, 3" you know exactly what you're doing and what you're telling the MCU to do. I found that to be very helpful.

    Assembly is a low-level language though, so it is limited. I'm just starting to learn C language now, and often when reading the material I have on C, it references things in Assembly to better explain how you are manipulating the MCU; so knowing Assembly has been all the more helpful while learning C (considered to be a high-level language). C's advantages are that it is a functional language in 16 and 32 bit controllers, and apparently, once you learn it (as I have not yet) it's easier to write complex programs since the language is in simpler terms.

    To make a long story short, if I was to do it again, I would again choose PIC MCUs and Assembly as my starting point. I haven't regretted it once.

    Senior Member

    Jul 1, 2008
    If it were not for the fact that you're experienced in the C languages I wouldn't hesitate to recommend Picaxe. ;)
  10. elementalrage

    Active Member

    Jul 30, 2009
    I got to tell ya, learning "Assembly" really opened my eyes to the inner workings of the uC. Plus, programming in "Assembly" is free.

    I found that there are too many different C compilers with different syntax requirements, so I haven't switched over yet.

    I'm biased with Microchip products as well. I really haven't found a need to use another brand. Plus, they're so darn cheap!
  11. CDRIVE

    Senior Member

    Jul 1, 2008
    I could care less about the inner workings of a MC. All I give a hoot about is that my programs do what I want them to. Picaxe is a PIC with an embedded Boot loader program. Though this feature does use up some memory that would be available in a standard PIC, it's more than worth the trade off for the ability to write code in Basic. It's difficult enough for electronics neophytes already; they don't need the added difficulty factor of learning any form of 'C', Assembly, or other none intuitive, (unnatural) languages.

    Picaxe software is free, down loadable, and provides a very impressive Editor/Simulator/Compiler. The editor includes a syntax checker and a Run/Simulate function. When Simulate is selected a virtual image of the chip is displayed as well as your code. The programmer can see each line of code being executed synchronous with the animated image of the chip. Pins change color to indicate their state. Virtual buttons and ADC controls are also included. It also has a virtual LCD and Serial Terminal.
    I love Picaxe, I know that my program is going to work without ever downloading it to a chip!
  12. hgmjr


    Jan 28, 2005
    If you are new to microcontrollers, the learning curve for constructing the hardware can be daunting. That is why I too like the convenience of a ready-to-use hardware development board. I have found the free program development software and the extensive availabilility of ready-to-use libraries (also free) to be a real benefit when I want to get started. That is why I think you will find the Arduino a good place to begin. It is based on the popular ATMEL AVR microcontroller so you can use it as a springboard to learning the AVR while getting the design up and running in only hours of effort instead of days.

    The arduino has a boot-loader installed which make it possible to download and run programs developed using the free program development software. The board is powered by over the USB cable from your PC and if you like it you can plug in a suitable wall-wart and the power auto switched over to it.

    Just go to www.arduino.cc and you can see for yourself what I am talking about.

    Last edited: Jan 12, 2011
  13. maxpower097

    Well-Known Member

    Feb 20, 2009
    If your a total newb then go with the Arduino or PicAxe. Like others have said these are basically normal PIC or AVR chips. With a special compiler and bootloader to use basic or a modified C. If you have programming experience and bits, bytes, words, and SFR's don't scare you. Just go straight to a real board and programmer. I personally recommend the PIC line of 16 bits an 32 bits. But you could probably throw the PIC18 in that list because its pretty dang similar to C30 and C32. Also the MC C compilers seem to be pretty basic C with some special functions. So learning MC C is very good to program other things in C. Where as arduino C is modified C and doesn't really look like real C code. It looks like a female basic compiler had a kid with a male C compiler.
  14. retched

    AAC Fanatic!

    Dec 5, 2009
    Flip a coin.

    If it lands on heads, get the PICAxe

    If it lands on tails, get the ArduinoUNO

    If it lands on the edge, get maxpower097 Explorer 16 ;)

    Plain an simple.. You WILL use them.

    Even if you have 10 years of experience with uC design, you will still reach for a PICAxe or Arduino to do a 1 minute test of an idea or function.

    If you want to do a big LED screen and you need to match Vf on a few hundred LEDs, you can whip up a program to test and display the Vf in a few minutes. No need for either to pull the chip out of a socket to program. NO header pins for ICSP stuff. And for simple com-port (USB) communications back to the computer, they are both golden.

    A simple one line command will display a message or variable on the attached computer.

    They are great tools.. Like a screw driver.. You will use it for more than learning.

    You WILL use it later in your career/hobby.