Arduino NG, serial port doesnt seem to work.

Yesterday, i found my Arduino board broken in some way, and for no reason it seems. I got really upset...

I cant´t send any new program to it, and all i get is the "Programmer is not responding" error. Iv'e searched alot and found similar problems, but none seemed to be the exact same as mine :/ You see, there are some other strange behaviours to it aswell.

Whenever i start the Arduino NG, be it with USB power or with external, it seems to skip the five seconds to wait for the computer to send a new program. The last program i sent to it is still there and it works perfectly fine. When i press the restart button the program just restarts, no flash from the 13 pin LED, not even when it is connected to the USB or external power. When i connect it to the USB however, the RX and TX LED:s flashes briefly three times. When i try to send a program, the RX LED flashes one short time.

Hope the explanation was enough, ask me if i should specify or something, and i hope you can help me on this one.

Thanks in advance, Fredrik Andersson

hi

this sounds like the 10K resistor problem: put a 10K or 4.7K resistor between the RX pin and ground. It is a small design flaw with the NG... without the resistor, the bootloader sometimes hangs and can never start the program, as it thinks it is about to be reprogrammed.

D

No no no! Thats not the problem at all. I have allready gone through that issue. You didn't read my entire post, did you?

The problem is more like if the uploaded program have rewrited the bootloader. The last uploaded program starts emediately after connecting power or resetting the board, without waiting for a new program to be uploaded. Now i don't know if that's the case, but that is what seems most possible.

Another thing i noticed though, is that if i connect a LED to pin 13, it lights very very very very little, all the time. It's almost not possible to see it. Is that normal? Could it be that i have somehow burnt pin 13 and that the bootloader relies on that pin to work so it doesn't wait for another program or something like that?

/Fredrik Andersson

It sounds like you're right: somehow you've removed the bootloader from the board so your sketch starts immediately (the faint glow on pin 13 wouldn't stop the bootloader from running). How have you been getting sketches onto the board? Was it working before? What kind of circuits did you have connected to the Arduino since the last time you successfully uploaded a sketch?

I've uploaded the sketches perfectly normally, the only thing i can think of that could have knocked it in some way is that i had a 10k resistor connected between RX and ground one time i uploaded. It worked perfectly before, yes. The circuit i connected before i noticed this was four LED:s connected to pin 10, 11, 12 and 13. I wasn't too careful when connecting them, so two of those LEDS may have gotten connected with each other. Still that feels like it wouldn't crash the whole board, only burn one of those pins, right? Before that, i had a DC motor connected to the battery through an NPN transistor. Pin 9 where connected to the transistors base and the whole board was connected to the same battery. I carefully tested this circuit without the board before the board was connected to it.

It feels mostly possible that it is some kind of software error, though we shouldn't forget that the hardware could fail in some way too. Is there any hardware error that could maybe cause the error my board gets? If the RX pin where burnt, would that cause the board not to wait for new sketches?

Here's a summary of the symptoms my board has right now:

  1. I can't send any sketch and if i try, i get the "Programmer is not responding" error.
  2. LED connected to pin 13 won't light when board is powered or resetted.
  3. LED connected to pin 13 allways has a faint glow, almost not possible to see.
  4. The sketch seems to start right away whem board is powered or resetted.
  5. When board is powered through USB or USB is connected while powered externaly, RX and TX LED:s flashes three times each.
  6. Board doesn't seem to wait for a new program to be sent.
  7. When trying to upload a new sketch, RX LED flashes one time.

Here is what I would try.

  1. Disconnect the board from all additional hardware (resisters, LEDs, etc…)
  2. Try external programming software that Arduino uses (AVRDUDE?) to program new sketch.
  3. Try AVRDUDE to reprogram chip with bootloader.
  4. Purchase new preprogrammed ATmega168

Can’t think of anything else to try.

No no no! Thats not the problem at all. I have allready gone through that issue. You didn’t read my entire post, did you?

Please take this as constructive criticism.

Remember that by virtue of being open source all of the help offered on this board is free of charge. That means that people respond with a greater or lesser degrees of time to give. Daniel (who is one of the major contributors here) didn’t deserve such a rebuke.

Yep, everything you're saying makes it sounds as though the bootloader has been overwritten. Regardless of the state of the RX pin or pin 13, the bootloader should pause for a few seconds before starting your sketch.

I suppose it's possible that the lock bits weren't set properly, and that the bootloader received some commands that made it overwrite itself. This could have come from either the normal upload process or possibly random data if the board was powered externally.

I think you'll need to reburn the bootloader onto your chip, or get a new ATmega168 with the bootloader already on it. What country are you in? We should be able to find a way to get something to you.

Here is what I would try.

No no no! Thats not the problem at all. I have allready gone through that issue. You didn't read my entire post, did you?

Please take this as constructive criticism.

Remember that by virtue of being open source all of the help offered on this board is free of charge. That means that people respond with a greater or lesser degrees of time to give. Daniel (who is one of the major contributors here) didn't deserve such a rebuke.

Oh, I did never meant to offend Daniel in any way, but i can see now that it can be interpteted that way. I just wanted to clearly point out that it wasn't that error. I apologise if you felt offended Daniel! When I serched the forum through for a similar problem I saw how much you have helped people and how much time that must have taken! That is an really great deed!

Ok, as i don't have any programmer i'll need a programmer, or a preprogrammed chip now to get anywhere. The parallel programmer described in hacks, is it easy to make and/or relyable? I live in Sweden, so that is within Europe atleast :)

