Pages: [1]   Go Down
Author Topic: New code not running despite flawless flash  (Read 1759 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
[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.
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: June 02, 2007, 09:34:36 pm by Daniel » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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! :smiley

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The following shows up in my terminal window as 'tjdolan' got when I try to program Arduino BT with the led_blink sketch.
 
Code: [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...
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, mellis

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

Thanks a lot...
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 295
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
 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.
Logged

Pages: [1]   Go Up
Jump to: