New code not running despite flawless flash

Hi all,
My arduino board has been up and running now for a few weeks and everything has been fine. Today I tried to interface to a new IC chip, and although the code seemed to flash fine nothing seemed to be working. After some debugging of both the hardware and software I came to the conclusion that the software isn't getting properly flashed onto the board. In fact, even if I try to flash some of the example sketches (led_blink) the board continues to run my custom program despite everything appearing to flash fine.

I have taken these steps with no result:

  • reboot computer and arduino board
  • remove and re-install the arduino software on the computer
  • verified that the proper Atmega chip is selected in the menu
  • manually removed all rom, elf, and o files in my code directories

The only thing I can think of that might explain this is that the program flash area of the AVR chip has been worn out (would I get an error message if this happened?). However, I assume that this is like any other flash and that it will take thounds of cycles for that to occur - I am fairly certain that I have flashed it at most on order of a hundred flashes.

Thanks. I will very much appreciate any feedback!

hi

what do you mean exactly by a "new IC chip"? Everything you say points to selecting the wrong microntroller in the IDE, but since you've checked that, hmmm....
D

By new IC I mean that I just wired up the http://www.arduino.cc/en/Tutorial/ShiftIn shift in register to get some extra inputs. I discovered this problem while trying to update my code to interface with it properly. The code wasn't updating...

I am really unsure of how to proceed from here. I would hate to have to buy a new arduino board, or an avr programmer. Any other thoughts on what to check? Is there a way to ensure that the AVR chip selected in the menu is what is actually selected?

Thanks

I just deleted my arduino software directory and the preferences file in the .arudino directory. After re-downloading the arudino software the problem still exists. I tried to flash the led_blink sketch, but my custom sketch is still running. The following shows up in my terminal window when I try to program it with the led_blink sketch.

[code]Binary sketch size: 4144 bytes (of a 14336 byte maximum)

Atmel AVR ATmega168 is found.
Uploading: flash
Firmware Version: 1.15
Firmware Version: 1.15

[/code]

After this my custom sketch is still running.

Thanks.

hey

it really sounds like the wrong processor is selected... I think you have figured it out: the code is not getting uploaded. Not sure why. Worst case, something has happened to the Atmel chip. If you really have to, to can get another from places like NKC Electronics for $5. That might be a good swap test.

D

D,
Thanks for the help. I just placed an order for the chip and will get it a try. I didn't realize you could purchase chips ready to go - that works out well.

T

Hello,

I think I have run into the same problem with my Arduino board. I am using the Arduino NG w/ Atmega168. I flashed it about 50 times so far with different programs just for fun and everything worked well. Then I flashed it with a program that uses the internal serial port and opened up Hyperterm and watched it print out some pretty text as it followed my program.

Now I am trying to get it to run the blinking led program, and the flash is successful. But the led does not blink. So following a hunch, I started Hyperterm and sure enough, it started printing text from the old program! ::slight_smile:

I have checked my configuration, all is good. I have tried rebooting the computer with no success. I have tried disconnect all power and the usb cable to the Arduino board with no success.

Looks like I will have to buy another Atmel chip too. Unless if anyone has any ideas?

Thanks,
Dom

I have noticed an uploading sensitivity with the ide and an Arduino executing an older program with serial out connected to either the ide terminal or another terminal. I have always made it work by varying the timing on when I reset the board versus when I hit the upload button on the ide. On my newer PC the upload handshake is fast so you need to be quick about it. Also make sure you have any additional terminal emulators off when you upload.

My problem is that the program upload is reported to have run successfully. I see the leds connected to the Rx and Tx flash really fast as they always do when I upload a new program. Then after the Atmel chip resets itself and boots up, it starts running the previous program.

Thanks for your help.

Dom

I have the same problem. The Rx/tx is flashing but it still runs the old program.
And now I am not able to reinstall the usb-drivers on my macbook after I removed the arduino software :o

The following shows up in my terminal window as 'tjdolan' got when I try to program Arduino BT with the led_blink sketch.

Code:

Binary sketch size: 4144 bytes (of a 14336 byte maximum)

Atmel AVR ATmega168 is found.
Uploading: flash
Firmware Version: 1.15
Firmware Version: 1.15
 
And, he is suggested that his Atmel chip doesn't work. I was wondering anyone having this same problem tested the board with a replaced chip. I have Arduino BT, and there is no way to replace the chip for Arduino BT (but chip can be replaced in NG). Before I will order a new BT, I want to know if anybody tried it with a new chip? Since BT is around $120, I wanted to know...

Any suggestions would be helpful...

Thanks...

You might be able to just reprogram the existing chip, say with a USBtinyISP, which is only $22. If you don't want to assemble it, you could buy an AVRISP mkII, but those are more like $60.

So, mellis

Do you think, my chip is not good any more. So, the problem is my chip for sure??

Thanks a lot...

Dunno. What happens when you upload the program?

If it seems not to run at all (whatever the program is), then you might need to reburn the bootloader onto the chip. Or at least that seems to have fixed the problem for other people.

Or at least that seems to have fixed the problem for other people.

i just did a "re-burn" to a mini and an arduino NG's atmega. Same Symtoms before, everything fine afterwards.