Issues programming TVBgone kit using usbtinyisp

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Seanernet
 
Posts: 25
Joined: Thu Nov 15, 2007 8:06 pm

Post by Seanernet »

C:\WinAVR>avrdude -c usbtiny -p t85 -Ft

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny85 is 1E 93 0B
avrdude> send 0x12 0x34 0x56 0x78
>>> send 0x12 0x34 0x56 0x78
results: 00 00 00 00

avrdude> send 0x12 0x34 0x56 0x78
>>> send 0x12 0x34 0x56 0x78
results: ff ff ff ff

avrdude> quit
>>> quit

avrdude: safemode: Fuses OK

avrdude done. Thank you.




IDC Pin - AVR Pin
1 - 5 Open
2 - 8 94.6 ohms
3 - NC
4 - 4 0 ohms
5 - 1 Open
6 - 4 0 ohms
7 - 7 0 ohms
8 - 4 0 ohms
9 - 6 16.5 ohms
10 - 4 0 ohms


These tests were done assuming you are meaning to test continuity between the solder joints on the idc of the tvbgone to the solder joints on the idc of the usbtiny.

User avatar
caitsith2
 
Posts: 217
Joined: Thu Jan 18, 2007 11:21 pm

Post by caitsith2 »

Could I see a good quality picture of both sides of the TV-B-Gone.

Seems your programmer is operating correctly.

Seanernet
 
Posts: 25
Joined: Thu Nov 15, 2007 8:06 pm

Post by Seanernet »

Image

Tested as of 5 minutes ago, working great.

Positive lead disconnected along with the 4 resistors.
The Scratched pcb traces are from performing your earlier suggestions and the traces have been repaired and tested. The white stuff is double sided sticky tape or the remainder thereof.

A few minutes ago, I tried using avrdude with the tvbgone power disconnected and got an interesting result.

C:\WinAVR>avrdude -c usbtiny -p t85 -U flash:w:tvbgone.hex:i -F

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e930b
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "tvbgone.hex"
avrdude: writing flash (2932 bytes):

Writing | ################################################## | 100% 1.97s



avrdude: 2932 bytes of flash written
avrdude: verifying flash memory against tvbgone.hex:
avrdude: load data flash data from input file tvbgone.hex:
avrdude: input file tvbgone.hex contains 2932 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.53s



avrdude: verifying ...
avrdude: 2932 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

After that, the tvbgone, with the new t85 flashed the green light, though it failed to turn off the tv or flash in the pattern that the previous t85 did. Also, I then tried to read the original t85 and write the hex file and it failed saying invalid signature.

Thank you again for all your help.

Sean

User avatar
caitsith2
 
Posts: 217
Joined: Thu Jan 18, 2007 11:21 pm

Post by caitsith2 »

The reason the new t85 is not turning any TVs off, is that the internal oscillator is not accurate enough. In this case, you have to burn the fuses.

avrdude -c usbtiny -p t85 -u -U lfuse:w:0xfd:m -U hfuse:w:0xde:m

Once that is done, then the newly flashed TV-B-Gone should now turn TVs off/on.

----- EDIT -----

Definitely reflow the solder joint on Pin 1 of the IDC connector. Also consider reflowing Pin 5 of IDC, and Pins 1 and 5 of the AVR. that might well explain the opens on both of those mappings.

--- EDIT ---

Forgot the safe mode disable flag, required for writing the fuses.

Seanernet
 
Posts: 25
Joined: Thu Nov 15, 2007 8:06 pm

Post by Seanernet »

BANNED,

You are my hero!!!! Finally it is working. I flashed all 5 chips and tested one. I really appreciate the walkthru, this has been a great learning experience. Now to build some more tvbgones in smaller more concealable ways.

Thank you so very much,
Sean

User avatar
caitsith2
 
Posts: 217
Joined: Thu Jan 18, 2007 11:21 pm

Post by caitsith2 »

The precompiled firmware I have provided, has 55 power codes programmed in, and has a stealth mode feature built in, which disables the blinking. (It still blinks 4 times at the end of code issuing, to let you know it has finished issuing the codes.)

To turn on stealth mode, push the button twice.

Additionally, there is a persistent stealth feature programmed in as well, where each use does not blink anything other then end of codes, unless doubleclicked. Turning that on means push the button, release it, then push as if to turn on stealth mode, but hold it for 5 seconds. At that point, it will blink to let you know that you activated (or deactivated if active) persistent stealth mode.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

wow awesome work here BANNED, thanks for posting this stuff :)

Seanernet
 
Posts: 25
Joined: Thu Nov 15, 2007 8:06 pm

Post by Seanernet »

Testing and working! Now if I can find a good equivalent to the IR333C/H0/L10, since mouser is backordered until 1/2008.

Image

I_am_bad_at_this
 
Posts: 31
Joined: Thu Dec 13, 2007 12:50 am

Post by I_am_bad_at_this »

Ok, so ive been learning abut this avr stuff, and was first wondering, would an extra tv-b-gone work for programing t85 microcontrollers (2 microcontrollers for different functions on the remote). and BANNED, wow ur a genious! Im thinking of making the modded tv-b-gone (BANNED's mods) to program microcontrolles i want to use.

Thanks!!

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm

Post by maltman23 »

wondering, would an extra tv-b-gone work for programing t85 microcontrollers
If I understand your question correctly, then: yes.

I use a TV-B-Gone Kit PCB as a bare-bones board for programming ATtiny85 chips (and 45 and 25, which have the same pin-outs). The board has only the 8-pin DIP socket and the 10-pin programming header, with the 3v battery pack connected. I just keep this connected to the USBtinyISP AVR Programmer, and I'm always ready to program AVR chips.

Mitch.

User avatar
tz1
 
Posts: 32
Joined: Sat Aug 01, 2009 11:26 pm

Re: Issues programming TVBgone kit using usbtinyisp

Post by tz1 »

I know I'm late to the conversation, but I needed to use a breadboard to program it. Basically the pinout in an earlier message, just the ATtiny85 to the 10 pin connector (only one ground pin - pin 10). And I needed to use the 8MHz resonator (which I had on my socket).

Since adafruit is selling the kits for $15 right now, so I will probably minimally populate one I ordered.

whatismyresults
 
Posts: 1
Joined: Mon Aug 12, 2013 10:47 pm

Re:

Post by whatismyresults »

BANNED wrote:Could it be the way the fuses are programmed on the TV-B-Gone kit AVR? I have done a few loopback tests, and got results that seem to indicate that the programmer itself is working.

Loopback MOSI to MISO, should result in a result of whatever is sent on the raw output will be received back on the input. Loopback of MISO to SCK should result in all 0xFF on the input, as SCK goes high on reading the input,Valentines day 2014 then low to write the desired output, and loopback to RST gets all 0x00, as RST is set low, for programming functions .
I'm having the same exact problem and if I run Avrdude without the -F it just gives initialization failed, rc=-1

Any simple way to read and write to the t85 with usbtiny??

Thanks,
Sean

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm

Re: Issues programming TVBgone kit using usbtinyisp

Post by maltman23 »

In order to program the ATtiny85 in the TV-B-Gone kit in-circuit, you need to unsolder one side of R1 (since it loads down the MOSI programming pin (which is also used to drive all of the IR LEDs through the transistors). Use this command:

Code: Select all

     make program
After programming the ATtiny85, re-solder in R1, and you're set to go.

Don't forget to program the fuse bits if your ATtiny85 is new. Use this command:

Code: Select all

     make burn-fuse

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

Return to “USBtinyISP”