PIC vs AVR

Started by upand_at_them March 19, 2004
Okay, someone recently asked me about whether to start with the PIC
or AVR microcontroller. I pretty much said, "ummmm".

Let the thread begin.

Mike

P.S. I've used both. And I'm buying an AVR Butterfly.




--- In , "upand_at_them" <upand_at_them@y...>
wrote:
> Okay, someone recently asked me about whether to start with the PIC
> or AVR microcontroller. I pretty much said, "ummmm".
>
> Let the thread begin.
>
> Mike
>
> P.S. I've used both. And I'm buying an AVR Butterfly.


I've been looking at both.

8 pin PIC is lower in price - > advantage PIC

USB is easier in AVR - > advantage AVR

Larger AVR's with ADC cost less than similar PIC's - > advantage AVR

This forum is easier than the AVRFreaks (much easier) -> Advantage PIC

The AVR line, the entire AVR line can share one program from chip to
chip without rewriting code. HUGE advantage AVR.

anybody see a similarity to ping pong ?

Dave



It really depends on what they are wanting to do with
microcontrollers. If its small stuff - logic replacement, for
example, then I'd say PIC. If they want to do significant SW
development, AVR. somewhere in the middle, flip a coin.

I'm going through this whole issue now. The bulk of my
microcontroller experience is in PIC (10K lines of assembly code, 10
PCBs designed/built) vs a few hundred lines of AVR and one board
layout.

The AVR instruction set seems to be much more logical and usable.
PIC instructions are very clunky by comparison. I sure do hate the
btfss/c instructions and the assorted gymnastics you have to do. the
page and bank architecture is a complete mess on the PIC. What were
they thinkin when they came up with PCLATH?

In the AVR board (mega16) I layed out, the first joy was that the
ICSP pins are all right next to each other making it really easy to
add in the connector with out making routing harder like on the PIC.
That may be a small thing but it goes to the thoughfullness of the
designers.

It seems that AVR resources are more fully featured. The PIC seems
spartan by comparison. For example, timers can count up or down on
the AVR. Just up (int on overflow) on the PIC. a small matter to
adjust for but this is but one example. PWM on the AVR is very full
featured for another example.

The development environment of the PIC is outstanding, though. and
there is a vast support network, sample code and designes. AVR
isn't bad but it has a ways to go to meet the PIC. Microchip has
done a great job of putting together a lot of apnotes on a broad
variety of topics. Atmel has a far smaller number. This is
important as they give a developer a good starting point. However,
this could be changing. the Atmel butterfly looks like a very
interesting and cheap product to experiment with. at $20 with an LCD
display and a number of pins that can be brought off the card its a
potentially fantastic trainer.

Overall, I will probably keep using both for a while. I still think
the PIC is far cheaper to build with and easier to get started on
than the AVR. I just cringe when I write PIC ASM.

Phil --- In , "Dave Mucha" <davemucha@j...> wrote:
> --- In , "upand_at_them"
<upand_at_them@y...>
> wrote:
> > Okay, someone recently asked me about whether to start with the
PIC
> > or AVR microcontroller. I pretty much said, "ummmm".
> >
> > Let the thread begin.
> >
> > Mike
> >
> > P.S. I've used both. And I'm buying an AVR Butterfly. > I've been looking at both.
>
> 8 pin PIC is lower in price - > advantage PIC
>
> USB is easier in AVR - > advantage AVR
>
> Larger AVR's with ADC cost less than similar PIC's - > advantage AVR
>
> This forum is easier than the AVRFreaks (much easier) -> Advantage
PIC
>
> The AVR line, the entire AVR line can share one program from chip
to
> chip without rewriting code. HUGE advantage AVR.
>
> anybody see a similarity to ping pong ?
>
> Dave





> (PIC versus AVR)

let's add some more (no flames please):

- 16 Mhz AVR is 16 MIPS, 40 MHz PIC is only 10 MHz (but: 30F, SX)
- choice of flash PICs is much wider than AVRs (forget non-flash PICs)
- free GCC C compiler for AVRs

Wouter van Ooijen

-- -------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products



I have no direct experience with AVR, but do with others. My concern
is ruggedness, not ease of programming. All my products most are
outside, sell with a basically unconditional(direct hit by lightning,
not counted, etc.) warranty. Since using the PIC and a few other
tricks, in 10 years, not one return.

Chad

