ive programmed my arduino uno with an usb atmega programmer over icsp. This device where connected by the USBasp and everything was fine. Now i wont 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 ?
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 ?
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,
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.
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.
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
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
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.
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.
I tried both USB ports (/dev/tty.usbserial & /dev/cu.usbserial) but the same error persist. The Arduino is connected to a Macbook Air via the USB cable, and the PWR LED indicator light on the Arduino is turned on and the L indicator LED blinks. There was no problem uploading to a Arduino Uno.
This error message basically shows up for any communication problem, so by itself, it is not all that instructive. The Arduino Nano is supposed to have auto-reset, but maybe your clone does not? In that case, you'd have to press the reset key on the board just before starting an upload.
Know this is old but I ran onto it during my search for Nano(V3)'s not uploading so thought might help someone else. Problem is the bootloader - Arduino IDE BUT I Found an easy solution (right under my nose).
I realized that my nano's had been uploading just fine then I had finally updated the Arduino AVR Boards from 1.6.20 to 1.6.21. I didn't think there was any problems because it still showed my Nano and ATmega328 etc in the board manager after the change.
But the new boards manager has a new ATmega328 processor choice for the Nano. I changed processor: In the Arduino IDE select TOOLS > PROCESSOR > pulldown menu from ATmega328P to "ATmega328P (Old Bootloader)".
I was having the same problem and got the same error message. Turns out these boards don't come with a bootloader preinstalled. If you have some jumper wires and another working arduino you can use this tutorial to install the bootloader and it should work great, mine did at least! :)
You'll notice a little "pause" just before the first line of avrdude: Send: 0 [30] [20]. Try uploading again and have you finger ready on the physical reset button of your Nano. Just the moment before the first avrdude: ... appears, press the reset button.
I have a hackintosh with OS X Yosemite 10.10.2, Arduino software 1.0.6 and Funduino UNO. Uploading the example for Serial.write() succeeded the first time. Thereafter most uploads failed. Even when the upload succeeded the serial monitor would not always show output.
This seemed to me to be due to miscommunication on the USB port. I had to repeatedly reset the funduino, unplug and replug the USB cable or even restart the system. When replugging the USB cable sometimes my system would freeze.
By googling I found a solution to "Inserting USB device causes Mavericks 10.9.1 to freeze".Answer no 12 on tonymacx86.com basically instructs you to remove GenericUSBXHCI.kext from /System/Library/Extensions.
I am happy to report that after removing this kext I have no problems uploading the example and monitoring the output. Because I don't need to replug the USB cable I don't know whether this solves my system freeze. I'm not even sure it was a system freeze, because my system may only have become unresponsive to my USB keyboard and mouse.
The Arduino IDE version 1.8.5 gave the same error every time I tried to connect it to my OSEPP Nano. I tried with multiple nano boards with different versions of the IDE. I had the board set to "Arduino Nano".
If this doesn't work you will have to use spi to program the nano. You'll need to look up the connection and use a uno since it has a serial chip at16u2 with a driver that recognizes all atmel products. After connections setting uno as a programmer by flashing the uno as isp set the programmer as Arduino as isp and flash the chip. Double check. The benefit is it is less error prone than uart and has better timing but is a hassle to wire up. Good Luck
The Arduino Nano is a small, complete, and breadboard-friendly board based on the ATmega328 (Arduino Nano 3.x). It has more or less the same functionality of the Arduino Duemilanove, but in a different package. It lacks only a DC power jack, and works with a Mini-B USB cable instead of a standard one.
Check the Arduino Forum for questions about the Arduino Language, or how to make your own Projects with Arduino. Need any help with your board please get in touch with the official Arduino User Support as explained in our Contact Us page.
The Arduino Nano can be powered via the Mini-B USB connection, 6-20V unregulated external power supply (pin 30), or 5V regulated external power supply (pin 27). The power source is automatically selected to the highest voltage source.
Each of the 14 digital pins on the Nano can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:
The Nano has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the analogReference() function. Analog pins 6 and 7 cannot be used as digital pins. Additionally, some pins have specialized functionality:
The Arduino Nano has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega328 provide UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An FTDI FT232RL on the board channels this serial communication over USB and the FTDI drivers (included with the Arduino software) provide a virtual com port to software on the computer. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the FTDI chip and USB connection to the computer (but not for serial communication on pins 0 and 1). A SoftwareSerial library allows for serial communication on any of the Nano's digital pins. The ATmega328 also support I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus. To use the SPI communication, please see ATmega328 datasheet.
The Arduino Nano can be programmed with the Arduino software (download). Select "Arduino Duemilanove or Nano w/ ATmega328" from the Tools > Board menu (according to the microcontroller on your board). The ATmega328 on the Arduino Nano comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol. You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar.
Rather then requiring a physical press of the reset button before an upload, the Arduino Nano is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the FT232RL is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload. This setup has other implications. When the Nano is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Nano. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.
795a8134c1