Component substitution and USBtinyISP not working

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

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gutoandreollo
 
Posts: 6
Joined: Tue Jan 29, 2008 3:52 pm

Component substitution and USBtinyISP not working

Post by gutoandreollo »

Ok.. i just finished assembling my USBtinyISP, and it's not quite working..
The green light won't come on, unfortunately... :(

here's my dmesg output:

Code: Select all

[  562.860000] usb 1-1: new low speed USB device using uhci_hcd and address 2
[  562.980000] usb 1-1: device descriptor read/64, error -71
[  563.204000] usb 1-1: device descriptor read/64, error -71
[  563.420000] usb 1-1: new low speed USB device using uhci_hcd and address 3
[  563.540000] usb 1-1: device descriptor read/64, error -71
[  563.764000] usb 1-1: device descriptor read/64, error -71
[  563.980000] usb 1-1: new low speed USB device using uhci_hcd and address 4
[  564.388000] usb 1-1: device not accepting address 4, error -71
[  564.500000] usb 1-1: new low speed USB device using uhci_hcd and address 5
[  564.908000] usb 1-1: device not accepting address 5, error -71
Now, due to the lack of the actual parts, i had to make some substitutions:
First, i didn't have access to an ATTiny2313-20PU, so i used a -10PU part. Is that the whole problem? From my experience with PICs, that's not a lot of overclocking...

