IU'll try to answer best I can..
takao21106:
OK thanks for your explanation.
I think my board has the Opti bootloader already.
Or is it a seperate sketch that is used to flash other chips?
this was a bit odd for me too..
it is 'both' (sorta).. you FLASH your real/true (already working Arduino) with the Otiloader sketch.
this sketch turns your Arduino into an ISP.. so you can flash other boards/chips connected to it.
takao21106:
Do I have to disconnect the USB interface?
no.. I leave my REAL (the Arduino I just wrote the Optiloader sketch to) plugged into my USB cable to whole time (unless I am hooking up things to the I/O headers of course)..
this allows me to be powered by the USB 5v+ as well as go to the Serial Monitor and watch the Optiloader sketch results (see if my other blanks boards/chips are being flashed correctly)
takao21106:
Using your explanation I could flash a bootloader.
How can I flash a sketch?
Or do I have to use the AVR studio to generate a hex file?
So you CAN flash the bootloader to your new/blank chips? or not? What makes you think yes (or no?) have you watched the serial monitor output?
You flash a sketch the normal way you would yoru target board... by either using an FTDI cable.. (home made one from a cell phone data cable).. or you can use you Arduino to uploade sketchs to you target board/chip.. (but popping out the current 329 DIP chip in there.. and using the RX/TX/DTR & 5V/GND lines.. the IDE will send code THROUGH your Arduino withthe chip missing.. onto the target board/chip...
I have never used AVR Studio or AVR Dude..etc.. outside of what may used through the Arduino IDE..
takao21106:
I only have one USB interface right now, the one that is on the board.
Should I get another USB interface for the external chips?
nope.. you can use your REAL Arduino for everything you need.. You can turn it into an ISP programmer to get bootloader software on other chips.. or... use it as a 'pass through' device to send sketchs form the IDE through the board onto the target chip/board..etc
takao21106:
I don't want to mess up the board more than neccessary and your advice maybe can save me from hours of experiments.
Or maybe I should get a seperate flash writer they are not expensive.
Nothing should be messed up.. things can all go back to normal once you NEW/BLANK board is all set up..
basically once you flash whatever bootloader you want onto the blank chip.. it 'IS' an Arduino.. (meaning on reset, hardware or software.. the bootloader will run for a few seconds allowing a sketch to be uplaoded)
hop this helps..