go_away

Author Topic: Advantages of PIC vs AVR  (Read 2104 times)

0 Members and 1 Guest are viewing this topic.

Offline joe61Topic starter

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Advantages of PIC vs AVR
« on: March 01, 2011, 09:50:35 AM »
Since I started playing with this stuff I've only used AVR processors. However from what I've seen PICs are pretty popular too. I've been thinking about trying a PIC to broaden my horizons, but it looks like it would involve an outlay of around $100.

So before I start spending money my wife doesn't think I need to, what are the advantages of PICs? Is it more a preference, or do they offer features AVRs don't? The sheer number of PICs is a little overwhelming so some opinions would help get me pointed in the right direction.

Thanks

Joe

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
Re: Advantages of PIC vs AVR
« Reply #1 on: March 01, 2011, 10:16:11 AM »
As a user of AVR myself, I just bought a pickit2 to toy with a few days ago and it should arrive soon. I was also interested just to see what PIC offered. I'll let you know what I find as I come accross things once I get moving.

From the outside, it appears that AVR has 'higher end' (faster, more ram, more flash - cheaper) micro controllers. PIC seems to offer more features though (usb, lan, wireless - in a broader variety including lower model chips). I am just looking to expand my knowledge and use the right tool for the job now =)

A little bit of versatility never hurt anyone.
« Last Edit: March 01, 2011, 10:25:40 AM by garrettg84 »
-garrett

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,930
  • Helpful? 98
Re: Advantages of PIC vs AVR
« Reply #2 on: March 01, 2011, 12:23:33 PM »
I'm a PIC user and have not used AVR's so can't compare.
PICs do come in many varieties from 8pin to over 80 pin and 8bit, 16bit and 32 bit CPUs as well as with DSP instructions. This makes it even harder to make comparisons.
I feel that it will be the application requirements that could make one a better choice over the other.

For entertainment read this thread on the Microchip forum:
http://www.microchip.com/forums/m557011.aspx



Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Advantages of PIC vs AVR
« Reply #3 on: March 01, 2011, 07:10:58 PM »
Hi,

Since I started playing with this stuff I've only used AVR processors. However from what I've seen PICs are pretty popular too. I've been thinking about trying a PIC to broaden my horizons, but it looks like it would involve an outlay of around $100.

PICkit2 is around $35 and the cheapest controllers are 30 cents.
A PIC18 with more of memory etc. than you need can be had for around $3 to $4

The PICkit2 Starter Kit (DV164120) comes with a PICkit2, a PIC16F690 and a demo board that takes 8, 14 and 20 pin PIC's (plus cables) at $50,- for the kit. There are other PICkit2/demo board combinations at $50 as well.

There's a PIC18F Starter kit (USB Boot load, so no PICkit2) at $60,- which contains a PIC18F46J50, an OLED display and a micro-SD slot (plus a card with code) which it can boot from as well.

So you don't need $100 (unless the remainder is for brain lube  8))


So before I start spending money my wife doesn't think I need to,

Just bring it up the next time she's been shopping for shoes, clothes or make-up  :D


what are the advantages of PICs? Is it more a preference, or do they offer features AVRs don't?

They do offer some features that AVR doesn't, question is if you need those.

All the crap about which is faster or has got more memory etc. is rubbish. If your program takes say 3kB, it matters nada if the controller has got 4kB or 64kB and if you build a line follower that move a frantic 10m/s even a lowly 1MIPS core will do 100 instructions for each 1mm it moves (If speed really was an issue, there's always the XMOS 1.6GIPS chip).

I'd guess that around 99% of the users here has no need for extraordinary fast controllers and if they think they do, perhaps they should review and rewrite their code.

The quest for the highest speed controller is far more pronounced among amateurs than among professionals (where fast enough will do), so I view it more like a P'ing contest *my balls/microcontrollers are larger/faster than yours*.


The sheer number of PICs is a little overwhelming so some opinions would help get me pointed in the right direction.

Yes, there's a whole lot of of PIC's and new ones arrive all the time - luckily, as that means better options all the time (Yay, there's a new PIC10 on the way  ;D), but they have good product selectors.

Best way to go is to sit down with pen and paper.
Find out what memory size, peripherals etc. would be:
A) Absolutely needed
B) Nice to have
Then find the cheapest device that fits your demands, or perhaps get 3 different devices: small, medium and large.

As a rough sketch...
PIC10 and PIC12 are good for small projects and sub-circuits.
PIC16 have some members that are good for medium size use.
PIC18 series have devices that are good for very large projects.
« Last Edit: March 01, 2011, 09:03:00 PM by Soeren »
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: Advantages of PIC vs AVR
« Reply #4 on: March 02, 2011, 12:16:02 PM »
I use PIC's mainly at home, and the startup cost can be as low or as high as you like (basically the more you are willing to do yourself the cheaper it is).

If your computer has a serial port then you can build your own programmer for about £1.50 GBP (probably US$2.25).
If your desktop doesnt have a serial port, you can bet that there are header pins or through holes waiting for header pins on the mother board that havent been broken out into a proper port on the PC's chassis (mine was like this and my home made programmer works just fine with it).
I have since moved onto a pickit2 which was about £20 but offers USB connection so its easier to use with a netbook/laptop.

 I generally use PIC18F4520 or PIC18F4550(usb capable) they are more expensive than other PIC's (about £4.50) but have nearly every onboard peripheral that you can need along with plenty of memory. the latter can run the USB at full 90mhz speed and with the right settings can execute code at up to 40mhz. I just use a standard board to break all of the pins and peripherals out, I have a couple so I can have more than 1 project.

 When a project comes to a point of needing its own dedicated control board(as in the project is finished been developed and it needs it own board making and not just a large generalised breakout board), then I look at what on board peripherals, memory etc its using on the breakout board and choose a more realistic microcontroller (hopefully with a smaller footprint).

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
Re: Advantages of PIC vs AVR
« Reply #5 on: March 03, 2011, 09:21:40 AM »
It appears the PICKit2 programmer will actually program AVR chips as well. If you picked that up, it would seem that you could program AVR as well. I will test later and report back (unless someone else can confirm).
-garrett

 


Get Your Ad Here