<?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/609" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2007-07-31T19:47:39+02:00</updated>

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

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-07-31T19:47:39+02:00</updated>

		<published>2007-07-31T19:47:39+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1850#p1850</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1850#p1850"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1850#p1850"><![CDATA[
How long is the disconnect during reset? Windows detects it only (reliably) if it's at least ~ 500 ms long. Otherwise it may be &quot;overlooked&quot; and the device and host are out of sync with respect to the device ID.<br /><br />You can only rely on the &quot;ding&quot; sound on Windows if your disconnect pulse is at least 500 ms long.<br /><br />Good shielded cables can help because they add capacity from D+ and D- to ground. The data lines therefore catch less capacitive EMI.<br /><br />If you find out how to suppress this type of EMI problem, please let us all know!<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Tue Jul 31, 2007 7:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ahulap]]></name></author>
		<updated>2007-07-31T19:39:05+02:00</updated>

		<published>2007-07-31T19:39:05+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1849#p1849</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1849#p1849"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1849#p1849"><![CDATA[
<blockquote><div><cite>christian wrote:</cite>I doubt that this is a problem with the host side driver. Switching to HID won't help.<br /></div></blockquote><br />Yes, i have tested it - no difference <img class="smilies" src="./../../../images/smilies/icon_sad.gif" alt=":(" title="Sad" /><br />But, i think, it is not a controller reset. When D- pull-up is controlled by IO pin, during reset this pull-up is disabled - device disconnects and window plays 'ding' sound... device leds blinks... And so why good shielded cable helps? But, i think, the only way to find what is happening, is to create a prototype board with e.g. mega16 and check it with JTAG.<br />I use a simple solution for USBasp programmer: move pull-up to IO pin and add a programmer reset button.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=111">ahulap</a> — Tue Jul 31, 2007 7:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-07-30T16:17:12+02:00</updated>

		<published>2007-07-30T16:17:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1817#p1817</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1817#p1817"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1817#p1817"><![CDATA[
It was definitely not a brown-out in my circuit because I used an AT90S2313 which has no brown-out detection. And I added all types of capacitors to the supply voltage in the hope that it would improve things.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Jul 30, 2007 4:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iphi]]></name></author>
		<updated>2007-07-29T06:46:00+02:00</updated>

		<published>2007-07-29T06:46:00+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1808#p1808</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1808#p1808"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1808#p1808"><![CDATA[
Could it be a brown-out reset steming from a glitch on the power supply?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=292">iphi</a> — Sun Jul 29, 2007 6:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-07-26T19:30:51+02:00</updated>

		<published>2007-07-26T19:30:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1799#p1799</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1799#p1799"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1799#p1799"><![CDATA[
I doubt that this is a problem with the host side driver. Switching to HID won't help.<br /><br />The original firmware was without the USB reset code. Inserting the reset code fixed the problem for Linux (Linux detects the disconnect condition fast enough). I think that's proof enough that the processor restarted execution at main().<br /><br />If you use a scope to check for USB disconnect, please make sure that the initial disconnect code works and that the scope detects the spike reliably.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Jul 26, 2007 7:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ahulap]]></name></author>
		<updated>2007-07-26T13:52:49+02:00</updated>

		<published>2007-07-26T13:52:49+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1797#p1797</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1797#p1797"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1797#p1797"><![CDATA[
In my case it was not RESET. Firstly i have modified USBasp SW &amp; HW - move D- pull-up to IO pin and watch this pin with oscilloscope - where was no impulses there. Then i have build optically isolated version (with 6N137) - disconnections occurs more rarely, but they not totally gone!<br />In second case USB2.0 cable with good shielding almost solve this problem. The device, that i tried to program, was a self-made frequency meter on mega8 with the following power supply: 220V -&gt; Power switch -&gt; 13V transformator -&gt; Diode bridge -&gt; 7809 -&gt; 7805.<br />Can it be problems with LibUSB driver? Can HID driver usage solve this problem? Now i will build simplified version of AVR-Doper (ISP only, without HC126: can't buy it, substitute it with 4 NPN transistors) and test this in HID mode...<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=111">ahulap</a> — Thu Jul 26, 2007 1:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-07-26T12:23:30+02:00</updated>

		<published>2007-07-26T12:23:30+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1796#p1796</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1796#p1796"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1796#p1796"><![CDATA[
Yes, I have seen these EMI problems, too. I don't know what causes them, but I know that the processor goes through a RESET. I suspect that the spikes somehow couple to the RESET pin since any connection to this pin makes the problem worse. As far as I remember, I could prove that it's not a watchdog reset, but an external reset from the RESET pin.<br /><br />I don't know how to fix the cause, but you can fight the symptom. At the beginning of main, both USB pins are set to 0, then a delay loop is started and then they are configured as inputs. Increase the delay to ~ 500 ms. This ensures that the host sees the reset and re-enumerates the device.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Jul 26, 2007 12:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ahulap]]></name></author>
		<updated>2007-07-25T18:06:46+02:00</updated>

		<published>2007-07-25T18:06:46+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1791#p1791</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1791#p1791"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1791#p1791"><![CDATA[
I have the same problems with USBasp programmer (on WinXP). Voltage surges from target (especially on power-up) makes device lost - only reconnection helps. Good, shielded cable helps a lot, but not totally.<br />PS: I have tested avr910 programmer with ft232 mc with the same cables and target - all works fine.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=111">ahulap</a> — Wed Jul 25, 2007 6:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[andrewid]]></name></author>
		<updated>2007-07-25T15:39:51+02:00</updated>

		<published>2007-07-25T15:39:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=609&amp;p=1790#p1790</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1790#p1790"/>
		<title type="html"><![CDATA[PowerSwitch disconnects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=609&amp;p=1790#p1790"><![CDATA[
I'm using PowerSwitch (ver. 2007-06-25) on a PCB. It's powered from the USB bus, and switches only two 5V relays, and a lot of optocouplers.<br />The problem is, that if (relatively small) eletrical EMI occours, (example a soldering iron plugged in nearby) the PowerSwitch disconnects.<br />Under Linux, it's comes back immediately with no problem. The only sign of the disconnect is in the dmesg log:<br />usb.c: USB disconnect on device 01:03.0-2.1.2 address 53<br />hub.c: new USB device 01:03.0-2.1.2, assigned address 54<br /><br />But in Windows XP, it's gets lost forever, unless somebody phisically pulls out the USB connector and/or restarts the computer.<br />I'm not an expert in electronics, and I don't know how to handle this EMI problem correctly.<br />The disconnect occours the PowerSwitch's idle state, not when on of the relay switches.<br />I'm using shielded USB cables as long as possible, and using metal housing, but looks like it's not enough.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=335">andrewid</a> — Wed Jul 25, 2007 3:39 pm</p><hr />
]]></content>
	</entry>
	</feed>
