Beginner seeking help with microcontroller(s)

Discussion in 'Embedded Systems and Microcontrollers' started by Symphony, Jun 12, 2016.

  1. Symphony

    Thread Starter New Member

    Jun 12, 2016
    2
    0
    Greetings people,

    Well I tried to find a newbie corner but seems the AAC forum doesn't have one so I'll have to post here with hope you don't judge me if it's in the wrong place. I'm not foreign to circuits, etc. but I am in microcontrollers & its programming. I don't really know where to start, from literature to equipment. I've been thinking of buying this programmer but I'm confused with all those labels PIC, AVR, etc. & if the programming of different models differ much or does it depend from project to project? I don't really feel comfortable with using Arduino or Raspberry Pi for my projects, I want to make them from scratch but I have no idea where to start. So if anyone is willing to post some resources from where I can start with embedded systems & microcontrollers. Some of you might ask me "What you want to do with them?" but I'm not focused on anything at the moment, just want to start with them, but I guess if I had to answer I'd say my goal is robotics.

    Thanks all for any advice & help. :)
    All the best.
     
  2. dannyf

    Well-Known Member

    Sep 13, 2015
    1,811
    362
    if you have no idea where to start, starting on something simple and ready made, like the arduino, seems to make perfect sense to me.
     
  3. Symphony

    Thread Starter New Member

    Jun 12, 2016
    2
    0
    What Arduino would you recommend using as total beginner then? :)
    I'm not completely against using Arduino, but thought that it would be better to go from scratch.
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Look at a couple of the Tutorials on Picmicro, Nigel Goodwins Tutorial site for one, they are in assembly but a search will find where someone converted them to C.
    If you are thinking of getting in to much pic programming I would suggest a Pickit2 or 3, and if you use a development board or if you include a ICP (in circuit programming) socket on your board design, it saves keep swapping the IC from the ZIF socket to the board.
    Max.
     
  5. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,392
    497
    There is simply too much you don't know to start from scratch.

    For the sake of cheapness and completeness, I would get 8 dollar copy of Arduino Uno.
    1. I assume you have some kind of wall wart to power the thing (9-12 volts dc is recommended) or you can strip the cable on cheap USB power converter and plug the ground and 5 volt wire into the Uno.
    2. Arduino Foundation provides the free software "suit" or IDE. Just download and install according to their instructions.
    3. Get Arduino Uno copy/clone for cheap from ebay or here for the princely sum of 7 dollars: https://www.fasttech.com/products/1008/10000015/1001700
    4. Arduino Foundation provides introductory materials/lessons/examples on their website, so you can have flashing led up and running 5 minutes after you put everything together.

    If you buy from FastTech, then you might as well buy this wall wart (if you don't have one): https://www.fasttech.com/products/1008/10000015/1201203

    The total outlay will be less than 20USD. If you go PIC route, you will spend 30 just for programmer, not counting all other bits and pieces, and I shudder to think how much PIC development board would cost you.
     
  6. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Depends how much depth and duration you intend to pursue the Pic, so far I have picked up the Mechatronics, AC/BLDC and the general PicDemo board that has 3 sizes of sockets to cover most bases, all off ebay for a good price if you watch.
    The advantage for e.g. is the gen. Pic demo board comes with most peripheral modules and includes all S/W routines in Assembly and C.
    Also built the Pendulum board.
    Max.
     
  7. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Last edited: Jun 13, 2016
  8. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    Ask twelve members here on AAC and you can possibly get twelve different answers. Then you will be more confused than before you asked the question in the first place. None of the answers can be labeled as right or wrong. They are simply different opinions and personal biases.

    Let's try and categorize the various answers as follows:

    1. MCU Development boards, starter kits and launchpads

    Development boards are for learning about specific chips from specific manufacturers. Here you are being introduced to the offerings of a specific manufacturer. While you will learn a lot about microcontroller technology in the process, remember that the objective from the manufacturer's perspective is for you to buy their product and incorporate them in your future designs.

    There is a large number of contenders here and I will list only a small sample just for brevity, listed by manufacturer (in alphabetical order) followed by the entry level family. Each manufacturer has much more advanced and powerful chip families for more complex applications.

    Atmel AVR
    Freescale S08
    Microchip PIC
    NXP 80C51
    Silicon Laboratories C8051
    ST Microsystems STM32F
    Texas Instruments MSP430

    (Note Freescale has merged with NXP.)

    2. Small stand alone development kits and platforms, e.g.
    Arduino
    PICAXE

    3. Full scale and complex operating system platforms, e.g.
    BeagleBone
    Raspberry Pi

    So which do you choose? This depends on your goal, short and long term objectives and present and future applications.
    It would help if we knew your age, educational background and where you see yourself headed with regards to programming and developing your own embedded systems.

    From what you have told us it appears you wish to learn more about microcontroller technology and applications.
    At the very start I would recommend reading this 332-page documentation for a solid grounding on microcontroller architecture, programming and applications.

    Understanding Small Microcontrollers (pdf)

    This is based on an obsolete processor but the material is applicable to any and all microcontrollers.
     
  9. JohnCase

    New Member

    Aug 19, 2015
    26
    4
    My recent (and still in progress) experience with the book Make: AVR Programming is amazing. A very soft approach to the MCU world.

    I'm not, of course, an expert. I'm learning like you as a beginner.
     
  10. electronican

    New Member

    Sep 30, 2015
    6
    0
    I'm too beginner and i chose PICKit 3 as a debuger and pic32 starter kit. I do not regret my choose. At beginnig i was using the book called "programming 32-bit microcontrollers in c exploring the pic32" after that i just using pdf files from microchip site.
     
  11. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    I have been using PIC processors for literally decades now, and despite their quirks I like the product line. You can go from tiny 5 pin SOT devices to 100 pin quad packs so they scale big and small nicely.

    Picking which family of chips to start is importaint so you don't have to learn new tools and buy new programmers.

    I don't like the programmer you chose for several reasons: it does not state it works with MPLAB and it doesn't seem to do in circuit debugging. A PICkit will, and you can get them off EBay for little money. They may be clones but mine seems to work.

    Next, no matter which processor you choose get one already pre built and tested with a set of tutorials. There are so many things that can go wrong you will appreciate the training wheels when starting out. How I wish I had that!

    Start with doing the simple things, light a led, push a button, read a pot. They you have a firm base to start doing more complex things.

    Up top of this sub forum there is a Link to a gold mine of info for PICs and I think somewhere near the end I have a link to Microchips development kit (programmer and development board and tutorials) that I think is a great pace to start.


    If you can't find that link ping me and when I have time at home I can find that link again.
     
  12. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
  13. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    Thanks Max. The DV164130 is the one I recommend. There is a similar dev board but it has a scary quad SMD device. This one is a nice clean DIP chip.

    It is $65 USD but you also get a $48 buck programmer you will need anyway. Tutorials in both C and assembly. Plus the dev board is useful by itself. I did some development work using just that, though I am capable of throwing down a working circuit in a few hours.

    Should you choose to use PIC devices that's the way I recommend going.
     
  14. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    It should also be noted that for all the various Pic development systems and example projects, the schematics and software, most in assembly and C, are available on the Picmicro site, often with all Gerber files for the board.
    Max.
     
  15. mtonge

    New Member

    Apr 19, 2016
    23
    5
    I'm an AVR fanboy. I started with the Arduino Uno rev3 board.
    This is a good recommendation if you choose to go with AVR chips. I use a USBtinyISP programmer built from a kit. There is still a lot to learn, from starting with a development board to programming standalone micro-controllers, but it is well worth the effort.
     
    djsfantasi likes this.
  16. Robin66

    Member

    Jan 5, 2016
    102
    3
    I started from scratch myself about 10yrs ago with the kit below (a bit pricey). It gave me a pretty quick and digestible introduction and allowed me to realize the world of possibilities. I wouldn't buy this now because I don't have a serial connector on my PC. However if you do it's worth considering.

    http://www.maplin.co.uk/p/pic-microcontroller-programmer-kit-k8048-n36ac

    I now have a PICKIT3 (replica for ~£20) which I use with bread-boarding. You could start off this way with a PIC16F627 chip, a few jumper wires, LEDs and resistors. I'm searching for a good starter project that shows how to wire up the PIC16F627, upload code, and watch the LEDs blink. This is defo the cheapest option, and the PICKIT3 is going to stay with you as you progress

    This is a breadboarding example


    This includes a coding example (in C, although I used asm)
     
    Last edited: Jun 16, 2016
  17. hp1729

    Well-Known Member

    Nov 23, 2015
    1,954
    219
    If you don't have a specific application in mind yet most starter kits come with tutorials on basic operations that help you get to know the capabilities of that controller. In most cases there are a thousand others on this trail before you. There are no new problems. Somebody has asked that question before you and the answers are out there.
    Starting from scratch? PIC12xxx and PIC16xxx devices are plentiful and cheap. These are good if you are already electronics savvy. There are (or were) development boards with the basic circuit for the processor and a kluge area for your circuit.
    Arduino or BASIC Stamp start you at a higher level of operation. With this level there is less "electronics" that needs to be known and you can concentrate on programming..
     
  18. m zaid

    Member

    Jan 9, 2016
    46
    5
    Test yourself blinking an LED, as in #12. I don't think there is anything more basic than this in the learning curve given microcontrollers.
    There's also a push button and a potentiometer on board you can test. Like pushing the push button turns on an LED or turning the potentiometer a little turns on an LED, a little more another LED..
    Basically, assigning a value to a special variable or register in your program, electric current flows out from a pin and lights the LED. The same current is used to control motors for example in robots.
    The pushbutton in turn closes a circuit to feed current to a pin. Accordingly, the value of another special variable or register changes which you can use in your coding. Pushbuttons are digital inputs similar to what will limit switches provide in robotic applications. Digital, so the special variable or register will only have the value of either 0 or 1.
    Accelerometers, pressure sensors, gyros are normal in robots and they output the same kind of signals a potentiometer would which is analog. For example the special variable or register can have a value of 0 to 255.
     
    Last edited: Jul 14, 2016
Loading...