hey gang-
I have never really messed with using the ICSP headers/SPI bus to upload sketches before..
(just recently actually).. but dont know much about it..
this involves the Arduino IDE & an Arduino Duemilanove 2009 board..
Some basic questions:
1.) Do you need to have the Arduino ISP sketch written to the Arduino before using the: "Upload using programmer" option in the Arduino IDE/ (File >>> Upload using programmer)
I understand doing this removes/over-writes the bootloader, making for quicker boot times, and giving maximum space on the chip (the space the bootloader would have normally occupied)
I have only even used my Arduino to flash blank chips with a bootloader... and then used an FTDI cable to upload sketches with.. (everything always seemed to work out)
recently.. I had a project that was a pcb with minimal Arduino circuit (no vReg, +3.3v @ 8MHz INTERNAL clock..etc).. and was very small in size, not much bigger than a microSD socket...
-and-
a project where the ICSP headers/pins/pads were forgotten about and not broken out...
instead of trying to solder directly to the pin on the ATmega328P-AU chip on the pcb..
I purchased one of these:
http://www.hobbyking.com/hobbyking/store/index.asp
so I could flash a bootloader to the blank chip,... once it was all assembled on the pcb... and then use the serial headers (that was broken out correctly) to upload sketches and use the serial monitor for feedback/debugging..etc..
however, with that cable I have above, I finally got to thinking about using the Upload using programmer option.. (since on the FIRST project mentioned above.. the ICSP pads are not through holes..but pads.. and are in odd locations due to size/space issues that had to be dealt with).. so I wouldnt have to solder on leads and un-solder them again after Im done..
makes this alot FASTER and easier (once the firmware is tested) to just Upload using programmer to these custom pcb's/projects instead of soldering on custom leads to flash bootloader.. then solder on new leads to upload the sketches..etc..
but this lead me to some questions...
Questions regarding chip (fuse?) settings:
1.) When I flash a bootloader to a chip.. I usually pick: (+5v/16MHz or +3.3v/8MHz or +3.3v/8MHz INTERNAL for BREADBOARD) depending on the project..
from my understanding when I do this.. it changes stuff on the chip (fuse settings..etc) to let the chip know that it should run @ +5v logic or +3.3v logic.. or what kind of clock to use/run at......right?
2.) If I am NOT flashing a bootloader to the blank chip.. and instead just use 'Upload using programmer'.. how does the chip know how to behave? how does it knwo its shoudl run @ +5v or +3.3v logic? or what clock speed to run at? or if it should use the INTERNAL 8MHz clock for example?
or should always flash the bootloader to the chip first (to set the fuses and what not).. even if after, you plan on using Upload using programmer option to bypass the bootloader wait 7 get more space back..etc..??
thanks!