Also, i had to exchange the diodes: i traded the 1N5226B into 1N746A (datasheets: http://www.ortodoxism.ro/datasheets/vishay/85588.pdf and http://www.ortodoxism.ro/datasheets/vishay/85756.pdf). From what I gathered, they're pretty much the same, but if they were identical there wouldn't be two different part numbers... :P
What i also found from the forums (http://www.ladyada.net/forums/viewtopic.php?t=4909) is that the diodes are supposed to be 3,6V zeners.. is that right? The V1.0 instructions explicitely ask for 3,3V... i also have some 1N4728A here (Also a 3,3V zener), would it work if i switched them?

Also, my capacitor is a little off from the design.. mine is a brownish-yellow square, which reads:
On one side:

Code: Select all

CKO5
BX
104K
on the other:

Code: Select all

50V
A
8430
This is my programming of the ATTiny on windows, with the extremely and absolutely cheap 5-wire-from-the-parallel-port programmer:

Code: Select all

C:\usbtinyisp\spi>avrdude -p attiny2313 -P lpt1 -c dapa -E reset -q -U flash:w:main.hex

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e910a
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 "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (2038 bytes):
avrdude: 2038 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 2038 bytes
avrdude: reading on-chip flash data:
avrdude: verifying ...              
avrdude: 2038 bytes of flash verified                              
avrdude: safemode: Fuses OK
                        
avrdude done.  Thank you.
I do know this ATTiny is at least halfway functional, since i've been playing with it and the blinkenlights the day before the USBtinyISP board arrived.

From searching the forums, i found this (http://www.ladyada.net/forums/viewtopic.php?t=3952), which suggests using ohci/ehci instead of uhci. Thing is, if i rmmod uhci_hcd, my usb ports simply cease working...

oh, and lsusb simply return the actual usb ports, but nothing connected to them.

Now, I know that i'm not quite in the position of asking for support, but has anyone ever had the same problems? managed to solve them? thanks in advance for any attention, and if any more information is needed, just tell me!

User avatar
rglenn
 
Posts: 20
Joined: Thu Oct 04, 2007 10:36 pm

Post by rglenn »

From the look of it, your computer's USB chip doesn't like the USBtinyISP. You seem to have a UHCI host controller, which seem to have problems with the programmer.

With USB 1.1, there were two types of host controller: OHCI and UHCI (because, really, why would you want to agree on anything?). Most USB 2.0 controllers are EHCI.

I'm 99.9998% sure you can't switch just by changing a driver, so you'll need to use some sort of USB PCI card that isn't UHCI in order to get the USBtinyISP to work.

Sorry!

User avatar
gutoandreollo
 
Posts: 6
Joined: Tue Jan 29, 2008 3:52 pm

Post by gutoandreollo »

Hmm.. tried that... on 2 different computers, actually, and running freeBSD, windows and linux (ubuntu-livecd).. both OHCI and neither works.. what else could be the problem, any ideas?

User avatar
opossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am

Post by opossum »

Did you program the fuses?

User avatar
gutoandreollo
 
Posts: 6
Joined: Tue Jan 29, 2008 3:52 pm

Post by gutoandreollo »

ok... you officially made me feel stupid.. :roll:
I never did read the Makefile, since I wasn't recompiling the firmware, just programming it.. so i just used the same command I use to program blinkenlights on the chips.. :oops:

works now.. at least the light now comes on

Code: Select all

C:\usbtinyisp\spi>avrdude -c dapa -P lpt1 -pt2313 -U hfuse:w:0xdb:m -U lfuse:w:0xef:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e910a
avrdude: reading input file "0xdb"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xdb:
avrdude: load data hfuse data from input file 0xdb:
avrdude: input file 0xdb contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xef"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xef:
avrdude: load data lfuse data from input file 0xef:
avrdude: input file 0xef contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.
from FreeBSD's dmesg:

Code: Select all

#dmesg
ugen0: vendor 0x1781 USBtiny, rev 1.01/1.03, addr 2
I'll test it this afternoon and report on my findings later.

Thanks for the advice

User avatar
gutoandreollo
 
Posts: 6
Joined: Tue Jan 29, 2008 3:52 pm

Post by gutoandreollo »

ok, let's see:

Code: Select all

C:\usbtinyisp\spi>avrdude -c usbtiny -p attiny2313
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e910a
avrdude: safemode: Fuses OK
avrdude done.  Thank you.
so now the first one is connecting to the USB allright, and reading the target chip allright.. so to actually test it, we program the next one with the first one... here's what i got.. :(

Code: Select all

C:\usbtinyisp\spi>avrdude -p attiny2313 -c usbtiny  -U flash:w:main.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e910a
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 "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (2038 bytes):

Writing | ######                                             | 12% 0.69sUSB write error: expected 32, got -5
Writing | #########                                          | 17% 0.92sUSB write error: expected 32, got -5
Writing | #################                                  | 34% 1.89sUSB write error: expected 32, got -5
Writing | ###########################                        | 54% 2.92sUSB write error: expected 32, got -5
Writing | ################################################## | 100% 5.48s

avrdude: 2038 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 2038 bytes
avrdude: reading on-chip flash data:

Reading | ############################################       | 87% 2.78sUSB read error: expected 128, got -5
Reading | ################################################## | 100% 2.97s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x36 != 0x02
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK

avrdude done.  Thank you.
The target chip is all alone sitting on a protoboard, with power thru the programmer. External power gives pretty much the same results, unfortunately.. :(

Trying different -B values just yields errors on different bits of the memory. (i believe 0x0000 was just a coincidence here, not the norm) :(

From the search on the forum, i found this other unanswered post with the same thing: http://forums.ladyada.net/viewtopic.php?t=4922.

Also, i'd note that avrdude 5.5 terminates on this error, but the 5.3.1 version (for the 1.12 driver) goes on writing..

From watching the error, i'm actually starting to think that the -10PU part might not be making it, what do you guys think?

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

Post by adafruit »

are you using linux or windows? first you mentioned linux but now you're talking about drivers...?

User avatar
gutoandreollo
 
Posts: 6
Joined: Tue Jan 29, 2008 3:52 pm

Post by gutoandreollo »

Here I have windows (xp pro sp2), linux (ubuntu 7.10) and freebsd (6.2).

To run the USBtinyISP, i'm using Windows, since the version on freebsd is not compiled with libusb and the one on ubuntu's repository is too old.. i can't get them to compile right yet, i'm still trying..

User avatar
gutoandreollo
 
Posts: 6
Joined: Tue Jan 29, 2008 3:52 pm

Post by gutoandreollo »

I'm on the process of ordering some -20PU parts.. they should arrive within a week or so.. when they do, I'll post on the progress..

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

Return to “USBtinyISP”