Watchdog timer fix via different bootloader - Question

Hello,

I need to use the watchdog timer in my code on the Nano and I know that the bootloader that is on the Nano is not compatible with it. I need some advice on which bootloader to go with that will support the watchdog timer as well as the normal functionality from the original bootloader.

Also, I want to burn the new bootloader with an Uno. Is this safely doable?

Cheers

Yahia

I had no problem using the watchdog timer with the Arduino UNO R2. I used the UNO bootloader for Arduino 1.0.1 and double-checked that it still worked.

If you are going to be burning bootloaders more than once you might want to purchase an USBasp programmer. You can get them shipped from Hong Kong for less than $5. Search for USBasp on eBay.

may i ask a newb question that may help me understand the bigger picture ?

when, or for what, would you use the bootloader you recommended ? i went to ebay and read the description, and am no wiser.

in my simple way of understanding, a bootloader programs a chip (i.e. an attiny) with a booting code, so that when it gets power, it starts running. just like a desktop computer. and when i want to program an attiny chip, i have to “burn” the bootloader onto my arduino uno first.

if my conception of the process is about right, why not just continue to use the arduino bootloader ? my own question makes me wonder, is it so you can burn something other than the arduino bootloader ?

just asking.

Yahia:
Hello,

I need to use the watchdog timer in my code on the Nano and I know that the bootloader that is on the Nano is not compatible with it. I need some advice on which bootloader to go with that will support the watchdog timer as well as the normal functionality from the original bootloader.

The easiest way is to just install the standard Uno bootloader onto your Nano. It will run just fine and have the WDT fix, plus take up less space and upload at a faster baudrate. The only change you will have to live with is that once you burn the Uno bootloader to your nano, you thereafter must always select the Uno board in the IDE when uploading new sketches, not select the Nano board like you presently do.

Also, I want to burn the new bootloader with an Uno. Is this safely doable?

Yes, that is perfectly safe and doable.
Lefty

Cheers

Yahia

Not really related to the original topic but I'll offer an answer.

pratto:
if my conception of the process is about right, why not just continue to use the arduino bootloader ? my own question makes me wonder, is it so you can burn something other than the arduino bootloader ?

just asking.

Not quite right.
A bootloader is a piece of software that can be put into the AVR chip.
If it is in there, it runs when the chip is powered up or reset.
The Arduino bootloader can be used to upload/burn
an application program (the sketch) into the flash using a serial port.
The bootloader also starts/runs your application code.
Every AVR based Arduino board comes with an AVR chip with an Arduino bootloader installed in it.
The IDE talks to the Arduino bootloader and communicates with the bootloader over a serial port
to burn a new application program.
If bootloader doesn't get a request to update the application code,
the bootloader will start the users application code (sketch).

An ISP programmer is a hardware device used to burn a bootlader in the AVR chip.
The USBasp programmer is one such ISP programmer.
An Arduino board can be loaded with software to allow it to be used as an ISP programmer.

The early Arduino bootloaders had a bug/code oversight in them in that if the application code
used the Watchdog timer and a watchdog reset occurs, the bootloader doesn't properly
initialize things after a watchdog reset and a watchdog reset occurs over and over again.
The way to fix this is to burn a new bootloader with updated code.
To burn a new bootloader in the AVR chip requires using an ISP programmer
and a cheap easy to use ISP programmer is the USBasp programmer than johnwasser referred
to.

Hope that clears it up.

--- bill

it does. very much so. thanks.