Trinket is now a brick

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
cyborg5
 
Posts: 71
Joined: Tue Apr 24, 2012 4:13 pm

Trinket is now a brick

Post by cyborg5 »

I think I bricked my trinket… Does that make it a Lego? :-)

I had successfully uploaded a couple of different sketches to my 5 V trinket. They were different variations of the LED blink routine.

Recently Mike Barela posted some projects in the learning system where you use the LCD backpack connected via I2C with the trinket. I did not have a backpack handy but I did have an Adafruit LCD shield with keypad. So I tried modifying that library to use the TinyWireM library in the same way that Mike mollified the backpack library. Uploaded the "Hello World" sketch to the trinket and everything worked perfectly! It displays "Hello, world!" and the counting clock. Pressing the various keypad buttons changes the display appropriately. I was ecstatic! Until I tried to upload something else.

I think I may have somehow trashed the boot loader. The trinket is connected to a Windows 7 64-bit PC and it no longer recognizes the device as a USBTiny ISP device. The Arduino IDE fails to find the device. And now pushing reset does not start the blinking boot loader. It does successfully restart the LCD RGB shield Hello World program. So my program is stuck in there and I've lost my boot loader.

I looked through the learning system and I don't see any tutorials on how to reload your trinket boot loader.

Either the LCD RGB shield library and sketch were too large for the chip and that's why the boot loader was trashed. Also there's a possibility that I had my Arduino IDE set for 16 MHz instead of 8 MHz. Perhaps that trashed the boot loader somehow.

I do not have any kind of ISP device but I do have an Arduino Uno that as I understand it you can use as a programmer. Are there any tutorials on what to do when you turn your trinket into a Lego. By the way I'm claiming authorship to the idea of calling a bricked trinket a Lego and hereby release the use that term to the public domain. I just want credit for being the first to call it that :-)

You got to laugh at a time like this to keep from crying.

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Trinket is now a brick

Post by AnneBarela »

I suggest you disconnect the trinket from everything. Plug the Trinket into your PC using a cable. Do you hear the typical USB "plug and play" sound when you plug it in?

Load up the Trinket Blink Sketch. Try to upload it. When you press the reset button, do you hear the "un-plug and play" then "plug and play" sounds? Does the red light flash when the reset button is pressed?

There could be an issue where Windows is having driver issues if it does not recognize the device.

I have also had some issues with the IDE (not "brick" issues, more like funny compile errors), I installed a clean install in a separate directory then made the changes for Trinket.

Personally I have one Trinket (more on the way) and I've uploaded alot of sketches and wired many circuits, no issues yet. If you connect something to GPIOs #3 and #4, the ability of the Trinket to use those pins for USB can be upset. I try to wire my circuits using GPIOs #0-2 to avoid this (and to provide Gemma compatibility).

I fully believe folks have had some issues and I believe the Adafruit staff are working to document and know of the issues to try to find a cause & effect.

Some have posted success using AVRdude to "recover" a Trinket - Adafruit posted a blank sketch hex file to facilitate those who are brave working in this area - I do not suggest this be done without some experience or study of forum posts to make sure you know what folks are doing.

Post your results from the first few steps above.

User avatar
cyborg5
 
Posts: 71
Joined: Tue Apr 24, 2012 4:13 pm

Re: Trinket is now a brick

Post by cyborg5 »

when I push reset or if I plug and unplug the device I do get the Windows plug-and-play sounds. However I get a message with the notification area on Windows that says that it does not recognize a USB device. When I go into Windows device manager it shows up as "unknown device".

The only pins I've ever connected to are D0 and D2 for the i2c data and clock. And as I explained in an earlier message I digitally pulse the reset line low to reset the device by sending a signal to the reset pin using an Arduino Uno. But I have also had someone physically push the reset button and/or physically unplug and replug the device. In any case it will not go into boot loader mode.

Eureka!

While in the middle of composing this message I had a brainstorm that perhaps something was going flaky with my reset mechanism. I unplugged my reset line from the Arduino Uno to the trinket and manually pushed reset. It went into normal boot loader mode. I was then able to successfully upload sketches. I modified my reset sketch on the Uno to change the timing of the reset pulse. I restored the line between the Uno in the trinket and now my remote reset is working and everything is working.

The reset sketch on the Uno would drive the pin high. Then drive it low for 1/10 of a second. Then drive it high again and leave it there. I put more of a delay between the initial driving high and pulsing low and I link send the time of the low pulse. I think probably when I turn my computer off and on (which also turns power to both devices off and on) they were both trying to boot out of sequence with each other. I think that initial delay in the longer reset pulse may have done the trick.

At any rate it's all working now.

I will be on tonight's show and tell showing off that the LCD RGB shield now works with trinket.

Anyway thanks for letting me crying your shoulder and for some advice even though it turned out to be something else or just could've been a random glitch.

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Trinket is now a brick

Post by AnneBarela »

Any time my friend

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”