Running Baby-O at 8MHz

Is it possible for the Baby-O to run at 8MHz by resetting the fuse bits?

I want to do this for testing purposes, since I have code that now runs properly on the Orangutan but does not run properly on the Baby-O. So as a test, I’d like to make the Baby-O’s clock similar to the Orangutan. The code is bit-banged serial (emulating SPI) for interfacing to the HC4LED.

- Rommel

It’s quite easy, if you’re using AVRStudio. From the AVR device programming window select the fuses tab. You probably want to note which fuse is selected, mine is currently fourth from the bottom, “Ext. Crystal Osc; Frequency 8.0- MHz…”.

Anyway, to switch to the internal 8MHz oscillator, check one of the “Int RC Osc. 8MHz…” fuses. If you scroll to the right, one says “default value” at the very end, that’s the one I usually use. Hit program and you’re set! Hitting program from this tab shouldn’t even change the hex code on the AVR. To switch back, just select the original external oscillator fuse and hit program again.

Good luck!

-Adam

Thanks!

I actually didn’t notice the item with the “default” string in it until you mentioned it.

[Added comment below]

Am not sure how this will affect the Baby-O. Crystal is installed but I’ll be forcing it to use the internal oscillator. Could this make the Baby-O unstable? Could be a recipe for problems :slight_smile:

Yeah, it would be nice if they would put that at the beginning where you would actually see it. Does anyone have a good understanding of what the rest of the clock fuse information means?

i.e. start-up time PWRDWN/RESET: 1K CK/14CK + 65ms

-Adam

Adam,

I was also researching this when I was trying to figure out the fclock to use for SPI. Needless to say I gave up and just bit-banged a couple of ports.

I think Section 7 of the ATmega48/88/168 data sheet describes these items. For easier reading the information from the data sheet is duplicated here (and explained a little):
scienceprog.com/programming- … -settings/

I understand the concept a bit, but I’m not an electrical engineer so I can’t properly explain it (and I will not try, for fear of eating my own word later) :slight_smile:

- Rommel

As Rommel has said, pages 25 - 36 mega48/88/168 datasheet talk about the SUT and CKSEL settings in detail. The rest of the clock fuse settings determine how long the device will take to start up after a power-down, power-save, or reset. You need to allow enough time to ensure sufficient Vcc and enough time for the oscillator to stablize, and the amount of time needed will depend on your clock source.

- Ben