PDA

View Full Version : [Question(s)] arbotix bootloader



drdiode
10-25-2010, 09:31 AM
Hi all, I am looking for info on how to change the bootloader baud rate for the Arbotix (ATMega644P)
to 19200. Can anyone help me out?

lnxfergy
10-25-2010, 09:43 AM
You'd have to change the baud rate in the bootloader source to 19200, recompile the bootloader, and install with an In-System Programmer (ISP).

Why exactly would you change the baud of the bootloader?

-Fergs

drdiode
10-25-2010, 09:48 AM
I am doing wireless uploading at a distance of approx .5 miles using Xbee Pro. Generally works but mostly fails during verification causing Arduino IDE to report a problem uploading. The memory IS
flashed as I can see the results of the changed code in the data coming back from the remote unit.
I thought that lowering the baud rate might make things a bit more reliable. Sometimes I have to hit 'upload' several times before it works, then have to wait for IDE to show error before I can try again.

Thanks

drdiode
10-25-2010, 09:52 AM
Hi, I found the #define baud_rate in ATMegaBOOT.c in Arduino hardware folder and changed to 19200,
now how to recompile? Or is there more to it than that?

THanks

lnxfergy
10-25-2010, 09:54 AM
Have you upgraded the 3.3V regulator on the ArbotiX? If not, it probably can't source enough current to send the data back at full strength -- which could be why you're loosing information on the verification even though the upload goes fine.

-Fergs

drdiode
10-25-2010, 10:03 AM
Yes, the Xbee is powered by its own 3.3V regulator (LD1117V33, good for 800ma). Perhaps I should check it out for a voltage drop during the upload process. What I find strange is that the data coming back is always perfect, never a glitch.

Thanks,

diode

drdiode
10-25-2010, 10:30 AM
OK, checked for voltage drop. Drop is negligible, maybe a coupla tenths. So, I would like to try a different baud rate. Can you give details on how to do this? Do I recompile the ATMegaBOOT.c file,
and if so how?

Thanks,

diode

lnxfergy
10-25-2010, 10:40 AM
I believe you just recompile using the existing makefile -- and then upload using AVRdude -- check around the Arduino site, I know there has been discussion on their forum about how to create custom firmware. I don't think there is any utility inside Arduino IDE to assist in this. Also note -- you need an ISP to upload new firmware.

-Fergs

drdiode
10-25-2010, 11:10 AM
Hi, of course I'm confused! What software do I need to recompile? Does this make new .hex files found in the hardware folder? And, is all I need to change the #define baud_rate in the ATMegaBOOT.c file?

Thanks,

diode

lnxfergy
10-25-2010, 12:07 PM
Hi, of course I'm confused! What software do I need to recompile? Does this make new .hex files found in the hardware folder? And, is all I need to change the #define baud_rate in the ATMegaBOOT.c file?

Thanks,

diode

You would be recompiling ATMegaBOOT.c into a new hex file, using avr-gcc, and then uploading using an ISP and avrdude.

I think all you need to change is the #define baud_rate -- but I'm really not sure -- you should check the Arduino forums, as the developers of the bootloader are likely hanging around there.

-Fergs