0

How do you use Atmega328p-PU from an Uno, on a breadboard without a crystal?

  • By changing the fuses to use the internal oscillator. – Majenko Jun 29 at 14:33
  • You could have the 328P's "fuses" set so it uses it's internal 8Mhz oscillator. In the Arduino IDE you can then select, for example, the Arduino Pro Mini 3.3V (which also runs at 8Mhz) – Gerben Jun 29 at 14:33
  • How do you set the fuses? – Owen Jun 29 at 15:02
  • With a programmer or another Arduino acting as a programmer. – Majenko Jun 29 at 16:19
  • 1
    > bootload it as a Pro Mini 3.3v? how do you do that ? There's an Upload Using Programmer, which requires that you use a Programmer. – DataFiddler Jun 29 at 18:42
0

If you buy your ATmega as supplied by Microchip, through one of the large electronic parts resellers, it will come with its default fuse configuration:

  • clock source: internal 8 MHz RC oscillator
  • clock prescaler enabled at ÷8, yielding a 1 MHz system clock
  • bootloader disabled

You could use it in this configuration, but you will probably want to disable the prescaler. This can be done by changing the right fuse or, alternatively, by some code running early in setup(). Note that, with no bootloader, you will need an ISP programmer in order to load the code. If you want the convenience of serial downloading (i.e. you would use an FTDI cable rather than an ISP programmer), you will have to burn the bootloader using an ISP programmer, and adjust the fuses to enable it and set its size.

If you take the ATmega from an existing Uno board, or buy one preconfigured with the bootloader, the fuses will be set differently:

  • clock source: external crystal
  • clock prescaler disabled
  • bootloader enabled and sized to 0.5 KiB

In this case you will have to change the clock source.

In any case, you would tell the IDE you are using an Arduino Fio, or a Pro or Pro Mini with a 328P clocked at 8 MHz. And you will need an ISP programmer to load either your program or the bootloader. You could use an Arduino running the “Arduino as ISP” firmware for this.

Check the datasheet for the details on configuring the fuses. You can also use one of the online fuse calculators, like this one or this one.

| improve this answer | |
  • Ok thanks for the help. – Owen Jul 1 at 16:49
0

You can use another IC like the 555 timers as an external oscillator.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.