<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/1674" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-10-22T17:59:51+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/1674</id>

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-10-22T17:59:51+02:00</updated>

		<published>2008-10-22T17:59:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6464#p6464</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6464#p6464"/>
		<title type="html"><![CDATA[Atmega32 with USB (Bad Signal Problem???)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6464#p6464"><![CDATA[
Regarding the pull-up: I use 1.5 kOhm usually, but it all depends on the zener diodes. The voltage should be between 3 and 3.3 V in idle mode.<br /><br />Regarding the endpoint: Endpoint 0 is always there and is a control endpoint. You don't need to declare it.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Wed Oct 22, 2008 5:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[epsilon_da]]></name></author>
		<updated>2008-10-14T19:16:56+02:00</updated>

		<published>2008-10-14T19:16:56+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6428#p6428</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6428#p6428"/>
		<title type="html"><![CDATA[Atmega32 with USB (Bad Signal Problem???)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6428#p6428"><![CDATA[
Hello Krieger.<br /><br />I have a similar problem:<br /><!-- m --><a class="postlink" href="http://forums.obdev.at/viewtopic.php?t=1803">http://forums.obdev.at/viewtopic.php?t=1803</a><!-- m --><br /><br />I think that it is relate to the cyrstal oscilator or maybe not.<br /><br />I have tryed the circuit that you posted with that code but it also doesnt work for me, so maybe it is my FUSE bits.<br />Right now i have:<br />FUSEs:  H:0xC9  L:0xEF<br /><br />I am new with atmel devices, so i dont understand too much of fuse flags.<br />I need to set it to a 16Mhz crystal oscilator, but the device is getting recogniced.<br /><br />If you have the ATmega32 at 16Mhz working with usb, can you please send me it as an example? jacobidiego ( at ) gmail.com<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1412">epsilon_da</a> — Tue Oct 14, 2008 7:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gniibe]]></name></author>
		<updated>2008-09-11T14:33:02+02:00</updated>

		<published>2008-09-11T14:33:02+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6186#p6186</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6186#p6186"/>
		<title type="html"><![CDATA[usbPoll problem, perhaps]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6186#p6186"><![CDATA[
I have encounter similar problem when I test AVR-USB at 20MHz, when<br />main loop just call usbPoll and no other things.<br /><br />If you put some delay in the loop, say, _delay_us(200),<br />and it works fine, usbPoll might be the cause of problem.<br /><br />For my case, following change fixed my problem.<br /><br />Could you please try it out?<br />I have submitted this as a bug report [USB#1413316].<br /><br /><div class="codebox"><p>Code: </p><pre><code>--- avrusb-20080513/usbdrv/usbdrv.c~   2008-05-14 01:00:11.000000000 +0900<br />+++ avrusb-20080513/usbdrv/usbdrv.c   2008-09-11 20:36:30.000000000 +0900<br />@@ -592,7 +592,7 @@<br />             usbBuildTxBlock&#40;&#41;;<br />         &#125;<br />     &#125;<br />-    for&#40;i = 10; i &gt; 0; i--&#41;&#123;<br />+    for&#40;i = 20; i &gt; 0; i--&#41;&#123;<br />         uchar usbLineStatus = USBIN &amp; USBMASK;<br />         if&#40;usbLineStatus != 0&#41;  /* SE0 has ended */<br />             break;<br /><br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1335">gniibe</a> — Thu Sep 11, 2008 2:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[henni]]></name></author>
		<updated>2008-09-09T09:08:12+02:00</updated>

		<published>2008-09-09T09:08:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6159#p6159</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6159#p6159"/>
		<title type="html"><![CDATA[Re: Some changes for circuit]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6159#p6159"><![CDATA[
&gt; i changed my 1k5 Resistor on D+ to 2k2 in cause of the 5V supply (not 3.3V).<br /><br />The right resistor value for such a pull-up is 10 k&#8486;:<br />UH(3.3V) = 3.3V * 15k&#8486; / (1.5k&#8486; + 15k&#8486;) = 3.0V<br />UH(5.0V) = 5.0V * 15k&#8486; / (10k&#8486; + 15k&#8486;)  = 3.0V<br />15k&#8486; is the host-side internal pull-down that forms the voltage divider.<br /><br />However, if you run your AVR with 5V supply, you should use a bit smaller value to pull the D- pin to a higher voltage, especially for less USB stand-by current.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1319">henni</a> — Tue Sep 09, 2008 9:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-09-01T17:05:12+02:00</updated>

		<published>2008-09-01T17:05:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6112#p6112</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6112#p6112"/>
		<title type="html"><![CDATA[Some changes for circuit]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6112#p6112"><![CDATA[
Hi,<br /><br />i changed my 1k5 Resistor on D+ to 2k2 in cause of the 5V supply (not 3.3V). Now it seems to connect fine but i get no endpoint to communicate. lsusb -v gives me:<br /><br /><div class="codebox"><p>Code: </p><pre><code>Bus 001 Device 034: ID 16c0:05dc  <br />Device Descriptor:<br />  bLength                18<br />  bDescriptorType         1<br />  bcdUSB               1.10<br />  bDeviceClass          255 Vendor Specific Class<br />  bDeviceSubClass         0 <br />  bDeviceProtocol         0 <br />  bMaxPacketSize0         8<br />  idVendor           0x16c0 <br />  idProduct          0x05dc <br />  bcdDevice            1.00<br />  iManufacturer           1 <br />  iProduct                2 <br />  iSerial                 0 <br />  bNumConfigurations      1<br />  Configuration Descriptor:<br />    bLength                 9<br />    bDescriptorType         2<br />    wTotalLength           18<br />    bNumInterfaces          1<br />    bConfigurationValue     1<br />    iConfiguration          0 <br />    bmAttributes         0x80<br />      &#40;Bus Powered&#41;<br />    MaxPower              100mA<br />    Interface Descriptor:<br />      bLength                 9<br />      bDescriptorType         4<br />      bInterfaceNumber        0<br />      bAlternateSetting       0<br />      bNumEndpoints           0<br />      bInterfaceClass         0 &#40;Defined at Interface level&#41;<br />      bInterfaceSubClass      0 <br />      bInterfaceProtocol      0 <br />      iInterface              0 <br />cannot read device status, Operation not permitted &#40;1&#41;<br /></code></pre></div><br /><br />Propably i have to code something but in the PowerSwitch example i see no endpoint configuration or something else.<br /><br />Greetings<br /><br />Thomas<p>Statistics: Posted by Guest — Mon Sep 01, 2008 5:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-09-01T15:49:09+02:00</updated>

		<published>2008-09-01T15:49:09+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6110#p6110</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6110#p6110"/>
		<title type="html"><![CDATA[Atmega32 with USB (Bad Signal Problem???)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1674&amp;p=6110#p6110"><![CDATA[
Hi,<br /><br />i try to get AVR USB Work with an Atmega32 and uses the Software from PowerSwitch<br />Example with modified usbconfig.h<br /><br />My Circuit is:<br /><br /><img src="http://www.mikrocontroller.net/attachment/39325/usbtest.png" class="postimage" alt="Image" /><br /><br />When i connect to Windows Vista nothing happens. When i connect it to my Linux PC i mostly get:<br /><br />[14632.335397] usb 1-7: new low speed USB device using ohci_hcd and address 6<br />[14632.519367] usb 1-7: device descriptor read/64, error -62<br />[14632.807387] usb 1-7: device descriptor read/64, error -62<br /><br />But every fourth or third connection my linux get it:<br /><br />[14320.700161] usb 1-7: new low speed USB device using ohci_hcd and address 114<br />[14320.916267] usb 1-7: configuration #1 chosen from 1 choice<br /><br />And lsusb gives me than:<br /><br />Bus 001 Device 009: ID 16c0:05dc  <br /><br />The correct device and vendor id but no description seems to be available.<br />My only idea is to connect an pull down resistor to D+ with 1M. Ordered the 1M and some other parts today. But propably one of you have some more ideas, why it gets not every time a connection.<br /><br />For the completion my main function is:<br /><br /><div class="codebox"><p>Code: </p><pre><code>usbMsgLen_t usbFunctionSetup&#40;uchar data&#91;8&#93;&#41;<br />&#123;<br />usbRequest_t    *rq = &#40;void *&#41;data;<br />static uchar    dataBuffer&#91;4&#93;;  /* buffer must stay valid when usbFunctionSetup returns */<br /><br />    return 0;   /* default for not implemented requests: return no data back to host */<br />&#125;<br /><br />int main&#40;void&#41; <br />&#123;<br />   uint8_t i;<br /><br /><br />   // Init Seriellen Schnittstelle<br />   //initSerial&#40;&#41;;<br />   <br />    wdt_enable&#40;WDTO_1S&#41;;<br />    <br />   DDRD  = ~&#40;1 &lt;&lt; 2&#41;;<br />   PORTD = 0;<br /><br />   usbDeviceDisconnect&#40;&#41;;  /* enforce re-enumeration, do this while interrupts are disabled! */<br /><br />   i = 150;<br />   while&#40;--i&#41;&#123;             /* fake USB disconnect for &gt; 250 ms */<br />       wdt_reset&#40;&#41;;<br />      _delay_ms&#40;1&#41;;<br />    &#125;<br /><br />    usbDeviceConnect&#40;&#41;;<br />    <br />   usbInit&#40;&#41;;<br />   <br />    sei&#40;&#41;;<br />    <br />    serial_puts&#40;&quot;connected&quot;&#41;;<br />    serial_return&#40;&#41;;<br />    <br />    for&#40;;;&#41;&#123;                /* main event loop */<br />        wdt_reset&#40;&#41;;<br />        usbPoll&#40;&#41;;<br />    &#125;<br />&#125;<br /></code></pre></div><br /><br />For what is the usbFunctionSetup ? <br /><br />Will have more looks into the documentation but happy about every hint.<br /><br />Greetings <br /><br />Krieger<p>Statistics: Posted by Guest — Mon Sep 01, 2008 3:49 pm</p><hr />
]]></content>
	</entry>
	</feed>
