Which programmer for arduino nano and cp2102 usb device?

Hello,

i´ve programmed my arduino uno with an usb atmega programmer over icsp. This device where connected by the USBasp and everything was fine. Now i won´t to program an arduino nano and i have a cp2102 usb device, which is also recognized by windows (in a virtual machine on Mac OSX over vmware). But it seems that the programmer is wrong, neither programmer could program the nano, how can i program it ?

regards

and thank you for your help!

The nano has it's own USB port.
Do you need to program it through ICSP, destroying its bootloader ?
"Neither programmer" seems to mean you have tried different programmers, yet you mentioned 1.

Are you sure you connected the ICSP plug with the correct orientation ?
It can be plugged in wrong.
Pin 1 is marked at the right hand side (where you might expect it at the left hand side)
Have a peek at this picture (from the official Arduino site), you can click it to enlarge.

If you want to program an other board than the nano (pro mini perhaps), you might want to have a look at the reset.
The board needs to be reset in order to start uploading using the bootloader.
The DTR pin of the serial connection is used for that.
Is that functional on your interface ?

Hello MAS3,

I use the arduino IDE on Windows. But my arduino nano has no usb interface, it only has rx, tx, and no icsp. For that i bought the cp2102 which is recognized by windows and the IDE, but whatever i use in the ide,

Tools->Programmer->

  • AVR ISP
  • AVR ISP MKII
  • USBTinyISP
  • USBasp
  • Parallel Programmer
  • Ardiuno as ISP

nothing succeeds. It always complains that the programmer is not found:

  • avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)
    or
  • avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc
    ...

Windows recognizes the CP2102, but it will not program because it will not find the device.

Ok, you are right, it is the pro mini, but it will also not work.

regards

If your 'nano' has no USB interface it is not a Nano, it is most likly a ProMini or a promini clone.
Connect the CP2102 to Rx, Tx, Gnd, VCC, and press reset when the IDE shows "compiled xxx of 3xxx bytes".
Can be easier to get the timing of the that press by selecting File:Preferencs and checking Verbose outputs.
You may need to swap the Rx/Tx connections. One way or the other will work.
If your CP2102 has a DTR pin, connect to the DTR pin on the Promini (the pin labeled "GRN" (for green) on the end of the promini.

Hello Crossroads,

i´ve connected all Pins, RX, TX, GND and VCC, but the same errors. The CP2102 hat a DTR pin, but in the pro mini, there is no pin labeled "GRN" only ground. The programmer complains: "avrdude: stk500_getsync(): not in sync: resp=0xf8"

regards

Can you provide a photo or a link to the pro mini you have ?
Then someone can have a look at it to see where the pins should connect.

You say windows recognizes the cp2102, do you get an extra serial port when you connect it (look in windows device manager) ?
Do you see any activity (blinking LEDs) when you are uploading ?
Are you able to do the loopback test ?
Connect RX and TX of that module and start a terminal program.
See if text entered is echoed.

The promini has 6 pins across the end - BLK (ground), CTS (also ground), VCC, RX, Tx, and DTR (normally labelled GRN) as can be seen in this ProMini from www.gravitech.us picture. DTR/GRN is the bottom right hand pin.
http://ep.yimg.com/ca/I/yhst-27389313707334_2252_119224678

Hmm Crossroads,

that mysterious, mine has no "GRN" pin. I soldered on the CP2102 the DTR pin and connected it to the pin, where you supposed that the "GRN" should be.

@MAS3,

i attach a photo from my pro mini.

The log of the upload ist:

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Programme\Arduino\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM9
Using Programmer : stk500v1
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [06]
avrdude: stk500_getsync(): not in sync: resp=0x06

avrdude done. Thank you.

The progress is, that it seems, that it recognizes the device, but is "not in sync", whatever it means. I attached an image of my pro mini. (it uploads, but it does not show the image)

So yours is labeled DTR instead. That makes it pretty clear.
You don't appear to have anything plugged on to it.

It's also possible the promini is not bootloaded. Where did you get it from?

hmm,

i soldered the DTR from CP2021 and connected it, according to your advice, to the DTR in the pro mini. If it has no boat loader, i tried to install it, but the result is the same:

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Programme\Arduino\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM9
Using Programmer : stk500v1
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [f8]
avrdude: stk500_getsync(): not in sync: resp=0xf8

avrdude done. Thank you.

@MAS3,

yes i crossed the RX and TX on the CP2021, and the Hyperterminal is echoing the typed characters.

regards

and thank you for the back up!

p.s.:

When i connect the hyper terminal to the CP2102, it says for a short time:

EáAllOn
AllOff
AllOn
AllOff
AllOn
AllOff

(and then garbage)

@crossroads: i think, i bought them in china...

You need to clean that keyboard of yours..

Did you set the correct settings ?
Is that pro mini a 3 volt or a 5 volt version ?
That's an important part, as the 3 volt does 8 MHz maximum, and the 5 volt can do 16 MHz.

My IDE defaults to AVRISP mkII , aas i never had the need to set it different from that.

You could mention what color wire has which function, we are now guessing.
The colors do not match what is usually used, as far as i can see.

(I think, that some solder landed on my keyboard, but beside of that, i should clean it, yes...)

The pro mini is 5V 16 Mhz, which is marked on the back.

The connections are:

CP2102 <---> Arduino

VCC - VCC
RX - TX (or vice avis)
TX - RX
Gnd Gnd

DTR - DTR (sometimes to try out)

regards

coliban:
@MAS3,

When i connect the hyper terminal to the CP2102, it says for a short time:

EáAllOn
AllOff
AllOn
AllOff
AllOn
AllOff

(and then garbage)

I'll have a look with my pro mini's in a moment.
I've got some laying around, which came with the blink sketch preprogrammed, and had 2 without the bootloader.
If you need to load the bootloader, you need to connect to the right pins.
There is no ICSP connector, but that connector is directly connected to pins 11, 12, 13 and to reset and power pins.
I loaded the bootloader using the instructions and an Uno, worked very well.

I'm off now to see what i'll see when connecting to the interface i've got while having a terminal open.

Try DTR from the CP2102 through a .5 to 5 uf capacitor to Reset on the mini.

Ok, thank you, CrossRoads and MAS3 for your help!

In the meantime, i connected the pro mini as well with ICSP and it ran at once. I had an other USB Programmer, the one, i used with the UNO, and now it is running. I guess, that there is something wrong with my china import with RX/TX, so this is my workaround, i will test if i can transfer the functionality to the pro mini, that would be cool, cause the pro mini is soo small.

Thank you all for your help, i really appreciate this.

regards

p.s.: thank you, peg watcher, now i try it with the ICSP, perhaps it is ok.

I have tried in the meantime.
I see nothing appearing in my terminal window while resetting or reconnecting the pro mini in all standard baud rates between 2400 and 115200.

To me, that means there was some program in there, communicating all on and all off.
I can't tell what that garbage was, perhaps it's some data sent in another baud rate.

You do realize that uploading a sketch using ICSP erases your bootloader?

Arduino: 1.8.9 (Windows 7), Board: "Arduino Nano, ATmega328P"

Sketch uses 930 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=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x73
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x73
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.