1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

AVR or PIC

Discussion in 'Microcontrollers' started by beginer electroner, Aug 5, 2006.

  1. beginer electroner

    beginer electroner New Member

    Joined:
    Aug 5, 2006
    Messages:
    17
    Likes:
    0
    hello
    i'm a new member, and this is my first post.
    could anyone please tell me the main differences between the AVR nd the PIC microcontrollers,
    I've been working with the avr for a while, but I recognized that is most websites talk about the PIC ones!
    could you please advise me what I must do.
     
  2. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,668
    Likes:
    64
    Just because it's more popular doesn't mean it's any better. If you use the AVR and are used to it, you can probably use it better than a PIC. Just keep using the AVR.
     
  3. beginer electroner

    beginer electroner New Member

    Joined:
    Aug 5, 2006
    Messages:
    17
    Likes:
    0
    thank you a lot
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,208
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE

    Yes, any microcontroller is probably capable of most jobs, none is 'best', and if you already have knowledge of AVR's you may as well stick with them - unless you have a specific reason (or need) to move to something else?.
     
  6. bibinjohn

    bibinjohn New Member

    Joined:
    May 7, 2006
    Messages:
    47
    Likes:
    0
  7. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    They are both good. I use both. But the AVR seems to be easier to get running for me. But I am always playing with different PICS and you need to read all the data one them.
     
  8. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle
    lets be clear, the main advantage here is that the AVR has a free, unlimited C compiler (GCC). Other than that, the PIC software, source code, ap notes and so on blow the Atmel offering out of the water.

    personally, I much prefer the AVR instruction set for its cleanliness and regularity.

    Other points:
    - PICs are pretty rugged and take a lot of abuse. the AVR is easy to get into a state where you can't reprogram it with out removing it from the circuit (set the wrong fuse and curse).
    - there is a much larger community of PIC developers than AVR. far more free source code and circuits. Microchip has a really broad ap note library.
    - the PICs seem to have much wider chioce of chips..
    - the low pin count AVRs have a really nice single pin programming interface (2 for PICs, trust me, 1 pin can make a difference).
    - if you are programming in assembly, the AVR is a far nicer chip.

    edit: fixed wrong quote. sigh...
     
  9. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,668
    Likes:
    64
    SO in short....you must do nothing! Kind of reminds of what Captain Barbossa said to Kiera Knightley...(lol I don't even know the character's name is) in the movie.
     
  10. beginer electroner

    beginer electroner New Member

    Joined:
    Aug 5, 2006
    Messages:
    17
    Likes:
    0
    I've found that PIC is much popular, because of its instruction set,
    it has about 35 one, while AT90S2313 for example (and most AVR chips) has about 120 ones :confused:
     
  11. tmedap

    tmedap New Member

    Joined:
    Apr 8, 2004
    Messages:
    11
    Likes:
    0
    AVR is fastest, lot of possibility and easyst as PIC. For future You need
    learn C!
     
  12. hjames

    hjames New Member

    Joined:
    Jun 7, 2006
    Messages:
    677
    Likes:
    6
    Location:
    Bezerkeley, USA
    Ahh, counting the instruction set can be deceiving - reading PIC assembly tends to be .. an acquired taste compared to the AVR's which resembles standard processors. Personally I like playing with status flags as much as anyone else, but there are times when you just want to compare numbers and be done with it...
     
  13. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,208
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    Like everything, it's purely a matter of personal choice, PIC's are by far the most popular - but they have been around far longer than AVR's, and Atmel even copied the three letter name!.

    If you've ever written machine code on anything similar to the AVR?, then obviously you will find it easier - if you've never written machine code at all?, then the PIC is probably easier, and there's a lot more help available out on the net for PIC's.

    But like I said, it's personal choice!.
     
  14. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,668
    Likes:
    64
    Coffee is also an acquired taste (as far as I can tell, I just can't believe it's not since it smells so bad), and yet everyone seems to drink it!
     
  15. beginer electroner

    beginer electroner New Member

    Joined:
    Aug 5, 2006
    Messages:
    17
    Likes:
    0
    I'm now writing a learning AVR lectures,
    may be in about one month I'll put it here, which includes a practical applications you can do it by yourself.
     
  16. beginer electroner

    beginer electroner New Member

    Joined:
    Aug 5, 2006
    Messages:
    17
    Likes:
    0
    so could you please give me some links about it!
     
  17. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    Also look at bastoc.com for a BASIC compiler.
     
  18. Micro82

    Micro82 New Member

    Joined:
    Jul 18, 2006
    Messages:
    20
    Likes:
    0
    Location:
    Hull, Uk
    Hi all,

    I've been programming and using the Microchip PIC for a number years now. Although I haven’t had any experience with AVR's I much prefer the PIC.

    I've only just had to learn C for the Pic after a number of years but it’s not all that bad and in some ways it's a lot easier to use.

    E.g. Delays, Lcd routines ect ect.

    It's only when you get into the 18Fxxxx series & USB you really need to use the C compiler as I have found out myself.

    If you are new to PIC then I would suggest starting with MPASM & MPLAB, which are free to download from www.microchip.com

    All the best in what ever you decide to use.

    Pete
     
  19. eblc1388

    eblc1388 Active Member

    Joined:
    Jan 25, 2005
    Messages:
    2,228
    Likes:
    18
    Location:
    UK
    PIC or AVR? It does not has to be one over the other.

    Forget about argument of which is better. Learn PIC first(my suggestion), then learn AVR if one got the time and energy. Or, one can do it the other way round. It really make no difference.
     
  20. tmedap

    tmedap New Member

    Joined:
    Apr 8, 2004
    Messages:
    11
    Likes:
    0
  21. ThermalRunaway

    ThermalRunaway New Member

    Joined:
    Apr 9, 2005
    Messages:
    895
    Likes:
    4
    Location:
    South Wales, UK
    I started out with the 6502 for a little bit, and then quickly moved on to the Z80 which is a fantastic processor - but because it's so easy to use I find it allows you the opportunity to learn bad programming habbits ;-)

    I then moved on to the PIC and, because I've not yet found a situation where a PIC wasn't able to do a job for me, I've not bothered to change. For this reason, I couldn't possibly comment on AVRs.

    One thing that really does bug me when I'm writing programs for the PIC, is the register bank thing. The PIC uses the same memory address for different sets of registers, except that you have to select a register bank before you address them. For example, the PIC 16F84 uses 7 bits to express the address of a register. The address for Port A is 0x05, and the address for the data direction register for Port A is 0x85. These two registers are exactly 0x80 away from each other!
    Of course that would never work on a 7-bit address system, so the PIC uses register banks. You select the bank you want to use by setting a bit in the status register, and in this case if you want to write or read data from Port A you use bank 0. If you want to set the input/output settings of Port A you use bank 1. This means that you have to set or clear a bit in the status register every time you want to write to or read from registers which are in different register banks!!!

    The whole process can be quite confusing for the beginner, especially if you mess it up because you'll spend ages wondering why your program doesn't work (I've been there and done that).

    That's my only real bug-bear with PICs. Other than that I've found them to be excellent microcontrollers, and it doesn't take long to get used to the register banks really. There's a huge resource of support for them on the internet, including loads of application notes from Microchip's own website. And there are free compilers available.

    Brian
     

Share This Page