Go Down

Topic: Standalone ATMEGA328 with CP2102 USB-Serial Converter (Read 6817 times) previous topic - next topic

docosama

Hi there

I am trouble uploading sketches and communicating with standalone ATmega328 using CP2102 USB-Serial Converter module (from China).  The Pin Configuration is :

USB-Converter Pin: .......... Atmega328
RX                            Pin 3
TX                            Pin 2
DTR                          Pin 1 via 100nf Capacitor
5V                            Pins 7, 20, 21
Gnd                         Pins 8, 22

Atmega328 has 16Mhz Crystal with a pair of 22pf attached as standard.

I have tried different combinations but all failed ..  Following is the result: avrdude: stk500_getsync(): not in sync: resp=0x00

the Arduino IDE is set to :
Board: Arduino Nano / 328
Programmer: AVRIsp mkll

Atmega328 was loaded with Boardloader earlier and a blink sketch was uploaded using ArduinoISP method given on Arduino's Website.  With normal power, the Pin 13 blinks Led normally. But new sketch is not getting through.

Please help ...



tack


....

Atmega328 was loaded with Boardloader earlier and a blink sketch was uploaded using ArduinoISP method given on Arduino's Website.  With normal power, the Pin 13 blinks Led normally. But new sketch is not getting through.

Please help ...


If you used 'Upload via Programmer' AFTER burning your bootloader then you will have overwritten the bootloader.

You need to burn the bootloader again and then load your sketch using the normal serial method with your CP2102.

At the moment you are getting the error because there is no bootloader to accept the serial upload.

Paul__B

You didn't mention the 10k pull-up on the reset pin - pin 1.

docosama

10k pull up resistor is added. Sorry I forgot to mention.

I bought Atmega328 without bootloader and burnt it using the method described on the arduino website. And uploaded the blink sketch in it and it works very well. I am wondering how come the bootloader is corrupt ?

I am thinking to upload the sketch using the method described in http://blog.biophysengr.net/2012/06/writing-sketches-to-atmega386p-pre.html.

What other method of uploading bootloader you guys mention ?



tack

The bootloader isn't 'corrupt'; it is non-existent.

You burnt the bootloader correctly but then you uploaded a sketch using ICSP, rather than serial. The act of uploading via ICSP wiped the bootloader that you had just installed.

Once you have the bootloader burnt then ONLY upload sketches via serial. If you upload via ICSP 'Upload using Programmer' at any time then you will overwrite the bootloader.

docosama

well, this is a nice suggestion ... i'll try it out and will let you know

docosama

This worked ... thanks everybody ...
i hope that somebody else would also get help from our discussion ...


bigwhitebird29

I've tried all these suggestions, still getting the same error....


Arduino: 1.8.5 (Linux), Board: "Arduino Nano, ATmega328P"

Sketch uses 928 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

bigwhitebird29

nevermind, I got it to work... Not sure what I've done different this time, but I just put everything away for a while, came back and rebuilt and it worked.

Go Up