Programming my new lilypad

I just got a new lilypad from Sparkfun. I didn't buy the sparkfun FTR232RL because I have both an Arduino Diecimila and a TTL-232R from Modern Device. Basically I've tried to program it with both, with failed results. I keep getting this regardless of the method:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

When you give the lilypad power the power light blinks 3 times, and then again every few seconds. When I first start the programming it will start to blink as well, but stop fairly quickly. I've also made sure that the lilypad is selected when uploading, and the serial port is set properly as well. I've tried it on both my XP and Vista boxes with the same result, and same error code.

I made an adapter (with a 6-pin male header and a 4-pin female) to take the ground, +5v, rx, and tx from my TTL-232R over to the proper positions on the lilypad. I was very careful with making sure that there were no shorts by checking everything over with my multimeter. However it would keep giving me this error. So the first thing I tried was to switch the rx and tx on my adapter. Still no results.

I then tried to program it with my Diecimila board, but I'm getting the same error. I'm able to program both my Diecimila and BBB boards just fine when I change everything over. My code also runs just fine on either of those boards. I'm always extremely cautious about paying attention to + and ground, so I'm quite sure I've not applied the current incorrectly, and I've only given it the +5v provided by both the TTL-232R and the Diecimila

Is there anything special about the FTR232RL besides the 3.3v power that I should know about? Also, is there any way to test the board out so that I know it's not dead? Any help would be greatly appreciated.

Are you pressing the reset button before uploading?

could you post a picture of your connection setup so I have a sense of how its hooked up?

when you attach it through the diecimila are you removing the ARV chip on the diecimila board first?

Are you pressing the reset button before uploading?

I've tried that with varying intervals of before, while, and after pressing the upload button. Both with the Arduino and the adapter I made. I've also tried switching the tx and rx pins with the Arduino Diecimila method, and varying the reset period with that as well. I'm still getting the same error each time.

The rx light will blink a few times on the Diecimila, but then quit.

could you post a picture of your connection setup so I have a sense of how its hooked up?

when you attach it through the diecimila are you removing the ARV chip on the diecimila board first?

Yes, I am. I'll go and take a picture of it now.

Here is the setup. I've made sure that the yellow clip is always under the rx pin, and not touching anything else before I apply power. I'm always very cautious with electronics so as not to short them. When I change the rx and tx, I'll change them on the Diecimila side. Generally I've tried to follow the guides, and I ran through the troubleshooting a few times before posting.


click for larger

I've tried that with varying intervals of before, while, and after pressing the upload button. Both with the Arduino and the adapter I made.

are you pressing the reset button on the lilypad?

a couple of other things to try:

make sure your alligator clips are good. I have had this experience before... One funky alligator clip can cause hours of heartache.

make a coaster for your lilypad out of foam or felt or rubber to put under the lilypad that will help the clips grab hold. It may be that you're just not getting good contact on one of your clips.

a couple of other things to try:

make sure your alligator clips are good. I have had this experience before... One funky alligator clip can cause hours of heartache.

make a coaster for your lilypad out of foam or felt or rubber to put under the lilypad that will help the clips grab hold. It may be that you're just not getting good contact on one of your clips.

Yes, I've been pressing the reset button on the lilypad and not the Diecimila board (though I tried that too a while ago just to make sure I didn't mis-understand). I took your advice and I tested from the bottom of the Diecimila board to the back of the header pins on the lilypad, to make sure that all 4 connections were getting through, and each of them were with very little resistance (.7 ohms was the highest). So it looks like they are all getting a good connection all the way through.

hmmm.... OK, a different track.

When you give the lilypad power the power light blinks 3 times, and then again every few seconds.

this is normal behavior, but I'm a little curious about this:

When I first start the programming it will start to blink as well, but stop fairly quickly.

Could you describe in more detail the lilypad blinking that you see when you start to program it?

hmmm.... OK, a different track.

When you give the lilypad power the power light blinks 3 times, and then again every few seconds.

this is normal behavior, but I'm a little curious about this:

When I first start the programming it will start to blink as well, but stop fairly quickly.

Could you describe in more detail the lilypad blinking that you see when you start to program it?

Basically, I'll press the upload button. Then shortly afterwards the reset on the lilypad. The power LED will blink a few times very quickly. Then then rx on the Diecimila blinks a few times. It seems like the lilypad is then just doing it's normal blink every few seconds after that. It takes nearly 20-30 seconds before the arduino program throws out the error.

