As the subject indicates, I’m Looking for Current 2020 Bare Bones Atmega328P Using Internal Crystal Information. Searching this forum and the INTERNET, plus trying a bunch, I just can’t get where I want to be.
I have URLs about this subject with dates like May, 7, 2014, Dec, 15,2015 & Aug 3, 2017. When I work through the documentation, something always goes wrong, like no longer can find links to needed files, or the provided Sketch won’t compile.(Error resolving FQBN: missing Error compiling for board ATmega328 on a breadboard (8 MHz internal clock).
).. I figure as time goes on, things change with upgrades and cleaning out servers.
You guys have been helpful in the past.
Please point me to some instructions that will help me to bootload a ATMEGA238P chip for internal 8MHz clock then install a Sketch doing something simple like PWM to a single 5 volt LED. I would like to do all with using Arduino Genuio tool, not buying any additional circuitry.
One of the previously mentioned instructions pointed me to a list of breadboard zip files and instructed me to down load the appropriate file. At this stage of my knowledge, I don’t know what the appropriate file was. I downloads all but they unzip to the same file name overlaying the previous.
Much of this may be intuitive to those that have done it one or more times in the past but there are those of us that are trying to teach ourselves. I’ll need more hand holding till I get it.
Someone please be sympathetic and understand my frustration and point me to something that WILL work.
Boy, I'm so new that I didn't realize that the Arduino Genuino was also called an IDE. I thought IDE was hard drive communication/protocols, something just before SATA.
OK. I have the UNO Kit that includes board that will allow the remoal of the ATMEGA328P chip, I have a brad board, jumper wires and several extra ATMEGA328P chips. I do have some 16MHz crystals and 22Pf caps but I want to build a bare bones circuit to NOT use the crystal.
Do you have to include the internal 8MHz option when doing the bootloader?
I do thank you very much for the above information. For the past few hours, I have read and worked through much of the decription.
Being a newbie here, the gethub is suggesting I make decisions and I have no idea as to what decision to make. Yes, after following the instructions, I can see in the IDE where I'm prompted but again, I do not know what to select. Here is an example - 'Select what kind of programmer you're using under the Programmers menu.' There were 9 to choose from.
Are there instructions more similar to these URL that work (for one or more reasons, these are not working for me). It may very well be that I'm not understanding what they intend to convey through the instructions.
billz1:
Here is an example - 'Select what kind of programmer you're using under the Programmers menu.' There were 9 to choose from.
From the information you've provided so far, it sounds like you will probably prefer to use the "Arduino as ISP" programmer. You can learn about that here:
If you have other specific questions, please let us know and we'll help you out.
billz1:
Boy, I'm so new that I didn't realize that the Arduino Genuino was also called an IDE.
It's not. "Arduino" and "Genuino" are trademarks owned by the Arduino company. Those trademarks are used by the Arduino company on their various physical and software products. They are also colloquially used to refer to the framework in general, even parts of it not controlled by Arduino.
One such software product is the Arduino IDE, but it's not correct to call that software product "Arduino Genuino" because that term could refer to many things.
By the way, the "Genuino" trademark is an artifact of a legal dispute over the "Arduino" trademark which was resolved years ago. So the "Genuino" trademark is no longer used and has no real relevance today other than to historians.
billz1:
I thought IDE was hard drive communication/protocols, something just before SATA.
It's true that the IDE acronym can refer to "Integrated Drive Electronics", but in this context it refers to "integrated development environment":
Thanks for all of the information. I'm so new that I don't know what I don't know.
But, what I do know is that somehow, these ATMEGA328Ps can be set up to run from the internal 8MHz clock. What I'm looking for is good, step by step instructions to help me run a PWM program from an ATMEGA328P chip in a barebones circuit using its internal 8MHz clock. I have some regulated 5 volt supplies and PWM programs that do run with a regular Arduino UNO board.
As I said before, the instructions I've tried on gethub and other placed have issues now (may have worked in the past).
Just maybe someone knows of a URL help that will work that a newbie can use.
I learn best by starting with something that works then working out from there. If I try something that doesn't work first, i have no idea what to do to fix (most of the time).
I'm fairly sure that if you have a brand new virgin 328P, then the default configuration of the chip is to run from the internal 8MHz oscillator. And, if memory serves, the chip is initially running at 1MHz because the CKDIV8 fuse bit is set.
There are plenty of examples of a standalone 328P design around. If you search for "minimum arduino circuit", quite a few should appear.
There's also an example on the Arduino website here.
If you are intending to use the internal 8MHz clock, then you can skip the step in the above link where it talks about adding the 16MHz crystal and the 22pF capacitors.
Thanks a bunch for this link. It is not one that popped up on any of my search or it was so far down, I never got to it. I will read and study this.
But, since I alresdy have a UNO board that is suppose to help me with serial interface to the Arduino IDE, I don't really have to purchase all of the components described. My hope was to leverage the UNO board.
Yes, you are right about the brand new ATMEGA328Ps but before I read about the barebones circuit for them, I bootloaded all using the UNO board and a 16MHz crystal. Now I want to do what it takes to have some of the ATMEGA283Ps to use the Internal 8MHz clock.
"I bootloaded all using the UNO board and a 16MHz crystal."
So do the same process, but make the part type, speed, oscillator, etc. selection from the choices that MiniCore adds to the IDE under Tools.
For example, here is the list that comes up with MightyCore, which use for '1284P chips. I would expect MiniCore for 328P would be similar. You have to select Tools and pick one, select Tools and pick the next, until you have made all your choices.
So would select Atmega328 to start. ThenL
Variant: 328P
Bootloader: Yes on UART0
BOD: disabled, or something below the voltage you are running at
Pinout, if there's an option
Clock: find the Internal 8 MHz option
etc.
(I don't have MiniCore installed, so I don't know what is presented.)
Then burn the bootloader, and the fuses should be set and running for internal 8 MHz clock.
If you had previously bootloaded them as Uno, then you may need to have that 16 MHz xtal setup connected for the chip to talk and be reburned.
You said 'If you had previously bootloaded them as Uno, then you may need to have that 16 MHz xtal setup connected for the chip to talk and be reburned.'. So you are saying that switching from 16MHz to 8MHz is a matter of the bootloader program you use and not about the chip finding or not the 16MHz crystal. And the wiring is the same to include the 16MHz crystal to communicate just this time. That clarifies things a bunch!!
I'll use the documentation I have that I used to bootload the 16MHz and select the 8MHz bootloader option. Everything else is the same. I'll get back to you.
Most of the tutorials tend to try to simplify things, using the capabilities provided by the Arduino IDE. And it's the IDE that has changed most in the last 10 years (certainly the ATmega328p itself is the same.)
To actually understand what's going on, you may want to take a step backward/upward, and deal with things from a more conceptual level.
To make an ATmega328P chip run Arduino code using it's internal 8MHz Oscillator, you need to do the following:
Wire up the chip correctly. Both Power and Ground pins should be connected, and you should have two small capacitors (100nF) connected; one near each set of power pins. You will need to connect the ISP pins (SPI and RESET) to a "device programmer." Jumper wires will work, but try not to let them be too long. Make sure you're using a "fresh" ATmega328p; if you take one out of an existing Arduino, it will be configure for, and require, an external crystal.
Using your device programmer, set the ATmega328P "fuses" to the correct value for "internal clock", "no clock divisor", "Reset to booloader", "Bootloader size is xxx" (where xxx depends on exactly which bootloader you're using. 256words (512 bytes) for Optiboot.
Using the device programmer, program the correct bootloader into the chip. (optional. Instead, you can continue to the use ISP programmer to "upload using programmer" any sketches you write.)
(optional) connect serial port to UART pins, so that you can then use the bootloader to upload sketches using the "normal" Arduino buttons.
(2 & 3 can be done together using the Arduino "Burn Bootloader" command. If the board settings are correct.)
Make sure you're using a "fresh" ATmega328p; if you take one out of an existing Arduino, it will be configure for, and require, an external crystal.
Before I knew it was possible to make these ATMEGA328Ps use there internal 8MHz clocks, I boot-loaded them all using an external 16MHz crystal. Is it possible, with an extra step or 2, to set some of these already boot-loaded up for the internal 8MHz clock?
Did you connect a crystal like you were setting up for an Uno, so the chip can talk to the Programmer for burning the fuses?
Yes. I put a 16MHz crystal and 2 22Pf caps like the step by step instructed. I did it to all 10 of the ATMEGA328P chips I got from China. Recently I find out that my PWM program will run just great using the internal clock. I now want to make some of them use the internal 8MHz clock so I can save a little by not including the 16MHz crystal and caps.
I figured it wouldn't be much more difficult than doing a boot-load again on the same ATMEGA238P chips but without the 16MHz crystal circuit.
Yes, you need to reprogram the fuse settings using a programmer (same programmer you used to load the bootloader should work fine).
The CKSEL fuse settings are the ones to look at.
Have a look at the Engbedded Atmel AVR® Fuse Calculator. Select the ATmega328P device and look at the first dropdown selection box under features. One of the settings is marked "default value". That will show you the values you need to program into the fuse bits.
This is my breadboard wiring. I'm having trouble seeing the picture on 'Preview' so I'll use words. Looks like the picture took on the post!! I'm still learning.
Pins 11, 12, & 13 on the UNO Board are connected to pins 17, 18 & 19 on the ATMEGA328P chip wit positive 5 volts from the UNO board on pins 8 & 20 and ground on 9 & 22. Nothing else connected, no resisters, no caps, no crystals... I used this same wiring but included the crystal and 2 22Pf caps. I just removed the 2 caps and crystal.
I'm not knowing what I did wrong to correct. Somebody help me please.