Having trouble with a pro-mini (knockoff) 3.3v 8mhz.
If I upload using a cpu Freq of 16 mhz(default pro mini board settings) it works as expected, except the serial monitor has to be set to half the baud rate. As one would expect.
But when I upload a sketch using the expected 8mhz settings, nothing else changed, I get gibberish out the serial monitor no matter what baud rate it's set to.
The cpu clock speed has little to do with the baud rate. simply match the baud rate in the sketch to the ide.
Obviously also pick the correct CPU and clock as I showed it post #2
I have similar boards and have no problems.
Just set the Tools selector to match what is written on the chip in terms of CPU and clock. Set serial monitor baud rate to match sketch baud rate.
I have done this many times.
whatever gave you that idea. Your statement is incorrect. The actually clock-speed in combination with the register settings defines the actual baud-rate. At runtime, a calculation is done to achieve the settings for the registers that matches the requested baud-rate as close as possible and this calculation is done with the clock-speed setting that is provided at compile time. If the Clock speed and the defined macro that hold the clock speed don't match, a calculation will be made based on incorrect input..
It could be that the bootloader has the wrong fuse settings.
I am assuming that the Crystal actually is 8MHz, but the fuses could be set to the internal resonator maybe.
Hmm interesting, but doesn't that require a 32MHz crystal in that case ?
and
Which would mean that the registers are set going from a F_CP of 16MHz while it is actually running at 8MHz. If it was running at 32MHz it would require the Serial monitor to be set at double speed.
eh because ? You will have to elaborate there. Are you saying that the clock-speed of the CPU is 32MHz, but the registers need to be set since there is an 8 MHz Crystal (there isn't a 16MHz one in there obviously) controlling the UART. A simple Yes & No is just not enough unless you are Mika Hakkinen.
Rather than testing serial with F_CPU set to 8 MHz, try the "blink" example, set to blink the LED at 1 Hz, and tell us the actual blink rate.
Incidentally, if the CPU is running from the internal 8 MHz RC oscillator, the frequency can be far enough off to explain gibberish on the serial monitor. But why serial seems to work (at half Baud rate) if F_CPU is set to 16 MHz is not clear.