Open Rudis1261 opened 2 years ago
Thanks for the useful material, this doc do the same thing in another approach https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoToBreadboard/
Or from the comments inside the source code
To program
* 1) Select the following settings under (Tools)
* Board->Minicore->Atmega328
* Clock->Internal 8MHz
* BOD->BOD 2.7V
* EEPROM->EEPROM retained
* Compiler LTO->LTO Disabled
* Variant->328P / 328PA
* Bootloader->No bootloader
* 2) Set programmer of choice, e.g.'Arduino as ISP (MiniCore)', 'USB ASP', etc, and set correct port.
* 3) Burn bootloader (to set fuses correctly)
* 4) Compile and upload
I was upload without set fuse nor use minicore to set internal clock but just sodering chip on this board, Then I'm using breadboard with DIP 16M external clock attach to XTAL1 and XTAL2 (PIN7, 8), after this I can comminucate with 328p by programmer again.
I had my boards assembled with the Atmega already on them. Is there a way to do what GreatScott did in his video with a function generator? I can not seem to be able to get the bootloader to sync. Is it only possible to do it with an external clock or taking one from an existing Arduino?
You need to follow the setup at above to enable built-in clock.
Clock->Internal 8MHz
For your circumstance, you need a external clock to do this setup work. after that, you won't need external clock.
So after some research, I found how to set the 328p fuse to use the internal clock in case you want to repurpose an Arduino with a suitable chip like a lilypad, or nano or something similar. You need to set this fuse back to factory because Arduinos by default get switched to an external clock instead of it's internal one.
You will need to hook up the Arduino on the ICSP headers, and use another Arduino programmed as an Arduino as ISP to program the target 328p board.
And you need to set the fuse prior to de-soldering the chip from the Arduino to use in the solder reflow plate. Otherwise you will not be able to program it from the ICSP headers once on the solder reflow plate.
Using this command you can set the fuse to tell the Arduino to use the internal clock:
The command broken down:
Hope this helps someone.
A great video explaining this, and what got me to an answer: https://www.youtube.com/watch?v=Q2DakPocvfs