1

I have created a circuit with a barebones ATMega328. I also have an external programmer (Sparkfun's Pocket AVR Programmer)...

Now I want to program a particular sketch... When uploading a sketch, do i also have to flash the bootloader beforehand?

Or is it possible to upload the sketch directly to the microcontroller without a bootloader?

1 Answer 1

2

The Pocket AVR Programmer is just a standard ISP programmer, meaning it uses the ISP protocol built into the hardware of the microcontroller to write data to flash and EEPROM. That is also the way, that the bootloader got onto the microcontroller in the first place.

The bootloader of the Arduino on the other hand is a small program to communicate over Serial (or USB depending on the Arduino board) and then write the data to flash and EEPROM.

So: No, you don't need the bootloader, if you want to use the ISP programmer. Select your programmer in the corresponding menu of the Arduino IDE to use it.

Though keep in mind, that you won't be able to upload a new sketch via Serial/USB without the bootloader. You can always use the ISP programmer to again write the bootloader to the microcontroller.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.