Hello! This is my first post in this community.
I have searched for my issue through this forum, through Google, and through YouTube and while I can find plenty of guides and plenty examples of everything working perfectly fine or plenty of examples of people having other types of issues, I can't seem to find any examples of people having the same issue I am having. I hope someone here can help.
In summary, I am trying to get the ATMEGA328P-PU to run standalone on a breadboard using the internal 8MHz oscillator instead of using an external oscillator.
I have taken inspiration from these sources:
I have successfully used another Arduino as an In-System Programmer, but I prefer to use my MiniPro TL866 universal programmer since it is just much simpler, gives me more control, and requires much less wires and messing around. Either way, the result is the same and I have exhausted all avenues which are apparent to me.
In summary, the issue I have is that if I try to program the ATMEGA328P to use internal oscillator via Arduino as an ISP or if I use the TL866 universal programmer to set the fuse bits manually, the ATMEGA328P doesn't seem to properly start up. I placed the blink sketch in code memory, and the ATMEGA328P runs the blink sketch just fine with an external oscillator. If all I do is set the fuse bits to use the internal oscillator instead of the external oscillator, the blink sketch never starts up. If I simply change the fuse bits back to use the external oscillator, the blink sketch starts up fine. During that process, I never once modified the blink sketch and never once had to re-flash the blink sketch to get it to work. It is simply (not that simple after all!) an issue that the ATMEGA328P does not seem to start using the internal oscillator.
Is the internal oscillator defective? Am I doing something wrong? What in the world!?
This is my low fuse setup:
Fuse Low Byte is set to: 01100010 which is 0x62
This setup should be correct to make the chip run on an 8MHz internal oscillator, the slowest boot time to allow the oscillator to stabilize, option to use the clock output on PORTB0 if I ever wanted it to communicate/sync with another chip, and not divide the clock speed by 8.
I have also tried with clock divide by 8 enabled and with CKOUT on PORTB0 disabled. The problem remains.
This is my high fuse setup:
Fuse High Byte is set to: 11011001 which is 0xD9
This setup should be correct for external reset disabled, debug wire enabled, serial programming and download enabled, watchdog timer always on, EEPROM not reserved from chip erase, and maximum boot size.
Do you see anything wrong with that setup? I have also tried adding #DEFINE F_CPU 1000000UL to the beginning of the blink sketch in case it was confused or unstable from the clock change. Makes no difference though. The blink sketch simply will not run (LED always off) if the internal oscillator is enabled. If toggled back to external oscillator using fuses and connected to an external oscillator, it runs fine. I have even cleared the chip completely, removed the Arduino boot loader, tried the whole process and every combination I could think of over again, had the same problem, put the Arduino boot loader back on it, connected it back to an Arduino Uno board, uploaded Arduino sketches to it just fine like usual, and continued to use it as a normal Arduino board without any issues. So, the chip seems to be working fine in the Arduino environment in every way and also works fine on a breadboard as long as an external oscillator is used.
I am stumped. Is it possible to receive a version of the chip with defective or missing internal oscillator? Do I need to connect a capacitor across VCC and VSS to stabilize the chip for some reason during boot? Any other reason?
Sorry that my first post is so long and so needy. I hope that it is not too long but is also clear and detailed enough. Thank you for any help!