Let’s say I were to make my own board with an AtMega on it.
OK, you make your own board with an AtMega on it.
Could I connect the chip to a computer via USB and use something like AVRDude to upload the hex file to it easily?
On the hardware side:
You will need something on your board to interface between the ATMega chip and the computer’s USB ports. Older versions of Arduino (like the Duemilanove) use a FT232RL chip for this; the Uno uses the 8U2 (older revisions) or 16U2 (current R3 version).
I think it’s easier to implement the interface with the FT232RL chip because you basically add a few resistors, capacitors, a USB socket, and you’re done. The downside is it’s a (relatively) expensive chip and you have to install drivers on the computer.
The 8U2/16U2 is a little more work because you’ll need to program it first, but you get more flexibility because you can make it look like any kind of USB interface.
You can find implementations of both types by looking at the “Hardware” section of www.arduino.cc, then the Uno or Duemilanove board’s schematics.
I’m thinking easy enough for someone who’s not programming savvy to do.
On the software side, if you don’t want the user to have to run the Arduino IDE you can send them a batch file or script that runs the AVRDude commands to upload the hex file, or you could use something like
which does the same thing from a GUI interface.