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.

Which Microcontroller you suggest me for my needs?

Status
Not open for further replies.
he dont use the language "wiring".He programs it in c.

That is good. Keep away from the arduino IDE (Integrated Development Environment). It is horrible and you won't learn anything if you use it.
 
Every time someone mentions AVR you PIC fanboys get angry..

I did not mention PIC in my post. It would be nice if we could keep this civil, rather than attacking eachother. Personally I think that comparing any two particular microcontrollers is like comparing bananas and space shuttles.

And yes, some instructions take 2 clock cycles in AVR

And some take 3 (e.g. JMP), 4 (e.g. RET) or 5.

Factually there are no different AVR cores.. they are all the same. I would hate it if I buy an AVR with a different core every time and it would take variable amount of cycles to execute one instruction. Variable amount of cycles to execute one instruction?? Different cores? You make me so angry. So pointless.

It depends on the length of the program counter and whether you are accessing external memory (I was actually surprised at the latter one). For example see CALL on pg. 47 of the PDF below. For devices with a 16 bit program counter the CALL will take 4 cycles, for 22 bit it will take 5. So it will depend whether you have a device with a max of 128KB program memory (with the 16 bit counter) or 8MB (with 22 bit).

Then look at CPSE on pg. 64. The instruction takes a different amount of time (from 1 to 3 cycles) depending what you are skipping, or whether the condition is matched. This makes perfect sense really as the chip has to "read ahead" without actually executing.

Then there is the reduced 8 bit tinyAVR core which has a smaller instruction set - many instructions take less cycles on this.

Note that all of the above is for 8 bit AVR cores only, a good reference is here: https://www.electro-tech-online.com/custompdfs/2012/11/doc0856.pdf
 
I did not compare anything to Fiat 500.. I just pointed out that energy efficiency is the big thing today in microcontrollers and cars. What is this selective comparison you are talking about. Is it selective because I did not mention PIC? And what did I misrepresent? I did not mention any line of microcontrollers when I talked about energy consumption. I just said that all the manufacturers claim that their chip is the most energy efficient in the market. Are you reading this thread with your PIC glasses on?

You mentioned that a PIC requires 4 clock cycles for every instruction (a fallacy based on old 16 and 18F parts) then mention that AVR's can do SOME instructions in one clock cycle, then go onto say everyone wants to get the work done at the lowest possible clock frequency and hence lowest power consumption.

Slight problem here, you have completely negated the fact that MODERN PIC's have a significant power advantage over AVR's. Your reasoning is a perfect example of the isolated points fallacy.

A more sensible review on the differences is here https://www.electricstuff.co.uk/picvsavr.html

I suggest most people read it, and this gentlemen also comes to the conclusion that the comparison is pointless, both have advantages and disadvantages. I just hate erroneous information being spread about.

I do agree with MisterT on one thing though, elissaios13. It would be wise to stay away from the Arduino IDE.
 
Last edited:
being a PIC, ARM, 8051 and AVR user, i have just one thing to say (agreeing with 3v0, edeca and RichTheDude), about those type of discussion:
lol
 
Personally I think that comparing any two particular microcontrollers is like comparing bananas and space shuttles.

:confused:

edeca, in what sense? Could you please elaborate?
 
You cant compare them to compare anything you have to have two of the same things like this

AVR has to have the same stuft as the PIC like this.
AVR
oscillator 16 mhz
3 timers
8 ADC
10 I/O
PIC
oscillator 16 mhz
3 timers
8 ADC
10 I/O
You could then compare that
Say you have a 32inch tv and you friend has one two you could compare some of the parts but say yours is a Plasma TV And his is a LCD there no way to compare that. And his may sound better look better made better but
it's not apples to apples one has a better picture and the rest is junk. Don't work

But after all this talk here we all all need to get Microchip on the band wagon They need to give us C for free
not a 1000 lines or 60days and you need two pic two hold the code now gunk.

Then we have something to compare.
 
Last edited:
:confused:

edeca, in what sense? Could you please elaborate?

He means that Pics and AVRs, for example, are completely different things, and can't be compared. Basically "comparing them is like comparing apples and oranges", except a little more extreme :p
 
:confused:

edeca, in what sense? Could you please elaborate?

Ferrari,

Each one has its purpose.
A banana is a banana and fits its purpose.
A space shuttle is a space shuttle and fits its purpose.

Samething with uCs, each one fits its purpose. If my project requires a PIC, then I'll pick a PIC, if it requires an ARM, then I'm gonna pick an ARM.
 
And on another forum they are arguing (Ford or GMC) (Farrari or Lotus). What uC is best is like what transportation is best. I have a tractor, really good for pulling trees out of the ground. I have a TRUCK, it holds a house of furniture. Neither is good for long trips. A subway is best! No subways here. Jeeps are good in the mountains.

There are uCs that I like, because I know them and uCs that I don't like because I don't know them.
There are no clear winners or every one would use it.
There are no clear loosers because they go away.
Every week something new comes out and changes the battle. PIC is no longer a 4mhz part.

A slow part in the hands of a skilled programer will beat a really fast part in the hands of a freshmen. Wrong tool used well or right tool not used well.

The MSP430 is a 16 bit part playing in a 8 bit market. It adds 8bits + 8 bits about as fast as any 8 bit uC. It adds 16 + 16 much faster than a 8 bit part. It can't do 32 bit math like a ARM.

Today I am looking for a small foot print part with a fast ADC and large RAM. The CPU speed is not important. A good timer is important. Each of us has different requirements and tastes.

I like apply pie more than bananas. At breakfast I like bananas better. I might like a space shuttle. How do they taste?
 
