I've detached the microcontroller from my Arduino Uno, and I've put it on a breadboard, and then I've burnt the standalone 8MHz bootloader onto it using a friend of mine's Arduino Uno as ISP. The problem about the expected external signal clock has been solved with this sketch, that outputs an 8MHz square wave from pin 9.
Now, how can I upload a sketch via an USB-to-Serial adapter based on CP2102?
Connections:
Pin 1 -> button, that is connected to GND
Pin 2 -> adapter TX pin
Pin 3 -> adapter RXpin
Pin 7 -> 3.3V
Pin 8 -> GND
Pin 20 -> 3.3V
Pin 22 -> GND
My adapter does not feature the DTR pin, but I own a spare button. Currently avrdude tries 10 times to upload any sketch, then it fails. I suppose I'm wrong either on the timing or with some electronic connection... Can you help me?
Get a usb-to-serial adapter with DTR.
Some Arduino users say they can press reset and at the release of the button upload a sketch. For me that is almost impossible.
I don't understand your list with pin numbers and what is connected.
Is that bootloader for 8MHz external clock ? Did you add a crystal ?
Actually that's impossible to me too, but I'm not going to replace my brand new serial adapter with another one with DTR, I can workaround that with the Arduino Uno board, even though this isn't comfortable because I have to move wires every time I have to upload some code, since my project does not involve the board.
Connection list I've posted is about connections between the ATmega and the serial adapter, which is the (I think) correct configuration to upload sketches onto the microcontroller. Pin numbers are for the ATmega, of course. And last, the microcontroller uses the built-in 8MHz crystal, no need for an external one.
Please excuse me if I'm not clear.
I see.
A 10k resistor is used from ATmega pin 1 to 3.3V.
You also need decoupling capacitor(s). For example 100nF to 3.3V and GND.
Some serial adapters label the RX as TX and TX as RX or vice versa. You might have to try to exchange them.
How do you know that the ATmega328P is running on the internal oscillator ?
Where did the bootloader come from ? Is it a bootloader for 8MHz and internal oscillator ? Are you sure ?
There are too many unknown things.
I suggest to add a resistor and led to Arduino pin 13 (ATmega pin 19) and use a programmer (or Arduino as ISP) and upload a sketch that makes the led blink. Does it still blink when the ATmega328P is running on its own ? Uploading a sketch with a programmer removes the bootloader. You have to burn the bootloader again to try uploading a sketch via the usb-serial adapter.