Arduino will only boot up with ISP over 30 K

Hey I just started using an external programmer to load my Arduino nano. When i get over 30K sketch size and my usbtiny is still plugged into the nano my sketch works fine. However as soon as I disconnect my usbtiny the nano will not boot up with external power. If i power it up 4 or 5 times sometimes it will boot up. If I lower the sketch size to 28 K it boots fine. If i plug in the usb tiny to the ISP port it boots up every time.

I have tried several nano's with no improvement.

Anyone have any ideas?

Got some more info for anyone that may be able to help. Turns out it doesn't matter if the ISP programmer is plugged in or not, works about every 4 or 5 times you supply power, the program will actually start. If i power up and press the reset button it works every time. I tried 25 times. It starts to act up about 31400 bytes of sketch.

I have searched google and tried a few different fuse settings in the boards file with no improvement.

Sounds to me like the reset pulse is too short. Try adding a capacitor to the reset pin.

As a guess, a 0.1 uF between reset and Gnd.

Hi, thanks for the Tip. I tried a .1uF from ground to reset as you suggested It did not help. After the cap was installed the Arduino sketch would not (most of the time) start even if the reset was pressed. With no cap it will start every time if i leave power on and just press the reset. However it still will not reliably start up if I simply apply power to vin.

I also tried .1uF to 5v, 10uF to gnd and 10uF to 5v with same result.

Because it only occurs when the sketch is approximately @ 31400, I believe it may be a software issue. I have a feeling may have something to do with fuses. I have downloaded avr studio and am gong to look into my fuse settings, maybe something is wrong there? I don't know much about fuses, just what I have started to read in the last 24 hrs.

Thanks again

Could be a shortage of RAM. That's a large sketch. Are you using PROGMEM for strings?

Yes I was using the
#include <MemoryFree.h>
to determine the ram availibilty
#include <avr/pgmspace.h>
to move all my strings into flash.

prog_char string_0[] PROGMEM = "CURRENT";   
prog_char string_1[] PROGMEM = "FREQUENCY";
prog_char string_2[] PROGMEM = "WITS IN";
prog_char string_3[] PROGMEM = "WITS OUT";
prog_char string_4[] PROGMEM = "SCOPE";
prog_char string_5[] PROGMEM = "1 232 @ 9600";
prog_char string_6[] PROGMEM = "2 232 @ 19200";
prog_char string_7[] PROGMEM = "3 485 @ 9600";
prog_char string_8[] PROGMEM = "4 485 @ 19200";
prog_char string_9[] PROGMEM = "* EXIT";
prog_char string_10[] PROGMEM = "WAITING ON INPUT";
prog_char string_11[] PROGMEM = "SIMULATING";
prog_char string_12[] PROGMEM = "A 4 CHANNELS";
prog_char string_13[] PROGMEM = "B 8 CHANNELS";
prog_char string_14[] PROGMEM = "C 12 CHANNELS";
prog_char string_15[] PROGMEM = "D 16 CHANNELS";
prog_char string_16[] PROGMEM = "1 = PAGE 1";
prog_char string_17[] PROGMEM = "2 = PAGE 2";
prog_char string_18[] PROGMEM = "3 = PAGE 3";
prog_char string_19[] PROGMEM = "SET CURRENT OUT 0-20.5";
prog_char string_20[] PROGMEM = "SET FREQ OUT Hz  0-5k";
prog_char string_21[] PROGMEM = "SET VOLTS 0-22 HZ";

just recently I removed the #include <MemoryFree.h> to save flash but it said i had 360 bytes left. I was actually getting ready to remove some strings from PROGMEM back to “test” to save flash memory.

Its weird though. If i program it , or just power up and hit reset, When I test all the functions work, No glitches that i can see, Except it wont power up unless i cycle the power several time or press reset.

Just wanted to let everyone Know I was able to solve the issue. For some reason Arduino 0022 would not burn the fuses in the board file. I used avrdude to burn the fuses and changed the size of the flash section to 256 now i can send a sketch just over 32000 in size. and it starts fine every power up.


Thanks for your suggestions Nick.

Good to hear. That's a bit of a trap, when you get near the 32768 mark. The boards.txt file might say you can fit x bytes in, the fuses might allocate more space for the bootloader then you realize.

A normal upload doesn't burn fuses, it is when you burn the bootloader they get changed.