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.

AVR better than PIC?

Status
Not open for further replies.

patroclus

New Member
I' ve been working a bit with 16F84 and 16F628 for some time.
I've heard that AVR from atmel is much better microcontroller, and faster. I'm working on frequency circuits now, do you think it worths the effort learning AVR and start using it??
 
patroclus said:
I' ve been working a bit with 16F84 and 16F628 for some time.
I've heard that AVR from atmel is much better microcontroller, and faster. I'm working on frequency circuits now, do you think it worths the effort learning AVR and start using it??

It's really up to you!, the PIC is more popular than the AVR, mostly because it was first - the AVR (even the three letter name) was an obvious attempt by Atmel to cash in on MicroChip's PIC market share.

The AVR might be slighter faster, but 'better' is a very subjective term, also what do you mean by 'frequency circuits'?. In general, there's not much an AVR can do that a PIC can't - and usually untimate speed isn't a consideration - most micro-controller programs spend most of the execution time spend in loops wasting time.

From my personal view point, I was already using PIC's well before Atmel entered the scene - I considered starting using them as well, but decided against it, I really didn't see any need.
 
I need high speed. My project is about high rate sampling. Most PICs run at 10 Mhz or 20 Mhz but take 4 cycles to run a single instruction. AVR get up to 10MIPS, whil most 16F84/628 get around 2,5-5 MIPS.
 
AVR's will get upto 16MIPS (there are 16mhz ones).
They also have a far bigger instruction set and a more efficient design, so you can do more with less instructions.

But I still use pic's, 'cause i have tons of 'em lying around :lol:
 
patroclus said:
I need high speed. My project is about high rate sampling. Most PICs run at 10 Mhz or 20 Mhz but take 4 cycles to run a single instruction. AVR get up to 10MIPS, whil most 16F84/628 get around 2,5-5 MIPS.

Yes, at 20MHz a PIC will do 5MIPS, but an 18Fxxx series PIC will do 10MIPS using an external 10MHz crystal - it uses a PLL to give a 40MHz internal clock. The 18F series are also 'high end' PIC's, they have an extended RISC instruction set (55 instructions) - including hardware multiply. The 16F series are 'mid range' with 36 instructions, the older 'low end' series (like the 12C508) only have 33 instructions.

I've never studied the AVR instruction set, do the instructions take varying numbers of instruction cycles to execute? - the low and mid PIC ranges take only one cycle, except for branches which take two.
 
AVR instruction times also vary.

Most instructions take 1 cycle, but branches take more (because the adress needs to be pushed/popped on the stack).
 
They are the best choice if you want to program in C.
There's an excellent free C compiler for them. (acrgcc if i remember correctly). Also to be found on AvrFreaks.
 
I have developed with both PICs and AVRs. I like the AVRs better mainly due to the availability of gcc for the AVR. But the pic has a much larger user base and more example applications floating around. It is both a personal and an application choice.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top