no worries :)

D

You could make a parallel programmer. Or buy a preprogrammed chip from PCB Europe: http://pcb-europe.net/catalog/product_info.php?cPath=29&products_id=49. Unfortunately, most of our distributors (including the Swedish one) don't sell programmed chips.

Ok, yesterday i crafted an parallel programmer ( it's quite fun to solder! :P ). I have tried to figure out how i use it now, but haven't succeded yet. I have read all i could found about burning the bootloader, with the parallel programmer and for ATmega168, but none tutorial featuring both of those at the same time. I have figured out i could use the bootloader burner (burnpara.bat) in the Arduino software, and so i tried it. But it didn't work. And yes, i am using the hex file for ATmega168 and the bat file is configured for it:

cd .. tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0x3F tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --erase --upload if=bootloader\ATmegaBOOT_168.hex -v tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0xCF

pause

This is the log from running burnpara.bat:

C:\Documents and Settings\Fredrik Andersson\Skrivbord\arduino-0008\bootloader>RE M Before running this for the first time, you'll need to install giveio.

C:\Documents and Settings\Fredrik Andersson\Skrivbord\arduino-0008\bootloader>RE M Unzip drivers\giveio.zip, then run ginstall.bat.

C:\Documents and Settings\Fredrik Andersson\Skrivbord\arduino-0008\bootloader>cd ..

C:\Documents and Settings\Fredrik Andersson\Skrivbord\arduino-0008>tools\avr\bin \uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0x3F Atmel AVR ATmega168 is found. Writing lock bits ... Reinitializing device Atmel AVR ATmega168 is found. Warning: lock bits write=0x3F read=0xFF

Lock Bits set to 0x3f

C:\Documents and Settings\Fredrik Andersson\Skrivbord\arduino-0008>tools\avr\bin \uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --erase --upload if=bootloader\AT megaBOOT_168.hex -v AVR Direct Parallel Access failed after 32 retries. Atmel AVR ATmega168 is found. Erasing device ... Reinitializing device AVR Direct Parallel Access failed after 32 retries. Atmel AVR ATmega168 is found. Uploading: flash

(total 1580 bytes transferred in 0.97 s (1632 bytes/s) Polling: count = 13, min/avg/max = 15.00/15.69/16.00 ms

C:\Documents and Settings\Fredrik Andersson\Skrivbord\arduino-0008>tools\avr\bin \uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0xCF Atmel AVR ATmega168 is found. Writing lock bits ... Reinitializing device Atmel AVR ATmega168 is found. Warning: lock bits write=0xCF read=0xFF

Lock Bits set to 0xcf

But i get the same log regardless if wether the parallel programmer is connected or not. One more thing that could maybe help identify the problem is that pin 13 LED lights up even more when the parallel programmer is connected (remember that i mentioned there was a constant faint glow on it).

/Fredrik Andersson

I think you also need to install giveio (linked to from the bottom of the Parallel Programmer page: http://www.arduino.cc/en/Hacking/ParallelProgrammer). If it still doesn't work, you might need to use avrdude, not uisp.

Hello

where id you buy your board? You should get in touch with them and get a replacement board

massimo

I think you also need to install giveio (linked to from the bottom of the Parallel Programmer page: http://www.arduino.cc/en/Hacking/ParallelProgrammer). If it still doesn't work, you might need to use avrdude, not uisp.

Nope, gievo is allready installed... :/

BTW, does avrdude work with the parallel programmer? As i said, i haven't found any tutorial featuring both ATmega168 and parallel programmer, and not one with parallel programmer and avrdude either...

Yea, Massimo's suggestion may be best. I'm sure it's possible to get a bootloader onto the board with a parallel programmer, but I don't know how.

Just wanted to pop in to say i received my newly ordered ATmega168 with bootloader today. And it totally works now! :D I had a timing issue at the beginning though and first i thought it wasn't that and got scared something else was the problem. But now i have figured out how it works.

Thank you all for the help!