Need some help programming Ice Clock

Tick Tock Clock Kits

Moderators: adafruit_support_bill, adafruit

Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 1:16 am

So I'm new to USBtinyISP and programming ice clock, and I'm having some trouble...

I installed avrdude, downloaded DigiSage's firmware from here: http://forums.adafruit.com/viewtopic.php?f=41&t=13225&p=64764#p63721

Navigated to the firmware directory and ran this command:

Code: Select all
avrdude -c usbtiny -p atmega168  -B 32 -U flash:w:iv.hex


It did its thing, erased, wrote, and verified the flash, though I did get this output:

Code: Select all
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0ef9
         0x01 != 0x93
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


I didn't notice this at first and plugged the tube back in and plugged it in, but nothing happened. I reconnected to the usbtiny and tried to rewrite the flash again, but with a similar error:

Code: Select all
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0208
         0xf8 != 0xf0
avrdude: verification error; content mismatch


I then tried to slow down the transmission rate by decreasing the B flag:

Code: Select all
avrdude -c usbtiny -p atmega168  -B 1 -U flash:w:iv.hex


and got this output:

Code: Select all
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


Now whatever I do, I get that same error. Any thoughts as to what went wrong or if I broke it?

Thanks!
John
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am


Re: Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 1:27 am

Code: Select all
avrdude -c usbtiny -p atmega168 -B 10 -U flash:w:iv.hex

yeilds the same thing.

Code: Select all
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am

Re: Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 1:29 am

If I run with flag -F, like it suggests, I get the following:

Code: Select all
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA168 is 1E 94 06
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.

avrdude done.  Thank you.
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am

Re: Need some help programming Ice Clock

Postby adafruit » Tue Nov 16, 2010 2:00 am

could be you connected the programmer incorrectly, the chip needs to be replaced?
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 2:23 am

I'm curious in what way I could have connected the programmer incorrectly that would have caused this. I'm 99% sure I put the 6 pin cable in the correct way each time I connected it, but if I had put it in backwards would this have happened?

Or do you mean something different? Perhaps an issue inside the USBTiny?

Thanks for your assistance.
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am

Re: Need some help programming Ice Clock

Postby adafruit » Tue Nov 16, 2010 11:29 am

no, more like the programmer connected incorrectly and or a cable or wire was not soldered causing the chip to, say, be programmed with incorrect fuses.
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Need some help programming Ice Clock

Postby Len17 » Tue Nov 16, 2010 12:04 pm

Did you install resistors R4 and R7 in the USBtiny? I found I had to replace them with jumpers (as suggested in the instructions) for it to work.
User avatar
Len17
 
Posts: 393
Joined: Sat Mar 14, 2009 6:20 pm

Re: Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 2:08 pm

Yes, I have resistors in R4 and R7. Should I jump them? Is my 168 dead?
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am

Re: Need some help programming Ice Clock

Postby stinkbutt » Tue Nov 16, 2010 3:45 pm

From what I can see you programmed the chip twice.

The first time it appeared to work, sort of, but then your clock stopped working.
The second time (and all the subsequent times, I'm lumping the rest under this rubric,) programming never worked.

Let me ask you this:

1. For each of those times, R4 and R7 were in and not jumpered? Is that true for the first time? The second?
2. For each of those times, was the clock plugged in? Was the tube in the clock at the time? For the first? For the second?

I guess that's like, 6 questions, total.
Red M&M, Blue M&M: They all wind up the same color
stinkbutt
 
Posts: 583
Joined: Wed Feb 17, 2010 1:40 am

Re: Need some help programming Ice Clock

Postby Len17 » Tue Nov 16, 2010 3:55 pm

Here are some tips on programming the IceTube:
viewtopic.php?f=41&t=13310

Yes, you should replace R4 & R7 with jumpers. If that's your only problem, you didn't destroy anything.
User avatar
Len17
 
Posts: 393
Joined: Sat Mar 14, 2009 6:20 pm

Re: Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 6:31 pm

stinkbutt wrote:From what I can see you programmed the chip twice.

The first time it appeared to work, sort of, but then your clock stopped working.
The second time (and all the subsequent times, I'm lumping the rest under this rubric,) programming never worked.

Let me ask you this:

1. For each of those times, R4 and R7 were in and not jumpered? Is that true for the first time? The second?
2. For each of those times, was the clock plugged in? Was the tube in the clock at the time? For the first? For the second?

I guess that's like, 6 questions, total.


Hey stinkbutt, nice to smell you.

R4 and R7 are in, and always have been. I have done no jumpering, and I did all of the programming without the clock plugged in and with the tube out.

I guess at this point I should jumper R4 and R7 and try programming again?

Thanks everyone!
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am

Re: Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 6:54 pm

I'll add that I built this USBtiny a few months ago but I can't remember ever programming anything else with it, though I've built/used other USBtinys before this one... So maybe it's not right.

Also, I seem to recall a way to test USBtinys, but I can't seem to find the page. Any hints on that?
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am

Re: Need some help programming Ice Clock

Postby stinkbutt » Tue Nov 16, 2010 8:41 pm

jld wrote:R4 and R7 are in, and always have been. I have done no jumpering, and I did all of the programming without the clock plugged in and with the tube out.

I guess at this point I should jumper R4 and R7 and try programming again?


Yes, I think you probably should. The reason you replace R4 and R7 is that with them removed the USBTinyISP can supply the power for the device (in this case the 168) being programmed. Otherwise you'll need to have the clock plugged in while programming it. Which is actually another alternative in a pinch, if you want to just get the damn thing working again in 5 minutes instead of reworking your USBTiny: Pull the tube, plug in the clock, and program with:

Code: Select all
avrdude -c usbtiny -p m168 -U flash:w:iv.hex


You can find the explanation for the R4 and R7 bits here, about a third of the way down the page.

Frankly, I'm a little surprised you managed to get the thing running at all without R4 and R7 jumpered. One would think it'd either always work or never work.

Oh, and one last thing: Regardless of how you program the clock, (plugged in or new jumpers for R4/7) I would try avrdude without the -B flag, at least at first. I can't recall that flag ever working properly. Someone might have a happy ending to a story that involves the -B flag, but I can't recall ever reading one.
Red M&M, Blue M&M: They all wind up the same color
stinkbutt
 
Posts: 583
Joined: Wed Feb 17, 2010 1:40 am

Re: Need some help programming Ice Clock

Postby jld » Tue Nov 16, 2010 11:27 pm

Frankly, I'm a little surprised you managed to get the thing running at all without R4 and R7 jumpered. One would think it'd either always work or never work.


No, you're right about this. I've never programmed the Ice Clock before. I got the full kit and assembled, but this was my first attempt at reflashing it.

So I plugged it into AC, connected to the USBtiny, and ran avrdude:
Code: Select all
avrdude -c usbtiny -p m168 -U flash:w:iv.hex


and got the same output...

Code: Select all
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


I'm thinking either the 168 or my USBTiny is busted. I've got another 168 with me, that's in my arduino, so I'm tempted to put that in and try to reflash it again, but I don't want to burn up another one if it's my TinyUSB that is the problem.
jld
 
Posts: 34
Joined: Sun Jun 21, 2009 1:35 am

Next

Return to Clocks

Who is online

Users browsing this forum: No registered users and 3 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [105]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]