Is there a big advantage of using an Arduino or an external programmer with ATmega328?
Do you mean "using Arduino bootlader" versus using AVRGCC/(WINAVR) and an ISP programming tool like "USBtinyISP" and AVRDUDE?
Advantages are pretty straightforward. The main one, in my opinion is rapid development.
Advantage of the Boot loader = FAST development and testing... two step process and no extra cables
Advantage of Arduino Environment = Built-in Shortcuts and LOTS of supplemental library support both "built in" and "Add-on" to again... save time.
Speed and Ease of Use are the primary reasons that ARDUINO has become so popular.
External Programmer has the benefit of being very "traditional". You can use the native ATMEL tools like AVR STUDIO, you get more "traditional" support that is available from places like ATMEL directly and at AVRFREAKS. You have to write a lot more "code" to get the same results than with ARDUINO, but you also get the freedom to code the way you like... possibly closer to the "hardware" than is available with Arduino.
If you come from a Microchip PIC background or Micro controller Assembler background, the traditional non-boot loader approach might seem more natural.
Ok, thank you very much!
The only big advantage I can see of the direct AVR path is you can reclaim the ~2k needed for the bootloader, so you get a bit more space. This is a bigger advantage on the 168, less so on the 328.
You get the huge advantage of having lots of code 'abstracted' and therefore made a LOT easier and quicker to program.
Each has its own advantages. For playing around and for code development the USB Serial programming using the bootloader is unquestionably faster and easier.
Once a design is completed, however, if you want to go into production with the design then using an AVR programmer is probably the way to go. You won't need to buy chips with the bootloader preinstalled and a production operator can load the code into the chip very easily using just a batch file, the hex code file, and a programmer program like AVRDude- all of which will fit nicely on a thumb drive.
I come from an assembler / machine code tradition, when I started there was no choice. In fact assemblers were a step forward from coding everything in mnemonics on paper and looking up the hex for the instruction in the manual and then typing it in.
Now with the arduino I can write non trivial programs that work first time. In fact most of what I write now works first time.
RoyK - Most of the Arduino community are tinkerers/hobbyists so what you said would not apply. Agree if you were going into production the AVR-Studio and programmer route would be more practical.
What everyone else said
Without generalizing but if you are an embedded developer or someone who makes extensive use of the various AVR's out there by writing code in C or even assembler and basically do your own thing and implement various different systems directly on a microcontroller then using an external programmer is for you, especially if you want to work with a whole range of devices.
As Mike Mc said Arduino helps abstract everything for you.
Remember Arduino is aimed not so much at embedded developers but at the man in the street who wants to get into this sort of thing, and it does so by saving you having to buy an expensive programmer or having to figure out how to make one, amongst other things.
As you get more and more into it and want to play with embedded systems you might find yourself wanting to get a separate programmer or make one. But why bother when Arduino seems to have so much even for those who have an engineering background.
zageek, that's pretty much the situation I'm in. I'm working on developing a product for my company, of which the microcontroller is a small part. I'm leaning to towards giving the Arduino a chance to see how it works out. I'm really excited about how easy it will be prototype both hardware and software. Even once we get to the production phase, the volumes will be fairly small (several thousand ship-sets over the lifetime of the product). I'm not really seeing a strong need to switch away from the Arduino then either.
Aside from the cost advantages, is there any reason not to use Arduino in a production environment?
In production you may not want the bootloader in the way. It waits for a second on startup to see if there is a reset.
On the other hand it may be an advantage to have a field upgradeable device - just remember to set the lock bits to 0xCC. Also the timeout could be reduced with the automatic reset version of an Arduino.
Thanks for the feedback. Seconds are instantaneous as far as this system is concerned, so I don't think the wait for reset will be an issue.
Field-upgradeable would also be a useful feature, especially as we're very early in the development process. This would allow us to get our systems installed and running, and still be able to update the software as we go along for bug fixes and new features.