Continue to Site

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.

  • 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.

Atmel AVR vs PIC

Status
Not open for further replies.

Peter_wadley

New Member
Hi,

I was wondering which microcontroller set you think is better and of course WHY?

I really know nothing about Atmel AVR microcontrollers, I have seen alot of projects made by them on the internet and they seem to be alot more complex then most PIC projects I have seen..

So please share your opinion

Peter Wadley
 
Peter_wadley said:
Hi,

I was wondering which microcontroller set you think is better and of course WHY?

I really know nothing about Atmel AVR microcontrollers, I have seen alot of projects made by them on the internet and they seem to be alot more complex then most PIC projects I have seen..

So please share your opinion

Peter Wadley

I visited the Atmel booth and Microchip booth at the embedded systems conference a couple of weeks ago. I've never designed with Atmel, but I am quite familiar with uChip. Based on what I saw, they can pretty much compete with one another. The question may be which one has the better set of tools to get the development done.

Microchip also has an advantage in internet microcontrollers, as their new PIC18 can directly connect with 10B-T and has an internal TCP/IP stack. I know of no other chips that can do that.
 
Its really down the line, and comes down to device features and development software.

Put simply, I have not come across a better compiler than Swordfish. Sure its only for 18F PIC’s, but its flexibility / stability and extreme performance really puts it in a class of its own.

Many people seem to stay out of the 18F PIC realm, and put them in the "too hard" basket. You have no idea how much simpler the 18F's are, especially when used in conjunction with a decent compiler.

PIC's seem to change a lot more from model to model than AVR's, and many see it as a 'downfall'. I really disagree. This is great, and allows the end user to really work thier projects with a PIC that's jammed packed with features for the job.

You have to remember that this forum, when it comes to PIC's, is a 16F/18F based 'PIC community', and projects involving the 24/dsPIC series are far and few between. I'm yet to see one, only read about their features…

Well, if you can't tell, I'm die hard PIC... Sure the AVR's are cheaper and easier to program, but they don’t cut the mustard for me at the end of the day. You pay for what you get, and PIC’s have more features and overall bang than AVR’s.
 
I think it more comes down to what you need and what kind of resources you have availiable. I went with AVR, still have too much to learn to say its any better or worse. They take a lot of abuse, haven't destroyed one yet out of nearly 20 now. I am having a few programming problems, but haven't had as much spare time past month or so to work out the bugs. I found that most of the issues I've had, were of my own inexperience, and yet the chips survive.
 
AVR's do have an advantage in the I/O department, because they don't use a clock prescaler while pics use a divide by four clock, so the accuracy and speed of an AVR can be much higher if there is a lot of I/O going on. As far as processing ability goes they're pretty equally matched although highly optimized assembly code on an AVR will always run faster than on a PIC because the core logic instructions will execute four times faster than on a PIC due to the clock prescaler. A real world program with a lot of jumps and interrupts going on the playing field evens out very quickly excepting in the case of tightly controlled ASM loops and heavy I/O. I use AVR's myself but I think that's primarily because there are fewer devices to chose from compared to the massive army of PIC styles out there. The register file setup of an AVR is also much more intuitive to learn how to use than banking PIC registers though interrupt routines can be a little hard to code on an AVR if you have a lot of things going on.
 
Last edited:
Sceadwian said:
AVR's do have an advantage in the I/O department, because they don't use a clock prescaler while pics use a divide by four clock, so the accuracy and speed of an AVR can be much higher if there is a lot of I/O going on.

Yet another phalacy based on 16F pics..

Almost every 18F pic comes with PLL (Phase Locked Loop circuit) for users that want to multiply the frequency of the incoming crystal oscillator signal by 4. Its controllable by a couple of config settings.

If your going to base speeds on higher models, dont forget about the 24 and dsPIC series, the range is by no means 'limited' to 16F's.
 
An AVR running at 16Mhz runs at 16MIPS max.
So that means an 18F would have to be running at 64mhz in order to get the same MIPS. I know very little about PIC's, is 64Mhz common with the PLL of an 18F? The reason I ask and the reason I like AVR's is because EVERY AVR runs at it's clock speed without a PLL. For raw performance AVR's are simply better pound for pound.
 
MIPS isn't everything, an 18F series PIC runs as fast, or faster, than an AVR.

And considering it's EXCEEDINGLY rare to require anything near maximum speed from a micro-controller, it's a pretty pointless point to compare on.

This PIC vs AVR question comes up all the time, there's no outright winner, both have advantages, both have disadvantages - choose which you like, or use them both - it really makes very little difference.
 
