Using Internal Oscillator On ATmega328P
Using Internal Oscillator On ATmega328P
net
http://waihung.net/using-internal-oscillator-on-atmega328p/
To do this, youll need a programmer. Im using a cheap USBASP bought from ebay.
1/7
2/7
To enable the internal oscillator, youll need to change the fuses on the ATmega328P. In PIC terms, its called the
configuration bits.
Head on to http://www.engbedded.com/fusecalc to help you decide what fuse values to use.
Select ATmega328P and choose Int. Rc Osc. 8MHz (default value). Then proceed to uncheck divide clock by 8
internally.
It will return three sets of hex numbers for you to change using avrdude. Avrdude is a tool designed for flashing
Atmel chips.
3/7
They are E2 D9 and FF. To avoid typing it wrongly in avrdude, they also generated the arguments for you to paste
into the command prompt.
Fire up command prompt and type in the following command.
avrdude -c usbasp -p m328p -U lfuse:w:0xe2:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m
4/7
Ignore the last error that says the verification of the efuse has failed. Choose No when its asking whether to change
back the fuse or not.
Now that youve flashed the fuse to use the internal oscillator, you can still use the Arduino IDE to program your
ATmega328P.
5/7
Be sure to select Upload using programmer. Now your circuit will be much simpler.
6/7
7/7