Trouble uploading to Arduino Nano

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all.

This is my first post here so I apologise in advance.

I am using Windows 10 which detects my Nano and downloads the drivers automatically.
They seem to be the latest ones.

I'm using the correct com port and selected the Arduino Nano in the drop down and tried both ATmega328P and ATmega328P old bootloader.

I have used a couple of different cables.

The L light on the Nano flashes red every 2 seconds unless I press and hold the reset button. When I do that it doesn't flash. When I plug the USB in the L led flashes red three times quickly and then twice and couple of times and then 3 times quickly before settling on flashing every couple of seconds again. The RX light flashes very dimly when attempting upload.

I have the correct data port selected as well.

From what I've read (which isn't alot because the Arduino forums are currently down) is that I may have a possible bootload issue.

When I attempt an upload to the Nano I get the below timeout error and I always get this error no matter what board type I choose in the tools drop down.

Here is my nano

Thanks in advance. Hopefully someone can help

This topic has a solution.
Last Edited: Sun. Jun 10, 2018 - 07:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First off.   Solder your header strip properly.   It should not make any difference to Uploading a sketch but it will to any external electronics.

 

1.  Run the Arduino IDE.

2.  Tools->Board   ... select Nano

3.   File->Examples->01.Basics ... select Blink

4.  Sketch->Upload   ... select

 

The Nano should build and upload the resultant HEX file.

 

Yes,  you can write ASM, C, C++, Basic, ... and build from the command line.

Using an IDE like AS7 is easier but you have to configure it for using the Nano bootloader.

 

Ah-ha.   Your screenshot was from the Arduino IDE !!

Instead of screenshot,  click on [Copy error messages].   Then paste the result to a Code window in your Forum message.

If you have 100s of lines,  paste to a text file and attach the file.txt.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

First off.   Solder your header strip properly.   It should not make any difference to Uploading a sketch but it will to any external electronics.

 

1.  Run the Arduino IDE.

2.  Tools->Board   ... select Nano

3.   File->Examples->01.Basics ... select Blink

4.  Sketch->Upload   ... select

 

The Nano should build and upload the resultant HEX file.

 

Yes,  you can write ASM, C, C++, Basic, ... and build from the command line.

Using an IDE like AS7 is easier but you have to configure it for using the Nano bootloader.

 

Ah-ha.   Your screenshot was from the Arduino IDE !!

Instead of screenshot,  click on [Copy error messages].   Then paste the result to a Code window in your Forum message.

If you have 100s of lines,  paste to a text file and attach the file.txt.

 

David.

 

Hi David, thanks for your reply.  

 

Here is the one from the Blink sketch.  I have also enabled Verbose output in prefs -

 

Thanks

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is my Adalight log.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OMG I got it working.  I selected the board as a pro or pro mini, the processor type as ARmega168 (5v, 16MHz), the serial rate as 57600 the lights all activated!  I suspect this nano is just very old.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK this is just getting strange.  The Prismatik software will not control the lights....  They just flash Red Green and Blue when i attempt to upload a sketch....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is a log on a successful upload.  The RGBs flash Red Green and Blue 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Apologies for all the posts.  If i upload the Blink sketch nothing happens.  The uploading is also successful.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok so this is turning into a bit of a story... I had to run the Prismatik software in Windows 8 compatibility mode for the LEDs to light up but now the LEDs show different colours when set to mood lamp where they should be just one colour.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From your Blink_log.txt:

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.

You have a successful build but the "Upload to Nano" fails.

 

Your photo looks like a virgin board (perhaps half-way to deflowerment)

Normally I would suspect that someone had attached an external programmer,  but that is unlikely in your case.

You have selected the default ATmega328.  I presume that your Nano has a 328.   But a 168 would give a different error.

 

I use IDE v1.8.1.   The only option for Nano is 328/168.

 

Have you tried a new USB cable?

 

David.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Post#1 board pic shows an ATmega168PA with a data code of 1501 (2015?)

 

 

A proper Nano uses an ATmega328P.

 

Where did you buy the board?  Can you provide a link?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well spotted.   Virgin and under-age.

 

Several boards are/were available with 168PA/328P.    I always thought that the Duemilanove was only 328P.

 

I would expect a 16MHz 168 to give a different error to avrdude.

The error is what you would expect from an 8MHz 168

 

I will have to look at boards.txt.  Perhaps the Nanos have different crystal/resonator.

 

David.

 

Edit.   Sure enough.  The Nano_168 bootloader runs at 19200 baud.   Nano_328 runs at 57600 baud.

## Arduino Nano w/ ATmega168
## -------------------------
nano.menu.cpu.atmega168=ATmega168

nano.menu.cpu.atmega168.upload.maximum_size=14336
nano.menu.cpu.atmega168.upload.maximum_data_size=1024
nano.menu.cpu.atmega168.upload.speed=19200

It looks like you can buy a Nano_168 for £1.24 and a Nano_328 for £1.25 on Ebay.   It looks a false economy!

Last Edited: Sat. Jun 9, 2018 - 09:18 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chuck99 wrote:

 

Post#1 board pic shows an ATmega168PA with a data code of 1501 (2015?)

 

 

A proper Nano uses an ATmega328P.

 

Where did you buy the board?  Can you provide a link?

 

 

 

Well spotted that man!  Everything is up and running now anyway.  I have to mess around with Prismatik for a bit but after finding the right baud rate of 115200 everything works like a treat.  Here is a link from ebay where i git the item -

 

https://www.ebay.co.uk/itm/Ardui...

 

Ill contact them and see if they give me a refund :P

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Azazl187 wrote:

ok so this is turning into a bit of a story... I had to run the Prismatik software in Windows 8 compatibility mode for the LEDs to light up but now the LEDs show different colours when set to mood lamp where they should be just one colour.

 

This was due to me having the incorrect baud rate selected.  After changing to 115200 everything works ok.  Well when i say that, for some reason the Sky Go Windows app doesnt seem to get the LEDs to react in screen grab mode....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah-ha. A Brit supplier which clearly says 328P. Ask for replacement rather than refund.
.
I had assumed it was an "ambiguous" Chinese shop.
.
Pleased that we got you working. You must congratulate Chuck99 on his eyesight.
.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The Prismatic software runs at 115200 baud on the application level between the Arduino sketch/program and the Prismatic hardware.  The Arduino write_compiled_sketch_to_Nano failed (getsync() error) because the Nano had a Mega168A (an older design) instead of a Mega328P (recent Nano design). 

 

The Arduino IDE was set for a Nano with mega328P, which uses a different baud rate in the loading process (that uses AVRdude.exe).  Once the IDE was configured for a mega168A Nano, AVRdude.exe was able to load the compiled code from the PC to Nano without problems.  AVRdude emulates an older model of Atmel AVR device program loader.  This device programmer exchanges a few bytes of data between the PC and device_programmer before beginning to load the .hex file of compiled code.

 

All the lines in the files that were uploaded are concerned with the compilation process, not the loading process (where code is transferred between the PC and the Arduino). 

 

Generally older Nanos, UNOs, and Leonardos (especially) are flaky (intermittent) in their loading stage of the IDE process.  I stopped using Leos for that reason.  Nearly all Nanos made today have the CH340G USB-serial IC, which seems to work a lot better than any other USB interface implementation.