Uploads to a AtMega 168P (Pro Mini) are running at 19200 baud, see following serial ouptut when uploading:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Erik\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM6
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATmega168
However my boards.txt for that board declares 57200:
## Arduino Pro Mini (5V, 16 MHz) w/ ATmega168
## -------------------------------------------------
pro.menu.cpu.16MHzatmega168=ATmega168 (5V, 16 MHz)
pro.menu.cpu.16MHzatmega168.upload.maximum_size=14336
pro.menu.cpu.16MHzatmega168.upload.maximum_data_size=1024
pro.menu.cpu.16MHzatmega168.upload.speed=57600
pro.menu.cpu.16MHzatmega168.bootloader.low_fuses=0xff
pro.menu.cpu.16MHzatmega168.bootloader.high_fuses=0xdd
pro.menu.cpu.16MHzatmega168.bootloader.extended_fuses=0xF8
pro.menu.cpu.16MHzatmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex
pro.menu.cpu.16MHzatmega168.build.mcu=atmega168
pro.menu.cpu.16MHzatmega168.build.f_cpu=16000000L
## Arduino Pro Mini (3.3V, 8 MHz) w/ ATmega168
## --------------------------------------------------
pro.menu.cpu.8MHzatmega168=ATmega168 (3.3V, 8 MHz)
pro.menu.cpu.8MHzatmega168.upload.maximum_size=14336
pro.menu.cpu.8MHzatmega168.upload.maximum_data_size=1024
pro.menu.cpu.8MHzatmega168.upload.speed=57600
pro.menu.cpu.8MHzatmega168.bootloader.low_fuses=0xc6
pro.menu.cpu.8MHzatmega168.bootloader.high_fuses=0xdd
pro.menu.cpu.8MHzatmega168.bootloader.extended_fuses=0xF8
pro.menu.cpu.8MHzatmega168.bootloader.file=atmega/ATmegaBOOT_168_pro_8MHz.hex
pro.menu.cpu.8MHzatmega168.build.mcu=atmega168
pro.menu.cpu.8MHzatmega168.build.f_cpu=8000000L
How to get the bootloader to use 57200 (or a different) baud rate?
That was my question: how to change from 19200 baud?
I don't know, I have never done that and don't know that you can in any case.
Hi @brice3010 .
Then you must be using an "Arduino as ISP" programmer to upload the sketch rather than uploading via a USB to serial bridge adapter module.
That is the baud rate used when performing uploads via a USB to serial bridge adapter module. It is not used when uploading via an ISP programmer.
The baud rate used for the "Arduino as ISP" programmer is configured by the definition for that programmer in the programmers.txt
configuration file:
If you are using an ISP programmer to upload the sketch then there is no bootloader.
Please provide a detailed description of the reason why you want do do this.
jim-p
June 1, 2025, 2:19pm
6
Doesn't that mean via the USB port.
Hi @ptillisch I am using a CP2301 USB-to-serial adapter (no DTR, I reset the Pro Mini manually).
That why I find it strange that, even though I had set my boards.txt baudrate for that particular board version (Pro Mini ATmega168 to 57600.
jim-p
June 1, 2025, 2:29pm
9
I just changed my boards.txt from 19200 to 57200 and it now says
Overriding Baud Rate : 57200
Are you sure you changed the correct boards.txt file?
Which board package & version do you have? The boards.txt file in the Arduino AVR package, verison 1.8.6, shows 19200 baud:
## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168
## -------------------------------------------------
pro.menu.cpu.16MHzatmega168=ATmega168 (5V, 16 MHz)
pro.menu.cpu.16MHzatmega168.upload.maximum_size=14336
pro.menu.cpu.16MHzatmega168.upload.maximum_data_size=1024
pro.menu.cpu.16MHzatmega168.upload.speed=19200
pro.menu.cpu.16MHzatmega168.bootloader.low_fuses=0xff
pro.menu.cpu.16MHzatmega168.bootloader.high_fuses=0xdd
pro.menu.cpu.16MHzatmega168.bootloader.extended_fuses=0xF8
pro.menu.cpu.16MHzatmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex
pro.menu.cpu.16MHzatmega168.build.mcu=atmega168
pro.menu.cpu.16MHzatmega168.build.f_cpu=16000000L
## Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168
## --------------------------------------------------
pro.menu.cpu.8MHzatmega168=ATmega168 (3.3V, 8 MHz)
pro.menu.cpu.8MHzatmega168.upload.maximum_size=14336
pro.menu.cpu.8MHzatmega168.upload.maximum_data_size=1024
pro.menu.cpu.8MHzatmega168.upload.speed=19200
pro.menu.cpu.8MHzatmega168.bootloader.low_fuses=0xc6
pro.menu.cpu.8MHzatmega168.bootloader.high_fuses=0xdd
pro.menu.cpu.8MHzatmega168.bootloader.extended_fuses=0xF8
pro.menu.cpu.8MHzatmega168.bootloader.file=atmega/ATmegaBOOT_168_pro_8MHz.hex
pro.menu.cpu.8MHzatmega168.build.mcu=atmega168
pro.menu.cpu.8MHzatmega168.build.f_cpu=8000000L
Also, if you have modified the boards.txt file, did you close and re-open the IDE to make sure it recognized the changes?
Have you burned a bootloader to the atmega168 that expects 57600 baud?
Do you mean 57600? Not sure if 57200 would even work since its not a standard baud rate.
I use the boards.txt file from ...\users\Erik\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\
Ahhh !! ... no I did not.
My mistake, "57200" should be "57600"..
There was a bugin one of the IDE 2.x versions; changes in biards.txt and platform.txt are not honoured. I'm not sure if it was solved, I will have to check tomorrow. Which IDE are you using?
For IDE 1.x you need to close the IDE and start it again for the changes to take effect.
westfw
June 1, 2025, 10:49pm
14
No. The default programming speed for an 8MHz atmega168 Pro Mini is 19200bps (presumably for historical reasons.)
Again, no. "Arduino" is the programmer type for both "old" and Optiboot bootloaders on AVRs. It includes the auto-reset pin wiggle and avoids use of the STK500v1 "generic SPI sequence" command.
Thanks for pointing that out. I was wrong about this. I apologize for any confusion caused by my mistake.
jim-p
June 2, 2025, 8:28am
16
westfw:
Again, no.
Well if not USB and not ISP then what is it?