Nigel Goodwin said:
MIPS isn't everything, an 18F series PIC runs as fast, or faster, than an AVR.

And considering it's EXCEEDINGLY rare to require anything near maximum speed from a micro-controller, it's a pretty pointless point to compare on.

This PIC vs AVR question comes up all the time, there's no outright winner, both have advantages, both have disadvantages - choose which you like, or use them both - it really makes very little difference.
Well said, but it's still odd that most AVRs are compared to the 30yr old PIC 14bit core and it still can hold its own. Now lets compare them to the dsPIC like the wee dsPIC30F3013 which is only $9 and has a 200ksps 12bit A/D and can run up to 30MIPs. Now that might make a for a nice DSO project.
 
If you want fast sample speeds, you could always try the**broken link removed**

It runs at 40MIPS (40 million instructions a second), and is capable of 1.1 Million ADC Samples/Second (10 Bit, 500Khz @ 12bit)

All that for $11

Creating programs for the devices is not as hard as you think. Download mikroBasic for dsPIC/24PIC, and have a look at some of the samples provided
 
Sceadwian said:
An AVR running at 16Mhz runs at 16MIPS max.
So that means an 18F would have to be running at 64mhz in order to get the same MIPS. I know very little about PIC's, is 64Mhz common with the PLL of an 18F? The reason I ask and the reason I like AVR's is because EVERY AVR runs at it's clock speed without a PLL. For raw performance AVR's are simply better pound for pound.

Almost every 18F pic runs at 10MIPS, many have internal 8Mhz oscillators allowing them to run up to 8MIPS without external devices.

For a PIC to run at 10MIPS, an external 10Mhz crystal is required, and the PLL config is enabled within the PIC
 
More like $6
It is not overkill for everything. If you get into complex stuff (like vision) it might be just the ticket.

128K bytes flash
16K bytes ram
40 Mhz CPU

Newark
1 search result found for “PIC24HJ128GP306”

56K7358 MICROCHIP PIC24HJ128GP306-I/PT 16-Bit Microcontroller IC
160 (in stock) Newark InOne 1 Each $5.80

EDIT: Mouser and DIgiKey are asking over $11 each for the same chip. I am still amazed/glad to have Newark selling popular processors in single quan at 1000 unit prices.
 
Last edited:
3v0 said:
More like $6
It is not overkill for everything. If you get into complex stuff (like vision) it might be just the ticket.

128K bytes flash
16K bytes ram
40 Mhz CPU

Thanks for the link, I had to pick my jaw up off the ground after doing some 'comparison' cost checks...

Have you ordered off these guys before? Do they list in $US ?
 
gramo said:
Thanks for the link, I had to pick my jaw up off the ground after doing some 'comparison' cost checks...

Have you ordered off these guys before? Do they list in $US ?

They have not done me wrong yet. (About 4 or 5 orders)
They are in the US.
They ship 2nd day UPS at the same price a UPS ground.

The only down side is that there web site is slow (go figure).

These people do a very good job of packaging the products. I ordered 1/8 watt resistors and each value came in a foam padded 8x11 mailer or cardboard box with form inserts. I am thinking the packaging cost several times what I paid for the resistors.
 
Their range isn’t as exhaustive (good in some ways) compared to digikey

The search features are just simply excellent - its like Digikeys search features, but with single IC's selling for 1000 quantity prices

Their prices on IC's is unbelievable, but futurlec beat them hands down for hardware etc.. That’s after a quick look though (Futurlec can take up to 1-2months on an order... not exactly for time sensitive projects)

The price gap on IC's is so large, I'll be doing split orders for sure now :eek:
 
gramo said:
Their range isn’t as exhaustive (good in some ways) compared to digikey
....
The price gap on IC's is so large, I'll be doing split orders for sure now :eek:

I split my orders between Newark and Mouser. I have found Mouser to be less expensive then DigiKey. Also if you ever need just a few parts quick Mouser does not have a min order.
 
After using PICs for several years, I decided to try an ATMega644P. This is 20MHz, 64K FLASH, several KB of RAM, and good I/O pin current supply (sink and source). After monitoring Microchip for a year it appears they will never produce the DIP40, 5V part I want: more than 16K FLASH, more than 1K RAM, with two USARTs. I build an occasional test bed at work. Two of these would have benefitted greatly with a second hardware serial port. I downloaded the free version of BASCOM-AVR (limited to 4k RAM of code) and purchased an Olimex AVR proto board from Sparkfun for about $16. I'm not giving up PICs any time soon, though.

Thanks for the tip on Newark.
kenjj
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top