Author Topic: Wanting to begin using Atmel  (Read 12905 times)

0 Members and 1 Guest are viewing this topic.

Offline ExcavatoreeTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: us
Wanting to begin using Atmel
« on: February 08, 2011, 01:15:13 pm »
First, I know similar questions have been asked before, but I'd like to get everything condensed so someone like me can understand it.

I listened to Dave's good advise, and bought a Pickit 3 (and 2, but that's another story)  and downloaded Microchip's IDE.  Everything works very well as far as I know - no problems.  I've programmed in assembler before, I've never used and don't know C, so my first programs are in ASM.  A side benefit is being able to really get in there and learn the nitty gritty details of the hardware.  It's enough for my simple projects that I am doing right now.

I will eventually learn C, and have to sort out what C compilers are available, etc.  But that's another topic.  I'm not a dickhead. (ref Dave's rant)

Dave said not to bother with homemade and third-party programmers and program loaders.  There's no need; the Pickit works so well.

Atmel seems to be a different story.  The Atmel IDE has been criticized, and there are more, and better "homemade" and third party programmers, running better program loaders.  One example is AVRDUDE - but it's like the 1980's compared to PIC's IDE - cryptic command line command vs point and click menus - why do these "makers" hate Pic so much?   Dollar for dollar it seems Pic is the best deal for the money. But I digress.

Atmel's IDE supports the expensive 600 dollar STK programmer, and the AVRISP (I think it's called). 

It looks to me like there simply ISN'T an Atmel equivalent to the Pickit and the Picrochip IDE.  One can spend more and get the same experience, or "cheap out" and end up back in the 80's typing single initial coded command lines.

Can someone fill in the holes in my knowledge?  Am I missing something?


 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Wanting to begin using Atmel
« Reply #1 on: February 08, 2011, 01:45:21 pm »
One example is AVRDUDE - but it's like the 1980's compared to PIC's IDE - cryptic command line command vs point and click menus
or "cheap out" and end up back in the 80's typing single initial coded command lines.
you can program windows app to send command line to avrdude. i used vb and win32 api to do that.

Atmel's IDE supports the expensive 600 dollar STK programmer, and the AVRISP (I think it's called). 
i think avrisp not that expensive and should be equivalent to pickit. but no supply in ebay, so i got one of the 3rd party (similar casing shape with original), last time i used it, it works great. i cannot wait to work with it again... soon, very soon, i hope.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline ExcavatoreeTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: us
Re: Wanting to begin using Atmel
« Reply #2 on: February 08, 2011, 02:29:55 pm »

you can program windows app to send command line to avrdude. i used vb and win32 api to do that.

i think avrisp not that expensive and should be equivalent to pickit. but no supply in ebay, so i got one of the 3rd party (similar casing shape with original), last time i used it, it works great. i cannot wait to work with it again... soon, very soon, i hope.


So, I have an additional choice to the 80's type interface - write my own?   Sorry, but Pic has that beat by a mile.   Buying an ATtiny or something similar and writing my own front end for a free program loader is cheap, I will admit, but I'd gladly pay 50 dollars for something like the Pickit.

I didn't write my first post very well.  My point about the avrisp was that it seems to be the only low cost programmer that works with Atmel's ide, yet folks dislike atmel's IDE so much that they go back to the 80's.  (or do some programming)  If the Atmel IDE really isn't that bad, and works with avrisp, then that seems to be the answer I seek.

My other side question is, why do people insult PIC when it seems to be a much better system as far as "bang for the buck" is concerned?

