Poll

do you prefer pic or avr microcontrollers?

i use and prefer pic over avr
18 (25.4%)
i use and prefer avr over pic
26 (36.6%)
i dont care. i use whatever suits me.
24 (33.8%)
i hate pic and i love avr
3 (4.2%)
i hate avr and i love pic.
0 (0%)

Total Members Voted: 68

Author Topic: pic or avr microcontrollers?  (Read 16143 times)

0 Members and 1 Guest are viewing this topic.

Offline rickselectricalprojectsTopic starter

  • Regular Contributor
  • *
  • Posts: 188
  • Country: au
pic or avr microcontrollers?
« on: February 01, 2015, 09:11:51 am »
hi everyone!
i am sorry if there is already a poll for this but i couldn't find one so i decided to do one.
i am only asking to see (and for others to see) what is the most popular microcontroller . my guess is pic even though i like avr (sorry dave, i know you hate fanboys but i still use pic ;))
(P.S don't be to harsh because i am only 14 and i dont know everything)
thanks! :)
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: pic or avr microcontrollers?
« Reply #1 on: February 01, 2015, 10:38:08 am »
I have no experience in AVR (other than Arduino, but I don't count that) at all, but oodles in PIC, so inevitably I'm always going to use a PIC. Nothing wrong in AVR that I'm aware of, I just have enough in this head of mine already without having to deal with something else unnecessarily.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: pic or avr microcontrollers?
« Reply #2 on: February 01, 2015, 10:52:26 am »
I didn't vote because I hate both  >:D
It's 2015: time to quit messing with 8 bit controllers.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: pic or avr microcontrollers?
« Reply #3 on: February 01, 2015, 11:25:20 am »
rick...... If you follow threads here you will see there are underlying passions for various micros , its a kind of tribalism like in sport. The question 'most popular' means nothing , its like most beautiful.. as the saying goes '  its in the eye of the beholder '  I am getting on a bit in years so learning new stuff takes time and $$$ so I stick with what I think I know ...  good to see 14 year old exploring the mcu world . :-+       

PS I didnt vote love / hate ? ,  I had some great fun with my first micro an RCA1802   
« Last Edit: February 01, 2015, 02:21:50 pm by 22swg »
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9930
  • Country: nz
Re: pic or avr microcontrollers?
« Reply #4 on: February 01, 2015, 11:29:12 am »
Whats that sound in the distance?
It's the trolls, they be coming.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: pic or avr microcontrollers?
« Reply #5 on: February 01, 2015, 11:51:46 am »
AVR has a much better instruction set (if still overly simple; it's a RISC machine), which makes assembly easier but not usually necessary, and C more-or-less effortless.  PIC-C is almost a contradiction; the underpinnings of C simply can't be supported in an easy, general sense on a PIC, so you end up with all sorts of bad restrictions.

The one not on the list, ARM, is a much wider architecture, vastly richer (to the point where even I wouldn't recommend writing assembly for it), ideally suited to C, and massively supported by pretty much all manufacturers.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: pic or avr microcontrollers?
« Reply #6 on: February 01, 2015, 12:17:27 pm »
For hobbyists, the AVR is more popular because of the arduino. If you want to pick one to learn, I would go with the Arduino for that reason.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: pic or avr microcontrollers?
« Reply #7 on: February 01, 2015, 12:43:26 pm »
hi everyone!
i am sorry if there is already a poll for this but i couldn't find one so i decided to do one.
i am only asking to see (and for others to see) what is the most popular microcontroller .

Most popular for what? And by what criteria? This has been rehashed many times already, just search the forum.

Also, why just PIC or AVR? Where is your XMega? Or the many ARMs that are displacing these 8bit controllers today? Or even the good old 8051 family ...

Poorly question gets you only equally poor answers.

 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: pic or avr microcontrollers?
« Reply #8 on: February 01, 2015, 12:44:06 pm »
If I have to pick one of the two (AVR vs. PIC10/12/16/18), I would go with AVR, for speed, peripheral uniformity and ease of programming (vectored interrupt controller for example).

However, most of the time, your choice of mcu is influenced by other factors, like existing code base, tools availability, sourcing requirements, corporate policies, etc. The mcus themselves rarely come into play.

If I have to start today on mcu, I wouldn't pick any of them. I would consider PIC24 (if I am also new on coding), or one of the  ARM M0/M0+ chips (if I am more experienced in coding).
================================
https://dannyelectronics.wordpress.com/
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: pic or avr microcontrollers?
« Reply #9 on: February 01, 2015, 03:51:54 pm »
Microchip has one of the best datasheets, PIC24, dsPIC33 series nice, lots of peripherals and flash. lacks DMA though.

If you want to seriously challenge yourself and "move with the times" Go ARM, I just hate their vendor datasheets, all of them suck, so does their sample documentation. 

But hey, everything has a place and purpose.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4227
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: pic or avr microcontrollers?
« Reply #10 on: February 01, 2015, 04:46:34 pm »
Last time I checked, Microchip had the best selector tool, which meant it was much easier to find the correct PIC for a given project than competitors' offerings. There are also some really nice analogue peripherals available in PICs, which make implementing circuits to which they're suited much easier and cheaper than they would be otherwise.

I had to use an AVR for a job last year and had nothing particularly against it, though. Atmel's free compiler is better than XC8, and IIRC the AVR architecture doesn't have the same silly problem whereby reads from Flash use different instructions than reads from RAM. You can pass a pointer to a function without having to care whether, say, a string is in a RAM buffer or is a constant in ROM.

If I don't need the analogue peripherals from the PIC world, then I'm tending to use STM32 these days instead.

Online igendel

  • Frequent Contributor
  • **
  • Posts: 359
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: pic or avr microcontrollers?
« Reply #11 on: February 01, 2015, 05:04:41 pm »
Here's from a hobbyist with no formal background. I started with the Arduino and moved slowly to "bare" AVRs, then discovered cheap old PICs on ebay so I decided to give them a try too. While the AVRs do feel more modern and powerful, I find that I'm learning a lot abut MCUs in general simply from working with both kinds.
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: pic or avr microcontrollers?
« Reply #12 on: February 01, 2015, 05:14:03 pm »
I use these exclusively.

http://www.digikey.ca/product-detail/en/RM48L952ZWTT/296-35500-ND/3768427

I find my LEDs blink really good, I can do 10 at a time with this baby.
Anything else is so 20th century.
Do they ALL blink at the same time?
Or did you get them to blink independently?
 :-DD
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: pic or avr microcontrollers?
« Reply #13 on: February 01, 2015, 05:20:48 pm »
... and IIRC the AVR architecture doesn't have the same silly problem whereby reads from Flash use different instructions than reads from RAM. You can pass a pointer to a function without having to care whether, say, a string is in a RAM buffer or is a constant in ROM.

I don't think this is correct. String literals in avr-gcc are copied at initialization time to RAM and can be a RAM hog, and if you leave it in flash only you read it differently than ram.

http://www.baldengineer.com/arduino-f-macro.html

BTW, I switched recently from avr to arm and found it to be simpler and more intuitive (e.g. consistent memory mapped access to ram, rom and i/o registers). You just write straight forward C/C++ and things work as expected.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4227
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: pic or avr microcontrollers?
« Reply #14 on: February 01, 2015, 05:24:13 pm »
Ah, OK, so the compiler effectively hides the difference. That would indeed waste a lot of RAM :(

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: pic or avr microcontrollers?
« Reply #15 on: February 01, 2015, 09:02:56 pm »
AVR has a much better instruction set (if still overly simple; it's a RISC machine), which makes assembly easier but not usually necessary, and C more-or-less effortless.  PIC-C is almost a contradiction; the underpinnings of C simply can't be supported in an easy, general sense on a PIC, so you end up with all sorts of bad restrictions..

Tim

Not sure if you're referring to the lower end PICs, such as PIC10, 12, 16 and 18? These do suffer due to the bank switching required which not only slows down code, it does as you say present limitations, although these days with XC8 it is largely hidden from the programmer, but of course it does sometimes generate unexpectedly slow code as a result of the continual bank switching.

The PIC24, dsPIC and PIC32 are are a completely different kettle of fish, far more Friendly when it comes to C, without the pesky bank switching nonsense.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: pic or avr microcontrollers?
« Reply #16 on: February 01, 2015, 09:10:43 pm »
Microchip has one of the best datasheets, PIC24, dsPIC33 series nice, lots of peripherals and flash. lacks DMA though.

While not all PIC24 and dsPICs have DMA, there are plenty that do. Not sure about the datasheets, except for the low end devices, you end up needing to refer to and cross reference a couple of dozen data sheets for a single device as they've split out generic functions from the main device datasheets. It's just a bit irritating having to juggle several documents concurrently.

Quote
If you want to seriously challenge yourself and "move with the times" Go ARM, I just hate their vendor datasheets, all of them suck, so does their sample documentation. 

I'd agree with that in general. NXP for example seem to have reticence in providing diagrams in their documentation. TI on the other hand have so much documentation it's difficult to know where to start.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: pic or avr microcontrollers?
« Reply #17 on: February 01, 2015, 09:27:41 pm »
Regarding NXP's ARM controllers: Keil has the schematics of a multitude of development boards for NXP's ARM controllers on their website. Those are an excellent starting point.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: pic or avr microcontrollers?
« Reply #18 on: February 01, 2015, 11:30:24 pm »
AVR has a much better instruction set (if still overly simple; it's a RISC machine), which makes assembly easier but not usually necessary, and C more-or-less effortless.  PIC-C is almost a contradiction; the underpinnings of C simply can't be supported in an easy, general sense on a PIC, so you end up with all sorts of bad restrictions..

Tim

Not sure if you're referring to the lower end PICs, such as PIC10, 12, 16 and 18? These do suffer due to the bank switching required which not only slows down code, it does as you say present limitations, although these days with XC8 it is largely hidden from the programmer, but of course it does sometimes generate unexpectedly slow code as a result of the continual bank switching.

The PIC24, dsPIC and PIC32 are are a completely different kettle of fish, far more Friendly when it comes to C, without the pesky bank switching nonsense.

Yes, they really shouldn't be called PICs because they're so much different and better. :P

I don't remember what PIC24 comes from, but PIC32 == MIPS, which is a mature 32 bit instruction set.  Example: the two big consoles in the late 90s (PlayStation and Nintendo 64) used a MIPS cores, offering capability comparable to your average 486 PC of the day (or, I'd say below average for the PS, but it was the cheaper option, wasn't it?).

I suppose the remaining question is: why choose PIC32 when ARM is broadly as capable, but more widely supported?

Alas, I haven't researched any of them well enough to have such an opinion, so I'll leave that to others better informed. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: pic or avr microcontrollers?
« Reply #19 on: February 01, 2015, 11:47:12 pm »
Microchip probably choose MIPS because it was cheaper to license and/or they wanted to be different. The problem however is that if you are looking for assembly optimised code you can find it for ARM 999 out of 1000 times while for MIPS you'll find it 1 out of 1000 times. I have used a MIPS SoC in the past and choosing MIPS basically means saying goodbye to the civilised world and enter a deserted world where you are very much on your own. That is one of the main reasons you'll only find MIPS in high volume consumer equipment: the price of the final product isn't based on the engineering cost but on parts and IP licenses.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9930
  • Country: nz
Re: pic or avr microcontrollers?
« Reply #20 on: February 01, 2015, 11:49:40 pm »
My thoughts on the differences are:

AVRs have more hardware peripherals packed into the mcus at a cost of a more expensive MCU and less range.
Microchip tend to have a wider range of pic mcus with a lot of hardware combinations so if you don't need x you can find a mcu version without it and save a few cents.

PICs are a bit slower clock for clock due to architecture. Instructions take a few clocks to execute vs AVRs which do most instructions in a single clock. This isn't a negative. You just use a faster xtal if you need to.

AVRs have a free compiler which is intergrated into free IDEs. Commercial projects are easy without having to check licenses.

PICs tend to have more silicon bugs than AVRs. Probably due to making so many mcu versions and varients.

AVRs have really nice hardware peripherals which are easy to understand and program. Some if the PIC hardware peripherals can be confusing.


« Last Edit: February 02, 2015, 05:36:05 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline miceuz

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: lt
    • chirp - a soil moisture meter / plant watering alarm
Re: pic or avr microcontrollers?
« Reply #21 on: February 02, 2015, 12:26:29 am »
I'm new to pic and I've voted for AVR just because of the compiler. I like the low price and ability to select exactly what I need of PIC, but as I try to keep all my work open source, crippled and buggy XC8 is not a nice environment for OS project.

Offline rickselectricalprojectsTopic starter

  • Regular Contributor
  • *
  • Posts: 188
  • Country: au
Re: pic or avr microcontrollers?
« Reply #22 on: February 02, 2015, 06:56:54 am »
hi everyone!
i am sorry if there is already a poll for this but i couldn't find one so i decided to do one.
i am only asking to see (and for others to see) what is the most popular microcontroller .

Most popular for what? And by what criteria? This has been rehashed many times already, just search the forum.

Also, why just PIC or AVR? Where is your XMega? Or the many ARMs that are displacing these 8bit controllers today? Or even the good old 8051 family ...

Poorly question gets you only equally poor answers.
i just did avr vs pic because those are the most common two and there is alot of debate about which one of he two is better and the critera is just which one is prefered and used more by the people on the forum
 

Offline rickselectricalprojectsTopic starter

  • Regular Contributor
  • *
  • Posts: 188
  • Country: au
Re: pic or avr microcontrollers?
« Reply #23 on: February 02, 2015, 07:00:35 am »
Whats that sound in the distance?
It's the trolls, they be coming.
:-DD yea and also the "dickhead fanboys" as quoted by dave
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: pic or avr microcontrollers?
« Reply #24 on: February 02, 2015, 07:09:21 am »
i just did avr vs pic because those are the most common two and there is alot of debate about which one of he two is better and the critera is just which one is prefered and used more by the people on the forum
The most common 8-bit MCU would probably be 8051...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf