Atmega328P cant upload code

Hello together,

i want to upload simple code (BlinkWithoutDelay) to my Atmega328P with DEBO2 USB TTL

Unfortunately I got always an error:

Connections are like this:

Can someone helps?

Thank you

1 Like

Does the 328P have a bootloader (and correct fuses) burnt into it?

Also: no bypass caps. :frowning:

Hopefully R1 us ~10k, while R2 is less than 1k, even though they are both labeled "r_small"

2 Likes

sorry, if I wrote ununderstandable.

I dont know. How to check it? If not, could I do it with USB to TTL device?

what do you mean? Should I add something else?

I have update my drawing, please check it:

  • Read these:

as I undestand, I need ArduinoUno as a bootloader at first, right?
so, I cant download program direct with USB-TTL adapter?

unless you specifically bought an "atmega328p with arduino bootloader" from someplace that sells those, you should assume that your chip does NOT have any bootloader installed.

There is a hack to do it with a "full" FTDI adapter (one with all the modem control signals), but in general: "no."
You need a "device programmer" (which COULD be another Arduino running the "Arduino as ISP" sketch.

1 Like

Thank you westfw!

as already mentioned, I am not a master at this case, it means i am just try as a hobby to reach some small things.

by the way, thank you for your answer! I will buy an ArduinoUno to make it as "device programmer".

could you also recommend some microchips like ATmega to use it without DevBoards?

Merci :palm_up_hand:

  • Suggest you use Arduino Pro Mini in your projects.
    You use an FTDI to program them.

About $3.00

1 Like

thank you for your suggest!

I have another sittuation from the beggining.
If I want to use "natural" ATmega, what should I use to program it?

Example:

I want to make a small PingPong game with ATmega328 and OLED Display. How to make it without Dev chip?

  • Suggest you buy one Arduino UNO, use this to put a bootloader on raw chips.
    Pro Minis have Bootloarders already.

  • As mentioned, you need an FTDI board to upload sketches to Pro Minis.
    One time charge ~$4.00

1 Like

any simple power supply for this board?
is it possible to supply with standart AAA Battery?

  • How much current does the OLED need ?

  • An MT3608 can be used to step up lower voltages to 7v then you feed that to the Vin (raw) pin on the Pro Mini.

MT3608

5 for ~$10.00

1 Like

ah, knew it already. But how to have a simply way to use and charge it?

do I can to use and charge at the same moment?

  • Nickel-Metal Hydride batteries could be used, along with the MT3608.
  • You would need a charging circuit.
1 Like

You need a bootloader installed on the chip prior to using a USB to TTL device (you need the bootloader to read the Tx/Rx lines, otherwise they are just GPIO pins).

Without a bootloader, you need an ICSP programmer to program the chip.

1 Like

can you share some examples how to do it?

  1. Most Arduino boards have a six pin ICSP header. Open File > Examples > 11. ArduinoISP > ArduinoISP and install on an Arduino board. Then connect the board you want to program. (refer to https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/)
  2. Use a standalone ICSP programmer (something like this aliexpress.com/item/1005003210742509.html).

Yes, these work pretty well usually. For boards that have the 6-pin ICSP header, just plug in (making sure that the orientation is correct, i.e GND->GND) and then;

Tools->Programmer->USBASP

then make sure your target board is selected and;

Tools->Burn Bootloader

For the Pro Mini you will have to wire up pins 10 - 13 plus GND, perhaps using DuPont jumper wires.

Using one of these you can also program the board directly with;

Sketch->Upload using programmer

The upload is faster, but be aware that it overwrites and does not install a boot-loader. This does not affect the operation of the sketch but it does mean that you can no longer upload sketches over USB. The board is easily restored to 'normal' operation by simply burning the boot-loader again, so you can experiment and then decide on which option you prefer.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.