I hooked an LED with resistor to 13 and ground, and that is blinking along with the power LED. Also, when I'm selecting the lilypad from tools > board, I'm getting a ton of red text as well. However the instructions said to ignore all of that.

However, just in the spirit of thoroughness, last night I downloaded another copy of the arduino software on both my xp laptop, and my vista box. They are both throwing up the same red text on board selection ending with: arduino-0010/hardware/tools/avr/bin/../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."

Hmmm, so I just disconnected the lilypad from my Diecimila board, and tried to upload the sketch. The behaviour was the same on the Diecimila. The rx would blink for a second, and then quit. So it seems that the lilypad either isn't listening, or the Diecimila isn't transmitting.

I just popped the 168 back in the Diecimila, and I was able to send it the same sketch without a problem. Is there some way to test the lilypad?

So, it seems like your lilypad just isn't communicating... it's possible that there is a funky solder connection... check that the tx & rx pins on the avr chip are connected to the tx and rx header pins &/or petals. I'll make a note on your flickr photo about which pins these are.

the other thing you could try - if you have an ISP programmer or STK500 - is reburning the LilyPad bootloader. Though from the behavior you describe, it does not sound like this is your problem.

actually, your pic didn't give a close enough view. see pic here to ID tx & rx pins:

Imgur

actually, your pic didn't give a close enough view. see pic here to ID tx & rx pins:

http://www.flickr.com/photos/leahbuechley/1480092838

If you click on it, then it will go to the flickr image of full size. Here is the full size if you want to take a look.

I'm going to go ahead and order a second one from sparkfun, along with a FT232RL USB to Serial (they are out of the lilypad specific one, and I've got female headers). I'm going to be programming a good number of lilypads in the future, so it may be helpful.

Basically, I've made a PCB for a charliplexed heart I wrote an instructables for. I got in the first set of PCBs, but there was a small mistake on it (plus I didn't like the spacing), so I've sent off for a second set. It works quite well, but I've designed it to be able to be sewn into clothing around this kit, and I would really like to be able to get an example shirt up and running.

I'll let you know how it all goes, and I'll send you a kit once I get the final production models in. Thanks for all your help!

So, it seems like your lilypad just isn't communicating... it's possible that there is a funky solder connection... check that the tx & rx pins on the avr chip are connected to the tx and rx header pins &/or petals. I'll make a note on your flickr photo about which pins these are.

the other thing you could try - if you have an ISP programmer or STK500 - is reburning the LilyPad bootloader. Though from the behavior you describe, it does not sound like this is your problem.

I'll give the re-soldering a shot when I get home from work tonight. I'll probably just take the header off all together until I get in the sparkfun kit.

yeah, so from everything that you're describing it sounds like a bad connection along either the tx or rx lines somewhere.

yeah, so from everything that you're describing it sounds like a bad connection along either the tx or rx lines somewhere.

So I tested the tx and rx pins on the chip, and they seem to be connected just fine to the tx and rx petals. Basically I clipped one end of an alligator clip to the petal, and the other to a multimeter contact. I then touched the other multimeter contact to the corresponding pin on the chip itself. I was careful to make sure that I was only touching the top of the pin, where it is closest to the chip. Both of them read 0 on the multimeter, so they are making good contact up to the chip (or so it seems). They were also not getting readings across one another (so no short).

I tried looking it over with my magnification lamp to see if I could find any shorts, and everything looks clean and solid all around the board, without any cold joints that I can tell.

I've already ordered the stuff from sparkfun. It should be in later this week. Then I'll test the new lilypad with the FT232RL that I ordered with that, and if that works, then I'll test this one. Hopefully I'll be able to determine whether it's my setup, or the board itself.

also check the resistance between tx & rx, the resistance between each of these and +, and the resistance between each of these and -.

but, hopefully your new hardware will clear up the problems...

It seems like a small batch of LilyPad with corrupted bootloaders was sent out. This happened to some LilyPads that were sent out in the last month or so. We have restructured our testing process to make sure this does not happen again! If you think you have one of these bad LilyPads, get in touch with sparkfun about a replacement.

My sincerest apologies for this.

Leah

It seems like a small batch of LilyPad with corrupted bootloaders was sent out. This happened to some LilyPads that were sent out in the last month or so. We have restructured our testing process to make sure this does not happen again! If you think you have one of these bad LilyPads, get in touch with sparkfun about a replacement.

My sincerest apologies for this.

Leah

I think I didn't get just one, but two. I was actually in the process of trying to track down someone who had a known working system to test them both with. I'll give them a call, thanks for the heads up.