Help! Windows stopped device it reported a problem?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Gorm

Help! Windows stopped device it reported a problem?

Post by Gorm » Fri Oct 30, 2009 8:37 pm

Im trying to get this thing to work. Let me first detail my setup.
I have an atmega8 with a 16MHz crystal . D+ is attached through a 350 resistor to INT0,PD2. D- is attached through a 350 resistor to PD4.
On the d+ line i have a zener diode in series with another zener diode in opposite direction (i.e. clipper diode configuration) to produce a 2.9+.7 voltage drop.
The same is on the D- line . A 1.5k pullup resistor is on the D- line to the 5 volt usb supply which also powers the atmega8. I'm using the demo powerswitch program. In addition, im using the newest v-usb with it. The usbconfig.h file has been adjusted accordingly for the D- and D+ lines, everything else has been left as is.

When i plug everything in , i read a 3.53 volts on the D- line and approximately 0 on the D+ line (it actually shows from -8 mv to 8 mv)

When i plug it in, i get a 'unkown device' error. Then, when i click on it to get more details, i receive the following error:
'Windows has stopped this device because it has reported problems. (Code 43)'

Does anyone know why i would receive this error? Does it mean the device has actually communicated successfully with the computer to report a problem?

Gorm

Re: Help! Windows stopped device it reported a problem?

Post by Gorm » Fri Oct 30, 2009 8:41 pm

Well i plugged a new, non programmed avr in and i received the same message. so it isn't communicating with the computer

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: Help! Windows stopped device it reported a problem?

Post by maxi » Fri Oct 30, 2009 9:21 pm

Gorm wrote:On the d+ line i have a zener diode in series with another zener diode in opposite direction (i.e. clipper diode configuration) to produce a 2.9+.7 voltage drop.

I suggest you try one of the setups recommended in the wiki http://vusb.wikidot.com/hardware You may be getting the correct levels initially but both lines need to be to pulled in opposing directions to facillitate data transfer. Some systems I am finding are more forgiving than others.

Saimon

Re: Help! Windows stopped device it reported a problem?

Post by Saimon » Fri Oct 30, 2009 10:14 pm

On line D+ and D- use 68~100 Ohm resistors! And zenner diodes must be plugged as shown at http://vusb.wikidot.com/hardware Solution B!
If you want to use 2 diodes to drop out 1.4V, you must use http://vusb.wikidot.com/hardware Solution A the second shematic. And one more: make shure, that fuses programmed OK! Try?

Gorm

Re: Help! Windows stopped device it reported a problem?

Post by Gorm » Sat Oct 31, 2009 4:09 am

So i tried Solution A, diode drop (and just, btw, im on windows 7)

3.68 volts on D- line, 0 on D+ line

.4 uF between V/gnd - when they are connected to rest of circuit, the voltmeter starts to flicker when measuring capacitance. Probably normal.. Also, they are a little ways from usb line as i am now hooking ancillary stuff to a breadboard.

67.4 ohm - D- line
100 ohm - D+ line
2 zener diodes wrong way to produce 1.4 volt drop

Also, the WATCH DOG TIMER ALWAYS ON fuse bit is set to no. (im reading off a fuse file in eclipse,
so i don't know if that corresponds to a 1 or 0). Don't know if that is important.

16 mhz crystal - when pulled out microcontroller cant be programmed. fuse bits are set correctly (CKOPT = yes, SUT_CKSEL (Select clock source) = ext crystal/resonator high freq, start up time 258 CK + 4ms)

So, in terms of hardware, the only thing that i can see that I don't have exactly like the configuration is that i used zener diodes to produce .7 volts and i have 2 different resistor values on the D+ and D- line (only things i had!) I'll have to wait like 2 days if i absolutely need to get the exact values and regular diodes.
Just wondering, on the software side, is code like the powerswitch still supposed to work with the newest v-usb or should i use the old one?

Any further debugging ideas? Im sure its something really obvious...

Gorm

Re: Help! Windows stopped device it reported a problem?

Post by Gorm » Thu Nov 05, 2009 5:46 am

Alrigiht, still not working. I replaced resistors with 68 ohm and zener diodes witih regular diodes.
I searched a little and found a thread back from a few years ago in which the user also had troubles with 16mhz crystals.
viewtopic.php?f=8&t=1047&start=15
Has this been resolved? I guess my next step will be to try a 12 mhz crystal if i can get my hands on one and hook up the serial port for debugging. And try it on an older computer :D

Gorm

Re: Help! Windows stopped device it reported a problem?

Post by Gorm » Thu Nov 05, 2009 6:01 am

Quick question: I have my setup on a perfboard. Should i be looking for any ground loops that might give interference? The microcontroller is being programmed fine but...

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: Help! Windows stopped device it reported a problem?

Post by Grendel » Thu Nov 05, 2009 7:39 am

I've used V-USB w/ a mega8 16MHz just fine. Fuse bytes I use: high: 0xD9, low: 0x1F (w/o bootloader)

Gorm

Re: Help! Windows stopped device it reported a problem?

Post by Gorm » Thu Nov 05, 2009 8:01 pm

Which hardware option do you use? Thing is, i've used this successfully a while back but i used the 3.6v zener diode but nwo i don't know where its gone....

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: Help! Windows stopped device it reported a problem?

Post by Grendel » Thu Nov 05, 2009 10:24 pm

3.6V Z-diodes & 62Ohm. Make sure the diodes are rated 500mW or less.

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: Help! Windows stopped device it reported a problem?

Post by maxi » Thu Nov 05, 2009 11:08 pm

If it IS a mega8 (not mega8A or mega8L) then I don't think it's rated for < 4.5v operation. Check the datasheet for your device and make sure it can run at 16Mhz at ~3.6v.

Gorm

Re: Help! Windows stopped device it reported a problem?

Post by Gorm » Fri Nov 06, 2009 4:32 am

Dang, you're right. the atmega8-16pu, at 16mhz, has an operational voltage range from 4.5-5.5 volts. No solution A i guess. That leaves pretty much the zener diodes. All right, so maybe a silly question, but if I have 3.6 volt zener diodes which claim to be such but regulate the voltage from 2.9 up to around 3.6 as i change voltage from 5 to around 12, what does this exactly mean. Defective zener diodes? Ive never heard of this behavior before and i used a 10k resistor in series with the diode and measured around the diode, not the resistor, so... :(

Post Reply