EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

AVR or PIC for a beginner

Started by [Frank] February 19, 2007
I'm new to microcontrollers world.

I have only a little experience with Z80 based systems.

I saw some Atmel AVR's sources and I loved it: very clear.

Someone suggest me to start with PIC, someone else with AVR.

The net is full of doc/projects about PIC and give me a bit of
confusione; AVR much less...instead.

What do you think about? What's the best approach for a beginner?

Thanks in advance
[Frank] wrote:

> I'm new to microcontrollers world. > > I have only a little experience with Z80 based systems. > > I saw some Atmel AVR's sources and I loved it: very clear. > > Someone suggest me to start with PIC, someone else with AVR. > > The net is full of doc/projects about PIC and give me a bit of > confusione; AVR much less...instead. > > What do you think about? What's the best approach for a beginner? > > Thanks in advance
If you are on a path to doing very large projects you want to use the AVR -- it has more of a 'big processor' feel to it, it works better with C than a PIC, and there are free C compilers available. If all you ever need is an itty bitty sequencer, then there's no technical reason to choose an AVR over a PIC. Generally I choose microprocessors based on the following: * Do they have the peripherals I need? Often the features that drive my decision is whether I can do what I want with the peripheral set; the core is just what happens to be attached to the peripherals. * Do the pins have enough oomph to do what I want? A circuit with a processor and a bunch of drivers is much larger than a circuit with just a processor. IIRC the PIC and the TI MPS430 excel at this. * Will it be fast enough, and big enough? You have to be careful here -- you're not just looking for raw speed and storage, but speed and storage as you're going to use them. Both the MPS430 and the AVR fit C better than the PIC does, which means that they get more out of the underlying resources than the PIC if you're using the language. If all you're going to use is assembly, then it's not so big a deal. * For small projects I look at how familiar I am with the chip, because it takes time to spin up on a new architecture. For large projects I figure that the time to learn the new architecture and the expense of new tools will be paid back in efficiency as time goes on -- this is obviously a judgment call, and one that should be made carefully. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
> * For small projects I look at how familiar I am with the chip, > because it takes time to spin up on a new architecture. For > large projects I figure that the time to learn the new > architecture and the expense of new tools will be paid back > in efficiency as time goes on -- this is obviously a judgment > call, and one that should be made carefully. >
If it's my choice, I pick the micro and ask for additional money for different micro. For example: 1. Arm (cost) 2. Avr (cost + 100) 3. Freescale (cost + 300) 4. MSP (cost + 500) 5. PIC (cost + 1000) I will do any micro with the right price. Otherwise, I prefer ARM M3 Cortex nowaday, except for very low power and code density with AVR. ARM M3 is around 30% higher in power and 40% higher in code space than AVR, but a non-issue most of the time. The LMI chips meet most of what I need, except for the relatively new company. TI and ST are coming on-line with M3 soon. Hopefully, they will have parts close enough to LMI.
On Feb 19, 1:54 pm, "[Frank]" <____n...@email.it> wrote:

> Someone suggest me to start with PIC, someone else with AVR.
You will see violently different opinions on this. Many people learned their first micro projects on the PIC. Many learned their first projects on the AVR. If you have experience with Z80 code, you will not have terrible difficulty picking up either architecture, but the AVR will be more familiar to you (not that it's particularly Z80-like, but it's simply less weird than PIC). Having used both architectures, my preference is strongly for AVR.
[Frank] wrote:
> I'm new to microcontrollers world. > > I have only a little experience with Z80 based systems. > > I saw some Atmel AVR's sources and I loved it: very clear. > > Someone suggest me to start with PIC, someone else with AVR. > > The net is full of doc/projects about PIC and give me a bit of > confusione; AVR much less...instead. > > What do you think about? What's the best approach for a beginner?
Download the tool sets and try them. Find one you like. Or choose an application, and work backwards from there. I suggest you also look at SiLabs C8051F family, and their ToolSticks TI MSP 430 family, Similar toolsticks, but no 5V parts Zilog's devices, since you already have some background there eZ80, Z8F, ZENO etc Freescale, who are having a push on their smaller parts. -jg
[Frank] wrote:

