For my case, I’m using an Arduino Uno board to program a standalone ATmega328P. I could successfully program the standalone ATMega328P via Arduino as ISP, and the wiring connections are three pins for SPI (mosi, miso, call), 5V from the Arduino uno to VCC on ATmega328P, common GND, and pin 10 from uno to ATmega328 left top pin (10k pull up resistor connected). Besides, I have 16MHz external oscillator and 20pF capacitors connected with ATmega328P on the breadboard. Everything WORKs GREAT!
However, for saving the power as well as my project purpose, I switched to external 8MHz crystal oscillator, and successfully burned the boot loader as well! This is done by utilizing Minicore and having the right configurations! I need to change powering the target board 3.3V on VCC instead of 5V, via Arduino as isp.
On the breadboard, I could upload the sketch using programmer to blink the LED successfully, with 3.3V from uno to the ATmega328P.
However!!! Once I tested on my PCB board, I have to connect the VCC of the ATmega328P on the PCB to 5V to blink a led. Otherwise !!! Using 3.3V to power it’s Vcc, the sketch would be successfully programmed as the Arduino IDE prints out, it’s successfully written to the Flash!!! But the LED would not blink!! Then directly moving the VCC on ATmega328P from 3.3v to 5V, nothing will happen either!!! Could someone tell me why? The code was really uploaded successfully!!!!
Thanks for your response. How would voltage tolerance help? I’m giving 3.3V, so I don’t need to worry about it, right?
This schematic shows how I connect the Arduino uno to standalone ATmega328P. Besides, on my breadboard I have a red LED and a resistor in series with it connected to Pin 9 on ATmega to debug.
But the thing is…everything works fine on breadboard. I could connect 3.3V from Arduino uno to ATmega chip and successfully upload the code via Arduino as ISP, verified by changing the LED blinking delay.
But using an ATmega328P on soft PCB, same circuitry (only one concern I have is that on the soft PCB, there are temp sensor, IMU, a Rfm95 connected to ATmega328p already), the blink code could only be uploaded correctly, but led does not blink. It only started blinking when I upload the code by connecting VCC to 5V (if I upload by VCC 3.3V, led does not blink even if I successfully uploaded the code based on IDE shows, and then switch VCC to 5V directly without uploading code again, the LED still does not blink)
I played around with BOD, so I tested with BOD 2.7V as well as disabled it. When I upload using programmer, if and only if I connect VCC on Atmega328p to 5V, the code could work by testing led blink. Connected to 3.3V, it says the code being successfully written but I don’t see led blinks at all, and even from there I change VCC line to 5V, led would not blink either, which basically tells me that the code is not on the ATmega328P? Or it tells me its reset messed up somehow
If the chip is powered with 3V3, any pin connected to UNO can be damaged by HI logic state since UNO has 5V. Hence, you should use 5V power for the target chip during the upload.
I am pretty familiar with this schematics, but this looks like modification:
I could connect 3.3V from Arduino uno to ATmega chip and successfully upload the code via Arduino as ISP
Your schematics does not contain LED. Show the real one.
Sorry I don’t have a schematic, and I don’t have the board with me rn. But it’s just a led and 100ohm resistor connected to pin 9 on the standalone ATmega328P, and the rest of wiring is the same to this schematic.
I need to upload by having VCC connected to 3.3V please, and I know others might be broken because of 5V for uno’s pin, but Atmega328P should be okay right? If I connect Vcc 3.3V but spi pins to uno board (5V on any pin I think)
I see no verification step after upload, so there is no way to tell if the write action went well. See the preferences screen in my earlier post and check "verify code after upload".
You mentioned you don't have the board with you right now, so how did you manage to upload to a board you don't have?? Or is this an upload to the breadboard 328P ?
Also better to copy and paste the text from the window, than screenshots. In a screenshot I cannot scroll right to the end of the lines to see the full output.