Can't Upload to My First LilyPad :-(

Well, I just got a brand new LilyPad yesterday. I've tried EVERYthing, but I've had absolutely no luck uploading to it.

I'm using the FT232RL Arduino Serial USB Board. This link shows how I've got it hooked up:

The LED on pin 13 blinks rapidly three times when power is first applied, then repeats at a regular interval after that. The LED also blinks rapidly directly after the reset button is pressed. I assume this indicates that the boot loader is running. This is the only thing that lights up on the LilyPad itself. The TX and RX lights on the USB Board blink for a bit directly after I attempt to upload a sketch.

I've tried varying the timing, pushing the reset button both before and after I click the icon to upload the Blink demo sketch. I've also tried switching the alligator clips to the RX and TX pads, all to no avail. I've tried this with an Intel Mac, a G4, and with a PC running Windows XP. I've gone over all the connections very carefully with my multimeter. It looks like everything is solid and that there are no shorts.

Does anyone have any ideas? Is it possible I've got a dead pin on the processor itself?

Could the output the environment spews out give some hint as to whether the problem is with the serial board or with the LilyPad? I'll include it in a follow up post in hopes that it might make sense to someone.

Thanks for any help you can give me!
Jason

Here's part one of the output from an upload attempt:

hardware/tools/avr/bin/avrdude -Chardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm168 -cstk500v1 -P/dev/tty.usbserial-A40014Cx -b19200 -D -Uflash:w:/Users/autumndepths/Desktop/arduino-0010/examples/Digital/Blink/applet/Blink.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 9 2007 at 11:20:31
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/autumndepths/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/tty.usbserial-A40014Cx
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
AVR Part : ATMEGA168
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


flash 65 6 128 0 yes 16384 128 128 4500 4500 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [02]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [81] [20]

And here is part two:

avrdude: Recv: . [14]
avrdude: Recv: . [01]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [98] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
Hardware Version: 2
Firmware Version: 1.16
avrdude: Send: A [41] . [84] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [85] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [86] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [87] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [89] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: Send: A [41] . [81] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [01]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Recv: . [10]
avrdude: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [02] . [00] . [00] . [00] @ [40] . [00] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Send: E [45] . [05] . [04] . [d7] . [c2] . [00] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Send: P [50] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: AVR device initialized and ready to accept instructions

Reading | avrdude: Send: u [75] [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: error reading signature data for part "ATMEGA168", rc=-1
avrdude: error reading signature data, rc=-1
avrdude: Send: Q [51] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

avrdude done. Thank you.

Can anything be divined from this?

Thanks!

rx goes to rx, tx goes to tx - swap your green and yellow :wink:

yep. looks like that's your problem. swap the rx & tx clips on your lilypad (green goes to LilyPad tx).

Given the amount of communication that took place between the computer and the board, I don't think RX and TX need swapping.

Does it always fail at the same point? That is, do you always have this line: Reading | avrdude: Send: u [75] [20]
Right before the error:

avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: error reading signature data for part "ATMEGA168", rc=-1
avrdude: error reading signature data, rc=-1

?

Hey, thanks for the replies!

You're right about the TX and RX lines being reversed - it looks like I had them backwards when I took the picture (sorry!). If I try to upload with them as pictured, I get very little output (pretty much just "programmer is not responding").

If I flip them though, I get the same output I've posted above every time. Interestingly, it doesn't seem to matter whether I hit the reset button before trying to upload or not, I always see the same response.

I've got a second LilyPad coming - that'll at least narrow things down to either the serial board or the LilyPad.

I'll get this figured out one way or another!

Thanks,
Jason

So the output always ends with the exact same messages?

If it was a flakey connection, I'd expect it to get through different amounts of the upload before failing. If it always fails in exactly the same spot, maybe there's some weird configuration error. Let's see what the second one does.

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