DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: moosapotamus on April 17, 2007, 11:12:08 AM

Title: PIC versus AVR
Post by: moosapotamus on April 17, 2007, 11:12:08 AM
I tried the search function in just the Digital & DSP forum and got only two links for "PIC" and zero links for "AVR"! So, anyway...

I'm interested in learning how to implement digital audio and audio control applications. But, I'm also interested in messing with some non-audio ( :o ) stuff like real time clocks with alarms and relays and stuff. So, I'm trying to decide where to get started, but feel like I'm going in circles trying to decide between PIC and AVR. Does anyone know where a straight-up comparison of the pros and cons and capabilities of each can be found?

Thanks
~ Charlie
Title: Re: PIC versus AVR
Post by: R.G. on April 17, 2007, 11:45:08 AM
You'll find that the person telling you which is better is telling you about the one they like. They're both seen through the lens of the person's preferences.

I prefer the PIC family. It's my prejudice. Others prefer AVR.

You will love whichever one you marry.
Title: Re: PIC versus AVR
Post by: moosapotamus on April 17, 2007, 01:29:33 PM
Well then I guess it's time to make the commitment. :-*

Thanks
~ Charlie
Title: Re: PIC versus AVR
Post by: puretube on April 17, 2007, 04:10:46 PM
maybe you`ll marry the one you love?  :icon_biggrin:
Title: Re: PIC versus AVR
Post by: Thomas P. on April 17, 2007, 04:21:31 PM
have PIC's ISP possibility? I know AVR's do and I really like that feature...
Title: Re: PIC versus AVR
Post by: R.G. on April 17, 2007, 04:36:50 PM
Quotehave PIC's ISP possibility? I know AVR's do and I really like that feature...
Yes, they do.

The biggest real distinctions I can find are that
(a) PICs have tougher I/O pin structures and seem to do well in a less quarded environment
(b) AVRs are somewhat faster; the exact comparison is hard to make.
(c) PICs have a longer history and more free pre-written software and designs available
(d) AVRs may have an edge in high level language use; again, hard to quantify.

They both have a range of integrated peripherals for all the common things you'd need.
Title: Re: PIC versus AVR
Post by: Thomas P. on April 17, 2007, 05:17:24 PM
well, it's likely to be a matter of personal taste...
Title: AVR! AVR!
Post by: RaceDriver205 on April 17, 2007, 11:24:10 PM
With AVR you can get a free C compiler. Thats a REALLY good thing  ;).
You also have RD205s awesome AVR programming from scratch guide:
http://www.geocities.com/race_driver205/guide.pdf (http://www.geocities.com/race_driver205/guide.pdf)
Thats a good thing too  ;D
Title: Re: PIC versus AVR
Post by: The Tone God on April 18, 2007, 01:53:34 AM
Releaize this is one of those "holy war" topics that cannot be resolved. Its akin to asking infamous "Whats the best ___ ?" questions here. The answer is what fits your needs. Do alot of research for both sides. Both series have pros and cons.

I myself have used both. I choose AVR because it fits me. To add I also have some intro articles for AVRs and C on my site.

Andrew
Title: Re: PIC versus AVR
Post by: RaceDriver205 on April 18, 2007, 04:54:54 AM
Can't be resolved?! I declare Jihad! :D
Title: Re: PIC versus AVR
Post by: Dave_B on April 18, 2007, 09:49:59 AM
I'm using assembler on the AVR platform these days.  Having used both, I find AVR's easier to work with.  The main reason for me is the way PIC memory is set up in pages.  It's been awhile, so 'pages' may not be the right term.  Dealing with that was just one more potential nuisance to consider when debugging. 

It's been mentioned here before: Whichever way you go, consider a platform that allows you to debug.  I'm using debugWire with an Atmel Dragon right now and it's really a big leap from poking around in the simulator and the STK500.  The fact that it's $50 is mindblowing, even though it doesn't work with all chips and you need a few extra things to get it going (cables & jumpers).
Title: Re: PIC versus AVR
Post by: moosapotamus on April 18, 2007, 10:14:05 AM
Thanks for all the additional replies! Cool... more stuff to read and mull over. 8)

Quote from: puretube on April 17, 2007, 04:10:46 PM
maybe you`ll marry the one you love?  :icon_biggrin:

Hmmm... Maybe I'll need to fool around a while before I find the one I love. ;)

Quote from: The Tone God on April 18, 2007, 01:53:34 AM
To add I also have some intro articles for AVRs and C on my site.

I've been reading through your articles, Andrew. Good stuff, and very helpful. I really appreciate all the work you've put in to that. Thanks!

It's been quite a while since I wrote any Fortran or Pascal ( :P ), but I think I like the idea of learning C and using compiler instead of working directly with assembler.

This article looks like a pretty good intro, too (although I haven't had time to read it thoroughly, yet)...
http://www.ucpros.com/work%20samples/Developing%20Embedded%20Systems-%20A%20Tools%20Introduction.htm

And, those folks seem to offer some interesting (hardware) products, too...
PIC Programmers - http://microcontrollershop.com/default.php?cPath=112_97
AVR Programmers - http://microcontrollershop.com/default.php?cPath=110_53

One of the things they offer is a STK500 compatable programmer...
http://microcontrollershop.com/product_info.php?cPath=110_53&products_id=585

... Why would you need something like that if you already have a STK500? I though the STK500 was already a programmer, yes/no?

Quote from: Dave_B on April 18, 2007, 09:49:59 AM
Whichever way you go, consider a platform that allows you to debug.

Yeah, I think debugging would be a must-have for someone like me who is just getting started. The Dragon sounds like a good way to go for AVRs. Is there anything comprable in the PIC world?

Thanks!
~ Charlie
Title: Re: PIC versus AVR
Post by: Dave_B on April 18, 2007, 11:50:28 AM
Quote from: moosapotamus on April 18, 2007, 10:14:05 AM... Why would you need something like that if you already have a STK500? I though the STK500 was already a programmer, yes/no?
I'm not sure what that even means.  Maybe AVR Studio recognizes it as an STK500? 
Title: Re: PIC versus AVR
Post by: Chuck on April 20, 2007, 07:17:19 AM
Although I've used both the AVR and the PIC -- I got into MIDI programming using the boards and code found at www.ucapps.de.
The boards are very stable and there's lots of help on the forum.
You don't need a programmer because you can use the MIDI interface to upload the code to the chip.

I still occasionally use the boards for prototypes because its fast and easy.
But you can't commercially market that work.  Its just for fun.

The matrix switch mockup I've been using on the other thread uses the midibox board for the prototype.

I've also built a MIDI controlled delay using that board set and several digitally controlled pots.

Chuck
Title: Re: PIC versus AVR
Post by: The Tone God on April 20, 2007, 03:16:48 PM
Quote from: moosapotamus on April 18, 2007, 10:14:05 AM
... Why would you need something like that if you already have a STK500? I though the STK500 was already a programmer, yes/no?

The STK500 is a programmer. Some people just want the a programmer with none of the on board development stuff the STK500 has. Its just a personal choice.

The term "STK500 compatible" usually means that the programmer uses the STK500 protocol (which is published publicly by Atmel) to communicate between the computer and the programmer. Other programmers need specific software to program the uC. Many home build programmers are like this.

In this case I think the "STK500 compatible" term means that the board can be used with the STK500 through the STK500 headers. Just a guess though as it seems to need a different piece of software to program the uC. I think the idea is that you can still use the development portion of the STK500 not having to interface with the on board programmer. I don't see any real advantage to that for most people.

Quote from: moosapotamus on April 18, 2007, 10:14:05 AM
Yeah, I think debugging would be a must-have for someone like me who is just getting started. The Dragon sounds like a good way to go for AVRs. Is there anything comprable in the PIC world?

Just from my recent light poking around the uC scene I have not seen anything even closely comparable to the Dragon for PICs with that price to feature ratio. Atmel really blows alot of the competition, not just PICs but other platforms as well, away with the Dragon.

A debugger can save you days of work in some projects. I love my Dragon. If I was starting out now I would have probably bought a Dragon instead of the STK500 since I do alot of development on breadboards anyways.

Andrew
Title: Re: PIC versus AVR
Post by: Dave_B on April 20, 2007, 10:06:21 PM
Um... you guys might want to search Digikey for AVRDEVKIT1-ND.   :icon_eek:
Title: Re: PIC versus AVR
Post by: RaceDriver205 on April 20, 2007, 11:34:46 PM
If you live in Aus, I noticed a good place to buy programmers here:
http://www.dontronics-shop.com/ (http://www.dontronics-shop.com/)

They also sell cheap full-colour LCDs designed for microcontrollers:
http://www.dontronics-shop.com/home.php?cat=263 (http://www.dontronics-shop.com/home.php?cat=263)
Quite amazing!
Title: Re: PIC versus AVR
Post by: Chuck on April 21, 2007, 06:37:27 AM
LCDs in the US is http://www.sparkfun.com/commerce/categories.php?cPath=76

RaceDriver, I didn't realize you were from OZ.
Title: Re: PIC versus AVR
Post by: The Tone God on April 21, 2007, 05:03:26 PM
Quote from: Dave_B on April 20, 2007, 10:06:21 PM
Um... you guys might want to search Digikey for AVRDEVKIT1-ND.   :icon_eek:

WOW! If there ever was time to start it is now!

Andrew
Title: Re: PIC versus AVR
Post by: Chuck on May 16, 2007, 02:34:22 PM
So you guys know, Digikey is shipping the avrdragon again.
It was out of stock for a while, but I had one on back order and just got a ship notification.
AVRDEVKIT1-ND  $49.95


Chuck
Title: Re: PIC versus AVR
Post by: ExpAnonColin on May 16, 2007, 05:27:34 PM
Oddly enough I was just talking to a professor and a TA about this topic earlier today and was coming here to see if anyone had commented on it.  Sure enough, second post down.  I'm going to go with AVR - I've used only PICs before, but the AVRs have so much pull due to the existance of a free compiler and cheap development platforms.  Also, I can program them natively in OS X, rather than boot camping into Windows XP.  I feel like, in some ways, PIC's are more on the windows side of the open/closed source dichotomy while AVR's are on the linux side.  At any rate, from a hobbyist's standpoint, it certainly seems like AVR is the way to go.  Though I will probably get a programmer for both!

-Colin
Title: Re: PIC versus AVR
Post by: RaceDriver205 on May 16, 2007, 07:18:52 PM
Yep AVRs the best
Title: Re: PIC versus AVR
Post by: Dave_B on May 16, 2007, 11:38:15 PM
Quote from: Chuck on May 16, 2007, 02:34:22 PM
So you guys know, Digikey is shipping the avrdragon again.
It was out of stock for a while, but I had one on back order and just got a ship notification.
AVRDEVKIT1-ND  $49.95
Chuck
So you got it bundled with the STK500, right?  That's a fantastic deal.
Title: Re: PIC versus AVR
Post by: The Tone God on May 17, 2007, 12:57:40 AM
Quote from: Dave_B on May 16, 2007, 11:38:15 PM
So you got it bundled with the STK500, right?  That's a fantastic deal.

Sounds like it. I think I may get one too.

Andrew
Title: Re: PIC versus AVR
Post by: Dave_B on May 18, 2007, 09:32:53 AM
You have both already, right?  I can see wanting a backup since it's not impossible to smoke them, but do you suppose they're clearing inventory for the next version?
Title: Re: PIC versus AVR
Post by: The Tone God on May 18, 2007, 04:03:15 PM
Quote from: Dave_B on May 18, 2007, 09:32:53 AM
You have both already, right?  I can see wanting a backup since it's not impossible to smoke them, but do you suppose they're clearing inventory for the next version?

Yes I have both plus a few other bits. I thought until recently that I might have damaged my Dragon as I was having problems with it. I thought this might be a good chance to replace it cheap. Turns out my Dragon, or atleast the important parts that I use, are ok. There have been reports of problems with some people blowing their Dragons probably mostly by static mis-handling. I thought a back up might be handy just to be safe especially at that cost. Maybe even configure it differently then my current Dragon which has certain headers and sockets soldered in.

Atmel has a history of running great deals on their development gear to encourage people to give them a try. So it could be one of those surprise sales or this might be a case of Atmel trying to clear out their STK500s. There have been rumours of a newer STK500 version coming out. At first it was being called the STK500X but now it looks like it's name is going to be STK600. I haven't heard anything definitive or official though about it so this is all speculation.

On a side note I noticed the new line of 14 pin AVRs are now shipping. :)

Andrew