SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By cappy
#133686
I've bought some of these ATMEGA328 prototype boards
http://www.makershed.com/ProductDetails ... ode=MKSKL4.

Due to the fact that I need to interface this to 3.3V logic, I need to change the regulator on this board
to a 3.3V regulator.

The data sheet for the ATMEGA328 shows that I need to lower the clock so the chip will be in the safe zone.

Since the ATMEGA328 has an internal 8MHZ oscillator, I think it makes perfect sense to use it,
since my project does not need to run very fast.

I was told that I need to change the bootloader if I change the clock.

Would someone point me to information on..

1. How do I configure the 328 to run using the built in 8MHZ oscillator?
3. How do I change the bootloader?
2. Where do I get the code to change the bootloader?


thanks in advance
By coryduce
#137733
You have a few options:

1) Use level shifters.
Add level shifters to allow your 5V processor to interface to your 3.3V logic. Depending on what you are interfacing to, this may be as simple as a few resistors, or as complicated as a few more chips or FETS.

2) Change the regulator.
Even though it is outside of spec, the ATmega328 will run at 16MHz with a 3.3V supply. We have been doing this with our Mongoose 9DOF IMU, and I know the guys at Flytron have also been doing it on a few of their products and I haven't seen or heard of any problems. So the simplest solution may be to just change the regulator to 3.3V and leave the bootloader crystal and code as is.

3) Change the regulator, crystal, and bootloader.
If you want to operate the processor within spec you will need to do the following:
i) Change the reg to 3.3V
ii) Change the crystal to a 8MHz version
iii) Change the bootloader to "Arduino Pro or Pro Mini (3.3V 8MHz) w/ ATmega328"

To change the bootloader you will need a AVR programmer such as the AVRISP mkII. Startup the Arduino IDE, select "Arduino Pro or Pro Mini (3.3V 8MHz) w/ ATmega328" from the "Tools" -> "Board" Menu, plug the programmer into the 6pin ISP port on your board, and then select "Tools" -> "Burn Bootloader" -> "w/ AVRISP mkII".