How do you use Atmega328p-PU from an Uno, on a breadboard without a crystal?
2 Answers
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.
bootload it as a Pro Mini 3.3v?
how do you do that ? There's anUpload Using Programmer
, which requires that you use a Programmer.