Pages: [1]   Go Down
Author Topic: Won't run sketch  (Read 1062 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have had success blinking LEDs and even controlling servos previously.  Now I can't even get a LED to blink on pin 13 using LED_blink example sketch.  Pin 13 LED blinks after board reset, TX and RX LEDs indicate communication, but then pin 13 LED does not blink in response to sketch.
Logged

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

Have you tried other sketches (e.g. serial_write_basic)?  Maybe it's just a problem with pin 13 or the LED?  Did you change the microcontroller in the Tools > Microcontroller menu?  
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I also had the Read a Pushbutton sketch working perfectly from the Digital Input Arduino Tutorial.  Several servo projects worked great from Todbot's Spooky Projects too.  I did replace the power jumper so I could connect a 9v and go mobile.  After that I lost functionality. I'm 100% certain polarity was correct.
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

just to beat David to the answer... smiley
you need a 10K resistor from RX to ground, to prevent the Atmega8 from picking up spurious serial data.

D
« Last Edit: March 17, 2007, 09:17:30 pm by Daniel » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think my board has the Atmega168.  Does the same go for it?  
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

yes.



Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 10k resistor from RX to ground did not solve the problem.  Anything else I can try?
Logged

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

Do you have the same problem if you power the board from the USB connection?  

Did you change the microcontroller in the Tools > Microcontroller menu?  It should match what's written on the chip on your board.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I get the same problem when using USB power.  Microcontroller data matches.
Logged

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

Huh.  On reset, does the LED flash at the same speed that it used to?

My guess is that you need to reburn the bootloader onto your chip.  You can either get a programmer (a small hardware dongle) to do this (see: http://www.arduino.cc/en/Hacking/Bootloader), or a couple of people have offered to sell boatloaded ATmega168 - try searching the forum.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Huh.  On reset, does the LED flash at the same speed that it used to?
My guess is that you need to reburn the bootloader onto your chip.
I have the same problem with my brand new Arduino NG's. What do you mean by LED not flashing the same speed? Is there a common failure that makes it flash different? faster or slower? And most importantly, why?

I would be very happy if I didn't have to burn a new bootloader, or pay someone to do it. One of the reasons I bought these arduino's was that they were pre-programmed with a bootloader!

Also, if someone could give me a direct link to the source for the actual bootloader used in Arduino NG, that would be nice.
« Last Edit: March 21, 2007, 08:22:35 am by kymatica » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I seem to be having the same problem.  I cant get it to run a sketch.  It seems to load any sketch I send it just fine - 13 pulses when the bootloader starts, tx/rx blink away and then nothing.  I have tried grounding RX, powering from either USB or external, disconnected everything from it except the led on pin13 - nothing helps.

I'm confused as to how burning a bootloader again would help.  Is it possible to corrupt the bootloader somehow?  I'm up for trying it, but purchasing a programmer to try and fix something that could be fried is not very exciting.  Any other suggestions would be greatly appreciated.

Thanks,
Josh
Logged

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

I had that too. It's because the reset button refused to work for some reason..
Just upload the sketch a few seconds after you put in your USB
I call this a VERY primitive manual reset :p
Logged

Pages: [1]   Go Up
Jump to: