0

I need to make my program run immediately on a reset or power up. However, the bootloader delays program startup by around 2.5 seconds. How can I get over this? Is there a way to turn off the bootloader wait period?

2
  • 1
    Not the easiest solution, but I've modified the bootloader on a Trinket, to have it wait only if the board was reset, and not on regulator power on. Something similar can be done for the Mega. That way you can still use serial to program the board, unlike Majenko's solution.
    – Gerben
    Commented Oct 15, 2015 at 12:59
  • @Gerben: +1 - this is worth making into an answer.
    – JRobert
    Commented Oct 15, 2015 at 19:43

1 Answer 1

0

Yes. You remove the bootloader completely and program the Arduino using a hardware programmer.

If you could "turn off" the wait period you would never be able to get into the bootloader to program the board, so the bootloader would be completely useless. So either way you would then need a hardware programmer to do anything constructive with the board.

A hardware programmer could be another Arduino, or a real hardware programming adapter.

5
  • I am using a Mega 2560, so I guess I need to use another Arduino for programming the Mega via the ICSP connector. Is that right?
    – Rajiv
    Commented Oct 15, 2015 at 11:32
  • Yes, that's right. There's plenty of tutorials on the web of how to wire it up. It's just the same as how you install the bootloader on a blank chip, but instead you're installing your sketch. It can be done direct from the IDE if you select the right programmer and programming operation.
    – Majenko
    Commented Oct 15, 2015 at 11:41
  • 1. I used an AVRISP Mk2 programmer. 2. I selected AVRISP V2 in 'Arduino IDE 1.6.5, with Tools > Select Prorammer 3. When I select Sketch > Upload using Programmer, I get the following error... "Error while uploading: missing 'program.tool' configuration parameter" I'm using Ubuntu 14.04 with Arduino IDE 1.6.5
    – Rajiv
    Commented Oct 15, 2015 at 12:07
  • AVRISP is not using an Arduino as a programmer - there should be a separate entry for that.
    – Majenko
    Commented Oct 15, 2015 at 12:13
  • OK. So I connected an Arduino Uno 1. I loaded Arduino ISP program from Examples 2. Selected Tool > Programmer > ArduinoISP 3. Then Sketch > Upload Using Programmer And I get this error: "avrdude: Error: Could not find USBtiny device (0x2341/0x49)" Yes, I've checked and rechecked - I have indeed selected ArduinoISP and not USBtiny.
    – Rajiv
    Commented Oct 15, 2015 at 12:19

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.