--- Phil <> wrote:
> It really depends on what they are wanting to do with
> microcontrollers. If its small stuff - logic replacement, for
> example, then I'd say PIC. If they want to do significant SW
> development, AVR. somewhere in the middle, flip a coin.
>
> I'm going through this whole issue now. The bulk of my
> microcontroller experience is in PIC (10K lines of assembly code, 10
> PCBs designed/built) vs a few hundred lines of AVR and one board
> layout.
>
> The AVR instruction set seems to be much more logical and usable.
> PIC instructions are very clunky by comparison. I sure do hate the
> btfss/c instructions and the assorted gymnastics you have to do. the
>
> page and bank architecture is a complete mess on the PIC. What were
> they thinkin when they came up with PCLATH?
>
> In the AVR board (mega16) I layed out, the first joy was that the
> ICSP pins are all right next to each other making it really easy to
> add in the connector with out making routing harder like on the PIC.
>
> That may be a small thing but it goes to the thoughfullness of the
> designers.
>
> It seems that AVR resources are more fully featured. The PIC seems
> spartan by comparison. For example, timers can count up or down on
> the AVR. Just up (int on overflow) on the PIC. a small matter to
> adjust for but this is but one example. PWM on the AVR is very full
> featured for another example.
>
> The development environment of the PIC is outstanding, though. and
> there is a vast support network, sample code and designes. AVR
> isn't bad but it has a ways to go to meet the PIC. Microchip has
> done a great job of putting together a lot of apnotes on a broad
> variety of topics. Atmel has a far smaller number. This is
> important as they give a developer a good starting point. However,
> this could be changing. the Atmel butterfly looks like a very
> interesting and cheap product to experiment with. at $20 with an LCD
>
> display and a number of pins that can be brought off the card its a
> potentially fantastic trainer.
>
> Overall, I will probably keep using both for a while. I still think
> the PIC is far cheaper to build with and easier to get started on
> than the AVR. I just cringe when I write PIC ASM.
>
> Phil > --- In , "Dave Mucha" <davemucha@j...> wrote:
> > --- In , "upand_at_them"
> <upand_at_them@y...>
> > wrote:
> > > Okay, someone recently asked me about whether to start with the
> PIC
> > > or AVR microcontroller. I pretty much said, "ummmm".
> > >
> > > Let the thread begin.
> > >
> > > Mike
> > >
> > > P.S. I've used both. And I'm buying an AVR Butterfly.
> >
> >
> > I've been looking at both.
> >
> > 8 pin PIC is lower in price - > advantage PIC
> >
> > USB is easier in AVR - > advantage AVR
> >
> > Larger AVR's with ADC cost less than similar PIC's - > advantage
> AVR
> >
> > This forum is easier than the AVRFreaks (much easier) -> Advantage
> PIC
> >
> > The AVR line, the entire AVR line can share one program from chip
> to
> > chip without rewriting code. HUGE advantage AVR.
> >
> > anybody see a similarity to ping pong ?
> >
> > Dave


=====
My software has no bugs. Only undocumented features.

__________________________________



I had to add one more that is a real peeve of mine. The PIC has but
one sleep level. The AVR looks to have significantly more levels of
sleep/power saving. The PIC is brute force and, in many cases, too
much so.

--- In , "Wouter van Ooijen" <wouter@v...>
wrote:
> > (PIC versus AVR)
>
> let's add some more (no flames please):
>
> - 16 Mhz AVR is 16 MIPS, 40 MHz PIC is only 10 MHz (but: 30F, SX)
> - choice of flash PICs is much wider than AVRs (forget non-flash
PICs)
> - free GCC C compiler for AVRs
>
> Wouter van Ooijen
>
> -- -------
> Van Ooijen Technische Informatica: www.voti.nl
> consultancy, development, PICmicro products





Technical point. Sleep is sleep, minimum power is minimum. Most of
the peripherals of the PIC can be up or down during sleep or operation,
your choice of power usage in both modes. :-)

Chad
--- Phil <> wrote:
> I had to add one more that is a real peeve of mine. The PIC has but
> one sleep level. The AVR looks to have significantly more levels of
> sleep/power saving. The PIC is brute force and, in many cases, too
> much so.
>
> --- In , "Wouter van Ooijen" <wouter@v...>
> wrote:
> > > (PIC versus AVR)
> >
> > let's add some more (no flames please):
> >
> > - 16 Mhz AVR is 16 MIPS, 40 MHz PIC is only 10 MHz (but: 30F, SX)
> > - choice of flash PICs is much wider than AVRs (forget non-flash
> PICs)
> > - free GCC C compiler for AVRs
> >
> > Wouter van Ooijen
> >
> > -- -------
> > Van Ooijen Technische Informatica: www.voti.nl
> > consultancy, development, PICmicro products


=====
My software has no bugs. Only undocumented features.

__________________________________




--- In , "Phil" <phil1960us@y...> wrote:
> I had to add one more that is a real peeve of mine. The PIC has
but
> one sleep level. The AVR looks to have significantly more levels
of
> sleep/power saving. The PIC is brute force and, in many cases,
too
> much so.

Take a look at the newer PIC chips with "nanoWatt technology".



--- In , Chad Russel <chadrussel@y...> wrote:
> Technical point. Sleep is sleep, minimum power is minimum. Most
of
> the peripherals of the PIC can be up or down during sleep or
operation,
> your choice of power usage in both modes. :-)

How about turning off the core but leaving the peripherals clocked
rather than turning everything off? Oh wait, I guess we can do that
now with chips such as the 18F1320. :)

That is a handy mode for battery powered circuits which will
broadcast periodically via RF transmitter. Full sleep most of the
time. Then when it's time to broadcast you can go into the light
sleep between the bytes being pushed to the USART. After the
transmission is complete then go to deep sleep again. Maximize that
battery...


I think you still can't run on chip timers in sleep mode

--- In , "Scott Lee" <midl_man@y...> wrote:
> --- In , "Phil" <phil1960us@y...> wrote:
> > I had to add one more that is a real peeve of mine. The PIC has
> but
> > one sleep level. The AVR looks to have significantly more levels
> of
> > sleep/power saving. The PIC is brute force and, in many cases,
> too
> > much so.
>
> Take a look at the newer PIC chips with "nanoWatt technology".