(note, I'm not starting am Atmel vs Pic war here, I suspect I am lacking key information that leads me to that conclusion, so I suppose my real question is - "what's wrong with my understanding?" despite my poor attempts at asking.

 

alm

  • Guest
Re: Wanting to begin using Atmel
« Reply #3 on: February 08, 2011, 02:50:16 pm »
The closest thing to the Pickit in the AVR world is probably either the AVRISP Mk. II (I would recommend the original, it's not that expensive, and available from most electronics distributors like Digikey, Mouser and Element14. The AVRISP Mk. II can program almost all AVR chips including the Xmega (except the AVR32 parts, which aren't that interesting IMO). The AVRISP Mk. II is a professional tool, and many people have good experiences with it.

The disadvantage of the AVRISP Mk. II is that it doesn't support on-chip debugging (JTAG/debugWire), which allows you to set breakpoints and single step through the program running on the actual silicon (as opposed to debugging in the simulator). The affordable solution is the Atmel AVR Dragon, which supports programming like the AVRISP Mk. II, but can also debug all ATtiny/ATmega that support debugging (both JTAG for the larger parts and debugWire for the smaller parts). The 32k code size limit was removed in recent AVRstudio (firmware) last year. Downside of the Dragon is that it's a bare board without case or cables (you need a USB cable and some flat cables). It also has a reputation for being sensitive to being touched near the DC-DC converter, or USB undervoltage, but this seems much improved by the later revision (from 2009 I think, so any distributor should have it by now), which has mounting holes.

The JTAGICE Mk. II is basically the more robust version of the Dragon, but is much more expensive. Don't buy any of the cheap JTAGICE (Mk. I) clones, they can only debug a handful old parts (ATmega16/32/64/128 I think).

There is also the STK500, which is a development board which includes a programmer (debugger), but I believe it's end-of-life. It supports most DIP-style AVR's (including the Xmega), and has some neat features like an adjustable power supply and clock generator. The new STK600 has basically the same features, but supports the Xmega and is a lot more expensive (the DIP adapters alone are as expensive as the STK500).

One reason for preferring the command line tool is so it can be incorporated into Makefiles, which you can't (easily) do with GUI tools, although Atmel also supplies command line tools. AVRdude also has the advantage is that it supports many programmers, including things like the Arduino bootloader, through the same interface. AVRstudio only supports Atmel programmers (or clones). I would recommend to start with AVRstudio, since it works out of the box. You can also add WinAVR if you want to program in C. It supports simulation, programming and debugging (with the necessary hardware) all in one package.

Other popular IDE's are Code::Blocks and Eclipse (with AVR plugin), but they need more setup, and are generally used with C. Debugging may also be more limited. You're also free to use any editor of choice, and do compilation/programming through a build system like Makefiles. There are also commercial compilers/IDEs available, which tend to be more friendly or produce better code.

One reason why AVR may be more popular is because AVR-gcc, a free open-source C/C++ compiler, is available for (almost) all of them. In the PIC world, I believe only the PIC32 is supported by gcc. I think there is some open source compiler support for the 8/16-bit PIC parts, but it's much less mature. You have to choose between a non-optimizing compiler or paying money for one (and hope everyone bought the same one), and most run only on Windows. There also appears to be more open source software like USB stacks for the AVR, although you can argue whether this is a cause or effect.
 

Offline Chasm

  • Regular Contributor
  • *
  • Posts: 211
Re: Wanting to begin using Atmel
« Reply #4 on: February 08, 2011, 03:12:28 pm »
Maybe you would have got more answers if you had just asked the question from the topic title and not continued to set this up as a Atmel vs. Microchip flamewar.  8)


There is no official equivalent for the Pickit on the Atmel side. Some clones exist, see eBay or the various Chinese sites.

The usual programmer is the AVRISP MKII, reliable and cheap (35 Euro) but no debugging.
The AVR Dragon has debugging functions but is reported to have some problems. Most because it does not have case and the foam in the box is indeed conductive antistatic foam... It is not much more expansive than the AVRISP. (50 Euro)
The Atmel JTAG ICE MK2 is the full featured product and that includes the price. (300 Euro)

Then there are also the development boards, but they are not the topic here.


Other than the official stuff there are tons of clones and DIY projects cratering to various needs from a fully featured programmer/debugger to a price point of less than 4 Euro including shipping.
Many tie into the AVR Studio, others use the various command line tools either directly or via wrappers.

As far as the usefulness of command tools are concerned you should review the end of Dave's Pickit 3 rant, he was missing the stand alone tool for the Pickit 2 and while a version for the Pickit 3 has been promised it has AFAIK not been delivered so far. ;)
 

Offline ExcavatoreeTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: us
Re: Wanting to begin using Atmel
« Reply #5 on: February 08, 2011, 04:13:00 pm »
Maybe you would have got more answers if you had just asked the question from the topic title and not continued to set this up as a Atmel vs. Microchip flamewar.  8)


As far as the usefulness of command tools are concerned you should review the end of Dave's Pickit 3 rant, he was missing the stand alone tool for the Pickit 2 and while a version for the Pickit 3 has been promised it has AFAIK not been delivered so far. ;)

I'm a victim of my own ignorance, and perhaps impatience - the info is out there, but I'm having difficulty putting it together.  I thank everyone for their help.

As for Dave's rant, yes, now I remember.  At the time, I hadn't done any programming at all, and had no idea what he was talking about.   It was a later video where he said "look, just get the Pickit 3 despite my rant and begin."  or something to that effect, so I did.

My interest in Atmel is two fold - one To not tie myself to one manufacturer, and two - some open source projects I have built or want to build are done using Atmel.  I can't customize unless I get the tools and, more importantly the knowledge to do so.

 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Wanting to begin using Atmel
« Reply #6 on: February 08, 2011, 05:49:39 pm »
if you cant deal with it, then dont deal with it. i know your condition. if you are me, i will talk/forum less, think/search more, there are abundant of info in the net. my statement on "custom gui app for avrdude" was resulted from a search in the net on how to do asm for arduino, there is no direct tips, just some obscure avrdude "command lining" info. by deep thinking, i put it together with my own way, from my background knowledge etc. up until today, my conclusion, there is not much difference between PIC and AVR programming workflow:

