I have an arduino nano with the USB port damaged (I cannot repair).
In order to upload the sketches i tried to use another Arduino UNO as ISP following the following links:
The examples I've seen with ArduinoISP (all?) burn the bootloader to the target.
Is it the same set up and process to upload sketches to target devices without a bootloader?
Or does boards.txt require additions for a "ATmega 328 Standalone (w/ Arduino ISP)" option?
I tried this but the output text in the console is something unreadable... What do you mean with "check on the fuses"? LFuse/HFuse/EFuse values? What can I understand from them?
I don't see anything wrong that way.
There's also the "(maybe) use a 10uF cap" and/or a "120? resistor".
I don't know why there's such variation.
Maybe it's differences between genuine Arduino vs clone components or something.
I'm trying to learn here, too.
I solved the problem by programming the NANO with avrdude via command line as shown here: http://pdp11.byethost12.com/AVR/ArduinoAsProgrammer.htm.
Not sure about why I'm not able to do this via IDE.. Probably I have something wrong in the files like boart.txt...
However, in the following I summarize the steps I used:
upload ArduinoISP code to Arduino Uno
Connect necessary Arduino Uno pins to the Arduino Nano (see below)
Use avrdude via command line to upload the hex file into the NANO. (see below)
Verify/compile the sketch in arduino IDE. For this I selected in the IDE Tools->Board->nano328 and Tools->Programmer->AVR ISP.
Check in the IDE the serial port (Tools->Serial) and the path to the generated hex. The last one appears in the IDE console going into File->Preferences and selecting Show verbose output during compilation
Open a terminal ane use this commands:
To verify avrdude is working: avrdude -P <COM_PORT> -b 19200 -c avrisp -p m328p –n; for me <COM_PORT> = "/dev/ttyACM0"
Upload hex file: avrdude -P <COM_PORT> -b 19200 -c avrisp -p m328p -u -U flash:w:"<PATH_TO_HEXD>":i; for me <PATH_TO_HEXD> ="/tmp/build1301028573051865829.tmp/led.cpp.hex"
You can solve that upload from Arduino IDE problem by creating a new board definition to boards.txt. I'm doing the same thing as you (destroyed USB port), but just using the ICSP header pins (totally equivalent to using pins 11-13, RST, +5V, GND).
that's the thread where a guy helped me to solve similar problem. Just notice the last two messages. You need to remove that BOARD.upload.protocol-row from the board definition block to make uploads from IDE work.
Didn't work for me. The IDE always reverted to 56700 bps or using STK500v2 (direct upload) or then it added the "-D" parameter, no matter how much I spent time fiddling with the upload parameters (using OSX & IDE 1.0.4 & 1.0.5). After modifying the boards.txt upload works each and every time like a charm.
this thread helped me a lot but I am trying to understand something.
I have also broken USB on nano 3.0. Was trying to burn new bootloader and sketches with UNO R3.
So I connected D13 to D13 (SCK), D12 from UNO to D11 at NANO (MISO) and D11 UNO to D12 NANO (MOSI). (GND, 5V and rst as normal).
I was getting errors all the time. I read this thread and you said to connect digital pins accordingly (12-12,11-11,13-13) so I did and it worked. So why I connected it as I assume wrongly and it works? There should be connection MOSI-MISO to have it work? Or my pinouts are different?