• My first Micro - Avr Pic or x51

    Selecting your first micro controller as a newbie is really difficult as most of us have no idea which offers what , how difficult it'll be to program and other such things .Here is a little guide to help you out and get started with selecting your first uC . Here 8 bit varieties of the uC's are taken and are compared in an broad overview and not sticking to a single uC for the 3 series.

    From a newbie's point of view here are a few things that he is usually concerned with

    - Availability : The availability is a major issue here in India as most uC are available in metros only . The availability scenario is something like this x51 > PIC > AVR . x51 series has been around for about 20 years and now is available through many vendors and lots of flavors , but generally used are the 2051 , 89s52 and 89s8252 . So go for x51 if you can find any others . PIC is also relatively easy to find and the most often used is the 16f87x[x=3/4/6/7],16F628 and 16f84 . The avr is also easily available but only in metros and other major cities common ones are mega8 , at90s2313 , 8515 , mega16 , mega 128 .

    - Cost : uC is not a piece of silicon which you buy every day , decent ones will burn a hole in your pocket . So making the right choice can save you a lot of money. The scenario is something like AVR == PIC > x51 with most series of avr having a pic counterpart with similar price . but if you really want to save money the x51 will come at half the price of the starter chip by any of the other two series . x51 start around Rs 60 for 89c51 ( 4k programmable flash ) . With the AVR and PIC with there at90s2313 and 16f84 starting around Rs 130 and RS 135[16F84/16F628] respectively .

    - Programming the uC : The programmability is one of the most important features . If you are not able to build/buy/find a programmer for you uC then the uC is of no use . Here is what i have seen AVR < PIC < x51 so you see the avr series is the easiest to get up and running with the minimum effort , next is pic then x51 . Also remember most avr series support ISP ( In System Programmable ) feature which allows you to program the uC without taking it out of the circuit saving lots of time and helps not breaking you uC legs . PIC has multiple voltages for programming so you can easily end up screwing your computer ports . The 16F87X series, 16F627/28/48 supports ICSP.Programmers available within 500 Rs price range. x51 though high end ones support ISP starters require a big circuit with various voltages ( unless you have a programmer around don’t waste time building one ) .

    - Price / Features ratio : We can not compare features without price because all series have all the features you want in the various offering ( PWM , multiple UARTS , USB , ISP what not .. ) So we will take which offers what at what price . SO i found it something like this AVR > PIC > x51 . Here also AVR is the winner ATMEGA8 for examples has most of the features one would want with a price of around < Rs 200 . x51 low end series are quite plain in the extra features offered while PIC is a little expensive compared to AVR for same features .The 16F87X series, 16F627/28/48 has hardware PWMs,onboard clock,UART,comparators,multiple ADC,supports ICSP.USB support available on certain PICs.

    - Performance : Sometime your application needs to literally be fast and furious and you need speeds in Mips[Million Instructions per second] . In this the choice for you is AVR its a RISC architecture with 16 Mhz uC capable of clocking a cool 16 MIps . So its like AVR > PIC > x51 . x51 is slowest of the three and PIC usally takes 4 cycles for a instruction [hence a 4mhz PIC will run at 1MIPS] . Such power is required in applications where you need lots of speed ( USB , Web servers etc ) .

    - Hobby support and circuits : This is how much help and support is available for the various series of the uC . How many people have made there projects online . Its like x51 > pic > avr with x51 being the grand daddy being the most used and lots of projects have been done using it . PIC comes in second due to its wide availability and price/features while avr being relatively new does have a lot of help which is properly organized .

    - Open Source Tools available : If you can get a decent compiler or assembler for your uC then youll be wasting time due to the un-optimized development environment . Here is what i think AVR > x51 > PIC . AVR has some very good tools available for free with support for many languages while x51 comes in second ( It has much more tools than avr but they are not free ) and last is PIC .The PIC has C compilers like HITEC C, CCS and BASIC like PIC BASIC Complier,PIC BASIC PRO(picbasic.com)

    - Learning curve : The learning curve is how easy is it to learn a uC it goes something like AVR < PIC < x51 with AVR being the easiest to learn and PIC coming in second due to its a little cryptic instruction set . Also if u got a good easy to use programming language like c,basic with inbuilt libraries [rather than assembly],u got a ramp curve] and x51 coming last with its not so easy instruction set and usage . Please remember if you plan to read from books then the amount of written content in India for various uC is the exact opposite with most for x51 and least for avr .

    So here is what i recommend

    You need lots of features with high performance at decent price : AVR

    Availability is not much of an issue [Mumbai and B'lore have dealers for all PICs] and features required [offers ADC, USART, PWM, Comparators] but not high performance [agreed] : PIC

    You have a price limit and want to perform limited things : x51

    I hope this was helpful in selecting you first uC please post in the forums if you still have doubts .
    Comments 2 Comments
    1. Gbit's Avatar
      Gbit -
      High performance uC is not need for basic robotics applications, one can start with x51 architecture. Please check the link,I have reviewed the sessions that were discussed in the Microchip Embedded Designer Forum held at mumbai in residence hotel.By reading the post there you will get the idea about various Microchip microcontrollers and products. - http://www.aboutcomputer.org/showthread.php?t=406 Thank you!
    1. shaunakde's Avatar
      shaunakde -
      A small addition: The new AVRs are capable of running at 20MipsAlso the AVR on-line community is huge and helpful.