1) AVRStudio->AVRISP->avr chip
2) AVRStudio->avrdude->arduino
3) MPLAB->Pickit->pic chip

As alm and Chasm and me stated (a lots of avr freak/fanboys out there), there is a way. but... if you cant deal with it, then dont deal with it. cant blame ya! Hava nice days ;)
« Last Edit: February 08, 2011, 05:52:31 pm by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline tyblu

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: 00
    • blog.tyblu.ca
Re: Wanting to begin using Atmel
« Reply #7 on: February 08, 2011, 10:05:46 pm »
AVR Programming Methods and Atmel Tools Overview, by Dean Camera. There are several GUI wrappers for avrdude, but I don't use them. A quick search of AVRFreaks will reveal a few, though.
« Last Edit: February 08, 2011, 10:07:34 pm by tyblu »
Tyler Lucas, electronics hobbyist
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38720
  • Country: au
    • EEVblog
Re: Wanting to begin using Atmel
« Reply #8 on: February 09, 2011, 04:39:22 am »

As far as the usefulness of command tools are concerned you should review the end of Dave's Pickit 3 rant, he was missing the stand alone tool for the Pickit 2 and while a version for the Pickit 3 has been promised it has AFAIK not been delivered so far. ;)

I heard it finally came out last week.

Dave.
 

Offline Chasm

  • Regular Contributor
  • *
  • Posts: 211
Re: Wanting to begin using Atmel
« Reply #9 on: February 09, 2011, 01:23:12 pm »
Wonders will never cease.  ;D
 

Offline ExcavatoreeTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: us
Re: Wanting to begin using Atmel
« Reply #10 on: February 13, 2011, 01:39:59 am »
Sorry to bump my thread, but I did want to thank everyone for their help.

Second, I thought this was interesting:

http://pickit2.isgreat.org/

 

Offline frank26080115

  • Regular Contributor
  • *
  • Posts: 74
Re: Wanting to begin using Atmel
« Reply #11 on: February 16, 2011, 01:14:53 am »
I've used the PICkit 2. The GUI is buggy. Point-and-click solutions are great only when they are done right.

Command line tools and open source is great for the times when somebody screws up the GUI, then you just make your own tools. I wrote http://code.google.com/p/avr-project-ide/

Also the command for programming a chip isn't that hard, avrdude -p atmega328p -c usbtiny -U flash:w:file.hex , you don't really type it all the time since you either use a makefile, or just press UP in the terminal to bring up the previous command

My first AVR programmer is an USBtinyISP, got it since the release of the v2 revision, still works, no complaints

I have an AVR Dragon that doesn't get used unless I need to do something advanced.

MPLAB makes me cry, I only use it to build the project, all editing is done externally via NetBeans or Eclipse on the rare occasion I need to use PIC instead of AVR
 

Offline ExcavatoreeTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: us
Re: Wanting to begin using Atmel
« Reply #12 on: February 18, 2011, 02:26:23 pm »
To be honest, I like MPLAB, but I have to qualify that.

1.  I've only done small, piddly projects with the most basic PIC microcontrollers.
2.  I'm used to strange, crazy, anal file managment like MPLAB uses.  I've used Pro-E PDM, a horrid program, Pro-E Intralink, two CAD-file management programs that also make people cry.    I'm used to such behavior, but I'm the exception.  (No one else is that masochistic.)

Believe it or not,  I used to be "Mr. Command line."    My first computer ran CP/M, and C:pip A:=B:*.* was the norm.  I actually complained bitterly about Windows 95.  What does this mean?  I'm old and stubborn, but apparently I just change slowly - a bit hypocritical of me to complain about GUI and then about the lack of it, ~15 years later.

 

Offline ruku

  • Contributor
  • Posts: 25
Re: Wanting to begin using Atmel
« Reply #13 on: February 24, 2011, 10:24:02 pm »
I've done a fair bit of AVR programming--though I'm far from experienced in the microcontroller world. My only experience right now is with AVR, and I've done everything with gedit and make. I've recently done a decently sized project (~1k lines of code). Didn't seem to run into any issues, didn't even need a debugger!

My experience with IDEs as of yet is a useful front end to the debugger and code navigation. Around the end I was starting to pine for some assistance navigating through the code, but nothing really killed me. After I got my makefile setup properly, I could get my software compiled and on the development board with just a "make program".

[edit] I think one big alluring thing to AVRs is you can buy a $20 - $30 programmer (usbtinyisp?) and be off to the races. That, and you're not bound to one particular operating system. avr-gcc / avrdude works with Windows / Linux / Mac.
« Last Edit: February 24, 2011, 10:28:08 pm by ruku »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf