I can't find a working protocol for programming a standalone Atmega328P with a new version of the Arduino IDE (1.8.9).
I tried to use an older version (1.0x) and I may have uploaded a Bootloader, but there was still an error.
IDE message: "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x1c (Clone)"
After that, I tried to upload with the new version (only the program, not the bootloader, because there is nothing beyond V1.6) and it showed this message:
IDE message: "WARNING: invalid value for unused bits in fuse "refuse", should be set to 1 according to the datasheet
This behavior is deprecated and will result in an error in a future version
You probably want to use 0xfd instead of 0x05 (double-check with your datasheet first)."
I've been looking everywhere, but everyone seems to use the version with the crystal. I want 8mhz and no crystal and I don't have an Arduino with the removable chip.
I have Arduino mega, uno and nano, and Attiny85 chip on my disposal, so if anyone has any ideas please comment.
Check the "efuse" (extended fuse byte) for the board type you are selecting in boards.txt.
It is probably set to 0xF5, or 0b11110101. Only the lower 3 bits are used, unused bits read back as a 1.
Changing 0xF5 to 0xFD, 0r 0b11111101, will take care of the depracation warning.
Read thru boards.txt and (//Arduino/hardware/ardiuno/avr folder)
I think one of these will work for internal oscillator operation:
Much better is to just ignore that warning. It's normal and expected and doesn't indicate any problem. Why waste time messing with fuses for absolutely no reason?
pert:
Much better is to just ignore that warning. It's normal and expected and doesn't indicate any problem. Why waste time messing with fuses for absolutely no reason?
Warning is not the only issue. It just doesn't work. I tested it with blinking led, nothing happened.
Make sure you have the LED connected to the right pin. It's very common for people to get mixed up about the pins when they are working with standalone chips. You need to understand that Arduino pin numbers are arbitrarily assigned to pins and that there is no relation between physical pin number and Arduino pin number. Look up the pin mapping to see which pin on the ATmega328P relates to which pin on the chip.
CrossRoads:
Check the "efuse" (extended fuse byte) for the board type you are selecting in boards.txt.
It is probably set to 0xF5, or 0b11110101. Only the lower 3 bits are used, unused bits read back as a 1.
Changing 0xF5 to 0xFD, 0r 0b11111101, will take care of the depracation warning.
Read thru boards.txt and (//Arduino/hardware/ardiuno/avr folder)
I think one of these will work for internal oscillator operation:
Ok, but which procedure for upload should I use? My arduino has SMD chip and I'm not sure if I can use pin 2 and 3 to TX and RX procedure (as I can't remove my chip).
I am currently using the USBTINY programmer and the MiniCore package for programming atmega328PB with no bootloader, it has been working perfectly, since it uses ISCP protocol for uploading the code, you should be able to program those chips via SPI, just go through the Datasheet and set the appropriates fuses for the internal crystal.
... just go through the Datasheet and set the appropriates fuses for the internal crystal.
Not even necessary for that when using MiniCore.
Just set the options under Tools for the 328P and how you want to run the processor (clock options e.g "8MHz Internal" - with or without bootloader etc ) and burn the bootloader (must be using ICSP - can use and UNO running "Arduino as ISP"). That will sort all the fuse options for you.