I have my 328p-AU breadboarded at 3.3v. TX and RX (pins 2&3) are taken over to my UNO and that is used to simply display debug information in the serial monitor.
8Mhz external crystal (which I suspect is the reason for this question)
In my 328p Code, I declare Serial.begin(9600);
The Uno (which has code loaded so it acts as an ISP) also has Serial.begin(9600); declared in that code.
So how come my serial monitor only decodes the data at 1200 Baud?
You get zip at 9600.
Setting the fuses?
In my IDE, I have the options set to 8Mhz external (Minicore), which gets written when I upload the bootloader doesn't it?
How do I change the fuses then and which one is incorrect?
I have tried uploading with the bootloader option set to Yes... but it did not change anything (but seemed to successfully load)
Do I need to do anything else apart from select bootloader 'Y' in that Minicore options list?
I should add that I did have all the fuses set correctly to start with.
It's entirely possible that I uploaded a modified sketch and didn't notice the annoying feature where is resets all the upload fields when you switch processors.
Therefore, I could have over-written the original bootloader settings
When you get the ATmega328P chip from the factory, the configuration fuses are set for it to run at 1 MHz off the internal oscillator. The reason you're getting 1200/9600 = 1/8 of the expected baud rate is because your clock is running at 1/8 the expected 8 MHz. You need to set the configuration fuses so that the microcontroller knows to use the external 8MHz clock.
The way this is done in the Arduino IDE is via Tools > Burn Bootloader. What's not obvious is that Burn Bootloader actually does two things:
Set the microcontroller's configuration fuses according to the definition of the currently selected board (including custom Tools menus).
Flash the bootloader to the microcontroller
Even if you don't care about the second part of the process, it's still the easiest way to correctly set the fuses. Upload Using Programmer does not set fuses.
So just do a Tools > Burn Bootloader and your problem will be solved.
Pretty sure I tried that, but I will have another go when it's not -3 degrees in my garage!
Never even occurred to me that the fuses didn't set correctly.
Thank you for the advice.
I have to say, I am finding working with these 3.3v IC's a challenge due to my dodgy knowledge.
5v is pretty easy, as it's a lot harder to fry something!
Maybe I should get some level shifters and use those to connect to my 3.3v sensors instead and run the Arduino on 5v.