Menu

Atmega328p flashforth and internal oscillator instead of external crystal

2017-10-30
2017-10-30
  • Kevin Polston

    Kevin Polston - 2017-10-30

    Hi,

    I've got ff5 working on a atmega328p - thanks for the documentation all. However, my current working configuration requires the use of a 16Mhz external oscillator. I'd really like to use the atmega328p without the external oscillator, that is, I'd like to use the internal oscillator. I'm assuming that the fuses (specifically the extended fuse) would require changing? Could anybody help me with the fuse values such that I can use the internal oscillator? Also, would the assembly source code and/or the config require changing to reflect the frequency change - what would the modifications be?

    Thanks
    Kevin

     
  • Mikael Nordman

    Mikael Nordman - 2017-10-30

    Low fuse should be set to 0xa2 or 0xe2 to get the Internal 8 MHz oscillator.
    With the 0xe2 value you can measure the real frequency from the oscOut pin and then set the FREQ_OSC in the config file to the measured value. That should work if the the baud rate error does not happen to become too large.

    Or you can calibrate the internal oscillator to get a more accurate frequency. You need to do this separately for each device. I don't know how.

    Advice on the Googlenet seems to be that the internal oscillator is so inaccurate that it is much easier to just use a crystal.

     
  • Kevin Polston

    Kevin Polston - 2017-11-05

    Many Thanks Mikael - that's the conclusion I came to after much googling. So I guess I'll just have to get used to losing two pins! I haven't experimented with calibration nor oscOout (yet). If I ever get around to it I'll post something.

    PS the following is a nice account of callibration/tuning but I haven't tried it
    http://ernstc.dk/arduino/tinytuner.html

    Thanks
    Kevin

     

Log in to post a comment.