AVR vs PIC

Go To Last Post
29 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

 

What do you think about AVR vs PIC? :)

--_--

Last Edited: Wed. Jan 25, 2017 - 02:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OP is trying to start a flame war! ???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

ki0bk wrote:

OP is trying to start a flame war! ???

Maybe not intentionally atleast, but i can hear the sound of battle-axes and shields, coming to this direction.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR = PIC now, they are all owned by Microchip so it's no longer a contest.

 

As to which is "best" it's a bit like asking which is best among Ford, GM, BMW and Toyota. It kind of depends what you are looking for in a car or a micro.

 

AVR are classy and relatively expensive

PIC are cheap and cheerful.

 

if you were building 5 million  of something the $0.10 you save per unit using PIC might warrant the use of it. If you want a nice design that's easy to use and only plan to build 5 items then there's a strong chance you'll have a more fun time with AVR.

 

In this day and age if you really want to put the cat among the pigeons the broader question to ask might be:

 

AVR vs PIC vs ARM-Cortex

 

PS the way I read Freaks i never normally notice which forum someone has posted in but I cannot help noticing you posted this in "Tutorials". While it could be argued that you are trying to teach the world something I guess, it's not really a tutorial so I'll move this thread. (moderator)

Last Edited: Wed. Jan 25, 2017 - 02:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

OP is trying to start a flame war! ???

 

 

JoniS wrote:
ki0bk wrote:

OP is trying to start a flame war! ???

Maybe not intentionally atleast, but i can hear the sound of battle-axes and shields, coming to this direction.

 

 

I' m just asking ahahha :) I should choose PIC orAVR and continue the journey.

 

I think AVR has more powerful hardware features that PIC. What do you think? :)

--_--

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Each has it's strengths and weaknesses (like Fords and BMWs !)

 

So it kind of depends what you are looking for.

 

For example I was once looking for an 8bit micro with a USB interface in a DIP package. Microchip PIC have some models, Atmel AVR don't.

 

So it really depends on what features you are looking for.

 

If it's just a general micro to learn about programming microcontrollers then I think most people would start with an Arduino board of some sort these days and that probably means an AVR in fact.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have been working with Arduino for 2 years and it was very easy

After that I heard the very complicated PIC and AVR that were very complex according to Arduino.

I want to learn PIC or AVR but I can't choose.

 

In addition :

Atmega328p == PICXXX ??

 

Thank You

--_--

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But an Arduino *IS* an AVR CPU ?!?

 

If you own an Arduino then if you want to learn more about how the peripherals work just write direct to the Special Function Registers rather than using library functions. So instead of something like:

void Setup() {
    Serial.begin(9600);
}

You could do something like:

void Setup() {
    UBRR = 103;
    UCSR0B = (1 << TXEN0) | (1 << RXEN0);
}

etc.

 

It's not completely identical but it's very similar to what is "hidden" in the Serial class library code. You can do this same direct hardware access to all the other peripherals too if you want to learn about them in more detail.

 

What's more you don't have to stick with the Arudino IDE and its way of building code if you don't want to. You could move to Atmel Studio 7 and build your 328 code that way instead (so setup() and loo() would disappear). The only complication of doing this is how you then get the .hex file you build into the Arduino board. But you can easily invoke avrdude.exe to do this as thousands of internet tutorials show.

 

So it's not really an AVR vs PIC choice at all. You already have a very capable AVR (mega328p) based board so just use that to go further but drop the reliance on Arduino library calls if you want to learn about stuff in more detail.

 

(if you stick with Arduino (IDE and libaries) you can, of course, "mix and match", continue to use library code for some things but revert to using direct register access just for one peripheral at a time as you learn about it).

 

As I said above the reason (mainly) people choose PICs is not because they are "easier" to program or something (actually there's an argument to say they are more difficult) but it's because PICs cost a few cents less in huge volumes so for things like consumer electronics it can help to make more profit, even if it does require a bit more work on the part of the programmer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AEVXR8 wrote:

I think AVR has more powerful hardware features that PIC. What do you think? :)

 

These days you are 100% wrong. The newer PICs have much more powerful peripherals than the AVRs.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AEVXR8 wrote:

Atmega328p == PICXXX ??

 

There are many to choose from but probably something like the PIC18F25K40.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AEVXR8 wrote:

I want to learn PIC or AVR but I can't choose.

 

Then don't; a good embedded designer will be able to use either.

 

What matters is not the uC you choose but the design of the software.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, that is the ideal view of things. It is generally true for the MCU but not at all true for peripherals With the peripherals, you have to deal at the register level, and that means that you have to understand how things work. To me, the PICs I looked at (typically 16F...) seemed more convoluted, with a less logical arrangement of the bits in the registers (in some cases). Understand, however, that this was my interpretation of things after just a very cursory look. You mileage will probably vary a LOT.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

AEVXR8 wrote:

I want to learn PIC or AVR but I can't choose.

 

Then don't; a good embedded designer will be able to use either.

 

What matters is not the uC you choose but the design of the software.

+1000000000.........

 

In this day and age you cannot simply stock with knowing one processor or family and expect to be successful.  I have lost many projects because I just did not want to deal with the PIC.  NOW with things the way they are I forced myself to look at them again, and see that they have offerings that the AVR does not.

 

Now I need to hunker down and get an LED blinking, or a binary counter going on a SAMD21 to get me into the new millennia....

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AEVXR8 wrote:
I want to learn PIC or AVR but I can't choose.

Brian Fairchild wrote:
Then don't; a good embedded designer will be able to use either.

 

What matters is not the uC you choose but the design of the software.

jgmdesign wrote:

+1000000000.........

Absolutely!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

You need to understand the principles of what's going on - then you can apply that to whatever make & model of microcontroller fits the bill

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the mid 1990s, the PIC came first and was the first cheap and available CPU with user-reprogrammable flash program memory.  Previous CPUs required external EPROM chips to hold the programs and they were difficult and awkward to work with.  However the early PICs had very primitive instruction sets and no C free/cheap/easy C compilers.

 

The first AVRs had user-reprogrammable flash program memory, a cheap/DIY/easy device programmer, and an advanced instruction set (that is basically unchanged to this day) for about the same price.   Later PICs got advanced peripherals, and a more flexible instruction set.  They would have supplanted the AVR except the PICs had no cheap/DIY/easy device programmer and the AVR was already being used in automobiles by the millions.

 

In the 2000s, the Arduino movement combined all the functions of embedded-systems programming into a cheap/easy/DIY system where the basics of programming could be easily learned while at the same time all the advanced features of free GNU AVRGCC C++ programming were available for professionals on AVR Arduino modules.  Finally Arduino clones using the cheap and reliable CH340 USB IC started appearing on eBay at very cheap prices.  PIC's parent company, Microchip,  responded by simply buying Atmel (Arduino's parent company).

 

My advice is to stick with Arduino since the entire system is transferable to more advanced cheap microprocessors like the ARM Cortex M0.  Learn PIC only if someone is paying you to do so.  And even then, stick to C++ instead of assembler.   Notice the repeated use of the word "cheap".  Cheap and easy-to-use are the basic principals in the embedded-systems microcontroller business, whereas fast, and flexible are the primary guidelines in the microprocessor business.