Does anyone know if there is some difference between the 328 and the 328p that will affect Serial.print? I made my own Nano board and I guess I ordered 328 instead of 328P. I only found that out when bootloading with AVRISP and AVR Studio reports. I loaded the Optiboot Boot loader. It runs the Blink sketch no problem but when I add a Serial.Print command, it just prints garbage. When I do the same with my original Nano, it prints fine. Any help or input would be appreciated. Sorry I am a noob who may be doing something wrong.
Does your board use a resonator or crystal?
What values did you use for the fuses?
The 'P' is for PicoPower. It uses less power. But Serial.print should be just the same.
I used a ceramic resonator 16MHz. In the eagle files from Gravitech it says resonator. It looks identical to the one on the original board. Do you think it needs to be a crystal? I did not change the fuse bits. Sorry i am a hardware guy and this is a little new for me.
At 16MHz, I would prefer a crystal. The fuses are different for resonators or crystals (not always).
Could your clock frequency be off? Make a blink sketch with a really long delay, like 20 minutes, and time it with a stopwatch as accurately as you can. An error of <4% is usually ok, but tolerances vary.
Lsnyman: I used a ceramic resonator 16MHz. In the eagle files from Gravitech it says resonator. It looks identical to the one on the original board. Do you think it needs to be a crystal?
I did not change the fuse bits.
From the factory, the processor is configured to run at 1 MHz using the internal oscillator. If you did not change the fuses then it is still configured to run that way.
Do you have another board? Like an Arduino Uno? If you do, use OptiLoader to install the bootloader. It handles all the details including correctly setting the fuses.
I agree with @tim7. A timing test may help determine what's wrong.
(other than the 20 minutes; 15 to 30 seconds is adequate)
I tried Optiloader earlier today and now again. Cannot get it to work. I cannot tell if it is programming the board or not as nothing is on the serial monitor. But when I use the programmed board and try to load a sketch, I get an Avrdude error. These problems led me to buy the avrisp this morning and I am able to burn the bootloader with it. Do you know what the fuse bits should be set to?
Those settings worked with the ATmegaBOOT_168_atmega328.hex but not with the Optiboot file.
thank you, she now speaks English.