Go Down

Topic: "Converting" a ATMEGA328P with Uno bootloader to 8mhz (Read 8608 times) previous topic - next topic

jtlns

Hi everyone,

I have a couple of ATMEGA328P-PU chips with the Uno bootloader happily running at 16Mhz (with an external crystal/clock). My goal is to "convert" them to 8Mhz, using the internal clock. I already figured out I need to upload a new bootloader and change the fuse settings. I tried to accomplish this using an Arduino Uno as ISP, see http://arduino.cc/en/Tutorial/ArduinoISP. On this page I found this wiring:


But I'm not successful when trying to burn the bootloader (in the Extra menu of the Arduino IDE), I get the error "avrdude: stk500_getsync(): not in sync: resp=0x00".

Can anybody confirm this is the right approach to accomplish what I'm trying to do?

Thanks!
Jan

hiduino

Did you burn the bootloader and fuse settings with the 16MHz crystal still connected first, before removing the crystal?



jtlns


Your target 328 device needs a clock source or the UNO can't program it.

Thanks for the tip, how can I add the clock source? Adding a crystal? If so should it be a 16Mhz or 8Mhz?


Did you burn the bootloader and fuse settings with the 16MHz crystal still connected first, before removing the crystal?

Thanks for the reply! tried without a crystal connected. (I bought the chips with a bootloader on them, so I didn't burn the 16Mhz bootloader)

pito

Quote
My goal is to "convert" them to 8Mhz, using the internal clock

The internal frequency is not exactly 8MHz. You must calibrate it with the OSCCAL. 

jtlns


Yes, you will either need to add  a crystal (8 or 16 MHZ, doesn't really matter, just wire as shown on the page you linked)

Or

You can also use an ISP sketch that provides a clock source like this one:
https://github.com/adafruit/ArduinoISP

Which provides an 8 MHz clock signal on the UNO's Digital 9 pin, which then needs to be jumpered to pin 9 of the target 328.

Thanks for the great advice! It's now working!

danzz

Hi... May you explain how you did it!?... Im having the same problem, but Im still learning and I cant figure out how to do it properly.

thanks!!

tylernt

http://forum.arduino.cc/index.php?topic=124879.0

The bug mentioned there is no longer present in the latest version of the IDE.

Go Up