EEVblog Electronics Community Forum

General => General Technical Chat => Topic started by: Simon on March 26, 2010, 02:22:27 pm

Title: PIC / AVR showdown: which should I use ?
Post by: Simon on March 26, 2010, 02:22:27 pm
Ok now I'm not after starting a fight, but after daves PIC versus AVR blog I got thinking, I have a power management project for vehicles that requires an ADC and PWM output, as it is for a car which has an ever constant variation in operating conditions it needs to operate quikly to adapt, a 12F615 @ 8 MHz just handled this but I wanted to make it a bit more robust, would an AVR uC be better for this sort of thing ? I remeber Dave saying in his blog that AVR's are more efficient although who cares because of the speed of any uC anyhow, well in my case it is the determining factor.

OK so please a civil discussion about this  ;)
Title: Re: PIC / AVR showdown: which should I use ?
Post by: armandas on March 26, 2010, 06:24:45 pm
I'd like to restate what Dave said: it does not matter. You already got a PIC, and since you run it at only 8 MHz, I'd say get a faster clock.

Get an AVR, when you're ready for something new.
Title: Re: PIC / AVR showdown: which should I use ?
Post by: Simon on March 26, 2010, 06:30:33 pm
the faster the pic runs the higher the minimum PWM frequency is, idealy I need a 125 Hz PWM output but can settle for 250, but that means running the pic at 4 MHz, my thought was if the pic takes 4 cycles / instruction and the AVR takes 1 then in a similar situation with the AVR I would have the same PWM frequency but effectively 4 time the code speed,

after looking into it a bit more I think that I may be able to pull it off with a pic which is the best was as I already have the pic's and the programmer and the knowledge needless to say I have already developed the program.
Title: Re: PIC / AVR showdown: which should I use ?
Post by: David on March 26, 2010, 06:56:59 pm
If you want a quick way to produce a faster clock, use the internal PLL (If its supported).

Dave
Title: Re: PIC / AVR showdown: which should I use ?
Post by: Simon on March 26, 2010, 07:04:53 pm
how do I do that ? are you refering to chips like the 18F1220 that has a X4 PLL, will the PWM run off the crystal clock and the pic core off the PLL simulataneously ?, if I increase the clock in other devices like the 12F615 I now use the PWM minimum frequency also increases.
Title: Re: PIC / AVR showdown: which should I use ?
Post by: Anders on April 04, 2010, 06:17:24 pm
I tried AVR’s when I started with micros a few years ago but I found the ADC’s much too slow for many apps. I have used PIC’s ever since and I don’t look back. Hopefully the AVR ADC’s have improved since then but I’m not sure.
Title: Re: PIC / AVR showdown: which should I use ?
Post by: Simon on April 04, 2010, 06:25:52 pm
well I'm already pic prepared so might as well stick with them