Personally I think that comparing any two particular microcontrollers is like comparing bananas and space shuttles.

Comparing AVR and PIC is more like comparing apples and oranges. It does not matter which one you eat, but if you are allergic to oranges, don't blame the orange.
 
Last edited:
misterT there no winner here If it works use it. AVR looks good use it PIC looks good use it

They all have there Pluses But there is no clear better chip. And this is not helping the OP

And as it goes I like any chip that fits the job at hand with out adding un needed parts.

Tell the OP how to find a good kit he said a friend was using a ATmega328 help the Man get started
 
Last edited:
Comparing AVR and PIC is more like comparing apples and oranges. It does not matter which one you eat, but if you are allergic to oranges, don't blame the orange.

Classing a particular microcontroller as an "allergen" is a mentality I will never understand. If it gets the job done to specification, who cares? My hackspace friends voice similar views and I will never understand it...

@OP: Out of the three people I know that use AVR's (myself included - I own a USB tiny), one of my other friends uses a AVR Dragon to do On Chip Debugging. I have no idea if this is the latest or greatest out there for AVR's but it would be worth checking out :).

You could get an ATMEGA328 and run it on a breadboard, in fact I did this when developing my first AVR project in a prototype form (coming from an MSP430 and PIC background). Wiring up to a ISP (in system/circuit programming) programmer is fairly easy:
http://d32zx1or0t1x0y.cloudfront.net/2009/07/atmega8_breadboard_11_lrg.jpg and there is avr studio or winavr.

http://www.atmel.com/microsite/atmel_studio6/
http://winavr.sourceforge.net/

I use winavr. It has been great for my needs, but I have no idea if proper on chip debugging is possible - I have no hardware to do so, so its a moot point anyway.

You can easily make a TTL to UART converter with a MAX232 IC ( ), Nigel's tutorial page has some great hardware examples.

Could be a cheaper (and more fun in my opinion) way of learning how to use uCs, and hopefully a bit of computer architecture. Hope that helps :)
 
A more sensible review on the differences is here https://www.electricstuff.co.uk/picvsavr.html

That page is ~5 years old and many things listed there are incorrect today.

Your reasoning is a perfect example of the isolated points fallacy.

Did you read the link you posted.. talk about isolated points.

I agree with the conclusion he makes. And I think all we can really compare are the "isolated points", because there is no application or project. There isn't any requirements mentioned for the microcontroller we are "choosing". So all we can do is to compare some small details like ADC conversion speed, power consumption etc. because it is easy to say "faster ADC is better" and "smaller power consumption is better".
 
Last edited:
Classing a particular microcontroller as an "allergen" is a mentality I will never understand. If it gets the job done to specification, who cares? My hackspace friends voice similar views and I will never understand it...

I think that was a very clever metaphor. What he meant was simply if someone doesn't know how to use a microcontroller, or if it doesn't work for them the way they want it to, they shouldn't blame it on the device.
 
Finally something we agree on MisterT, it is still the most sensible review I have seen about the AVR vs PIC debate. Most are completely blinded by one or the other - this is electronics not religion... Typically the ardent followers I have met have never tried another uC toolchain.

I keep thinking of my friends at hackspace, they do class PIC's as an allergen but have never used one! Mention you have used something else other than arduino/AVR, and they make the sound a dodgy workmen does when it comes discussing the price (breathing through teeth) :p.
 
Thanks for the answers.
Guys i dont care if pic is better that avr or the opposite.I think that because many people use each one,both will worth.Indepedantly my choice is to start with an avr because i there is a guy who can help me.

Now i am thinking of buying an avr dragon or 3-4 uC with bootloader so i dont need avr dragon.
I want to ask:
1)I havnt exactly understand what is in circuit debugging that avr dragon offers.Is it important for a begginer? or with just a bootloarder with be ok and after 2-5 months or more maybe i will need a programmer/debugger?
 
Last edited:
I keep thinking of my friends at hackspace, they do class PIC's as an allergen but have never used one! Mention you have used something else other than arduino/AVR, and they make the sound a dodgy workmen does when it comes discussing the price (breathing through teeth) :p.

Well, I have used PICs, but not recently. And I do follow what new devices Atmel comes up with, but I don't know much about the latest Microchip products. Like I don't know if any PIC has a floating point unit or DMA in their controllers.
 
Last edited:
Thanks for the answers.
Guys i dont care if pic is better that avr or the opposite.I think that because many people use each one,both will worth.Indepedantly my choice is to start with an avr because i there is a guy who can help me.
I could not agree more.
Now i am thinking of buying an avr dragon or 3-4 uC with bootloader so i dont need avr dragon.
I want to ask:
1)I havnt exactly understand what is in circuit debugging that avr dragon offers.Is it important for a begginer? or with just a bootloarder with be ok and after 2-5 months or more maybe i will need a programmer/debugger?
I am not up to speed on the dragon but I expect it functions much like the pickit3 regarding debug. They do what is called ICD or In Circuit Debugging. ICD is nice because you can debug your code in real time without editing the code to add debug statements .With the ICD the variable values can be seen in 'watch' windows. The limitation is that you have to stop the code with a breakpoint to allow the debugger to update the values. That is to say the do not update during the run.

If you go with a boot loader you can debug your code on a simulator in a way that is similar to ICD. Or you can add printf to a serial port which allows you to see what the code is doing using a serial terminal emulator on the PC.. Both of these are more painful then ICD but there are people who still prefer to use them.

Tools like the dragon and pickit3 are excellent buys when you consider what they do.
 
Status
Not open for further replies.

Latest threads

Back
Top