> I'm new to microcontrollers world.
> What do you think about? What's the best approach for a beginner? > > Thanks in advance
This will give you some info to get started Frank: http://www.dontronics-shop.com/pages.php?pageid=23 Don... -- Don McKenzie E-Mail Contact Page: http://www.dontronics.com/e-mail.html Crystal clear, super bright OLED LCD (128x128) for your microcontroller. Simple serial RX/TX interface. Many memory sizes. http://www.dontronics-shop.com/product.php?productid=16460 No More Damn Spam: http://www.wizard-of-oz.com

[Frank] wrote:

> I'm new to microcontrollers world. > I have only a little experience with Z80 based systems. > I saw some Atmel AVR's sources and I loved it: very clear. > Someone suggest me to start with PIC, someone else with AVR. > The net is full of doc/projects about PIC and give me a bit of > confusione; AVR much less...instead. > > What do you think about? What's the best approach for a beginner?
It does not really matter which micro to start with. Whatever you do, you will screw up for many times. However: 1. Beware: PIC is addictive and brain damaging, especially for the beginners. 2. All of the hardware that you need to start working the AVR is 5 wires connected to the PC LPT port. 3. AVR is much better for C/C++ programming. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 2007-02-19, Tim Wescott <tim@seemywebsite.com> wrote:
> * Do the pins have enough oomph to do what I want? A circuit with > a processor and a bunch of drivers is much larger than a circuit > with just a processor. IIRC the PIC and the TI MPS430 excel at > this.
AVRs certainly do not, anyway. In fact, Atmel is taking the AVRs in the opposite direction, and has halved the specified source and sink current recently in some newer parts (e.g. TinyX61). Very disappointing for us! I hope they reconsider.
[Frank] wrote:
> I'm new to microcontrollers world. > > I have only a little experience with Z80 based systems. > > I saw some Atmel AVR's sources and I loved it: very clear. > > Someone suggest me to start with PIC, someone else with AVR. > > The net is full of doc/projects about PIC and give me a bit of > confusione; AVR much less...instead. > > What do you think about? What's the best approach for a beginner? > > Thanks in advance
As most people tend to suggest AVR, (I've chozen PIC, and I'm very happy with them ;-) a few pros for PIC: - the availability of PICs is much better ("Microchip cares about small customers") - there are number of good C-like, Basic-like, Pascal-like, Python-like freeware compilers (e.g. JAL v2: (including a complete IDE), see http://www.wattystuff.net/tiki/tiki-index.php?page=PIC+Micro - the number of peripherals per pin is very high on PICs - the JAL community is very helpful in solving problems (don't know the status of AVR groups) Maybe the most important factor, determining your choice: "what's your neighbor using ?", so you can get help with those small but nasty startup problems. cheers, Stef Mientki
"larwe" <zwsdotcom@gmail.com> wrote in message
news:1171910012.299179.171790@m58g2000cwm.googlegroups.com...
<SNIP>
> > but it's simply less weird than PIC >
Now that bit definitely is true. The PIC achitecture sure is weird. But I've been coding PICs in assembler for what must be about 2-years now so am almost used to it. The PIC makes you think, ALOT. But I find there are things you can do with them that are just mind boggling amazing. Being able to multiply and divide a 24-bit number in 4 clock cycles on a 40 MIPS dsPIC makes you wonder where you'd been all your life. That's like 100nanoseconds!! But PICs sure are weird. As I have become programming them. Also, each PIC release architecture is almost drastically different from the next, ie. 12F, 16F, 18F, 30F. Things like getting used to having the target register on the left, is now on the right. Perculiar stuff like that. The PICs though I find a joy to program.

The 2024 Embedded Online Conference