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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-12-30T00:13:18+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Peter Chaffe]]></name></author>
		<updated>2011-12-30T00:13:18+02:00</updated>

		<published>2011-12-30T00:13:18+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20559#p20559</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20559#p20559"/>
		<title type="html"><![CDATA[Re: problem on atmega8 with USB_CFG_IOPORTNAME set to D]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20559#p20559"><![CDATA[
Thought I'd give you all of my results so far<br /><br />PowerSwitch code (default, as downloaded from site):<br />ie only using pre-compiled hex file.<br /><br /><div class="codebox"><p>Code: </p><pre><code>used Attiny2313<br />Flashed with AVRDragon<br />External 12 mc/s crystal<br />Fuses:<br />Ex 0xFF<br />high 0xDF<br />low 0xFF<br /><br />Tested and works fine on:<br />xp pro 32 bit sp3<br />W7 home 64bit<br />W7 enterprise 64bit</code></pre></div><br /><br />PowerSwitch code (as downloaded):<br />This time compiled in AVRStudio4<br />Build succeeded with 0 Warnings...<br /><br /><div class="codebox"><p>Code: </p><pre><code>used Attiny2313<br />Flashed with AVRDragon<br />External 12 mc/s crystal<br />Fuses:<br />Ex 0xFF<br />high 0xDF<br />low 0xFF<br /><br />Tested and works fine on:<br />xp pro 32 bit sp3<br />W7 home 64bit<br />W7 enterprise 64bit</code></pre></div><br /><br />PowerSwitch code (changed to latest usbdrv dir~ver 20100715):<br />again compiled in AVRStudio4<br />Build succeeded with 0 Warnings...<br /><br /><div class="codebox"><p>Code: </p><pre><code>used Attiny2313<br />Flashed with AVRDragon<br />External 12 mc/s crystal<br />Fuses:<br />Ex 0xFF<br />high 0xDF<br />low 0xFF<br /><br />Tested and works fine on:<br />xp pro 32 bit sp3<br />W7 home 64bit<br />W7 enterprise 64bit</code></pre></div><br /><br />PowerSwitch code (Your version as uploaded, using portB):<br />again compiled in AVRStudio4<br />Build succeeded with 0 Warnings...<br /><br /><div class="codebox"><p>Code: </p><pre><code>used AtMega328p<br />Flashed with AVRDragon<br />External 12 mc/s crystal<br />Fuses:<br />Ex 0xFF<br />high 0xDF<br />low 0xFF<br /><br />Tested no good, not even being detected although incuring enumeration:<br />haven't delved into what might be causing this...<br />xp pro 32 bit sp3<br />W7 home 64bit<br />W7 enterprise 64bit</code></pre></div><br /><br />PowerSwitch code (the standard version, (using portB + jump wire to INT0)):<br />again compiled in AVRStudio4<br />Build succeeded with 0 Warnings...<br /><br /><div class="codebox"><p>Code: </p><pre><code>used AtMega328p<br />Flashed with AVRDragon<br />External 12 mc/s crystal<br />Fuses:<br />Ex 0xFF<br />high 0xDF<br />low 0xFF<br /><br />working ok, even though i'm getting intermittent drop out (Two tone sounds) it still works reliably<br />haven't delved into what might be causing this. It could be just the breadboard connections playing up, not sure...<br />xp pro 32 bit sp3<br />W7 home 64bit<br />W7 enterprise 64bit</code></pre></div><br /><br />PowerSwitch code (the standard version, (using portD pins you were using , no jump lead)):<br />again compiled in AVRStudio4<br />Build succeeded with 0 Warnings...<br /><br /><div class="codebox"><p>Code: </p><pre><code>used AtMega328p<br />Flashed with AVRDragon<br />External 12 mc/s crystal<br />Fuses:<br />Ex 0xFF<br />high 0xDF<br />low 0xFF<br /><br />working ok, even though output channels are in a mess compared to original (main.c not changed)<br />xp pro 32 bit sp3<br />W7 home 64bit<br />W7 enterprise 64bit</code></pre></div><br /><br />Hope this helps a bit!<br />Not technically based, but a hunch is that bit #0 might need to be used on some chips, ie if neither usb data pins are connected to bit #0 then there could/might be problems.<br />If this is right then a cure might be using bit #0 and a jump wire to INTO pin, same port (haven't tried it because everything has decided to work atm)...<br /><br />I'm trying to get the powerSwitch to run on an attiny45 now<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=6086">Peter Chaffe</a> — Fri Dec 30, 2011 12:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mov01]]></name></author>
		<updated>2011-12-28T17:01:53+02:00</updated>

		<published>2011-12-28T17:01:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20548#p20548</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20548#p20548"/>
		<title type="html"><![CDATA[Re: problem on atmega8 with USB_CFG_IOPORTNAME set to D]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20548#p20548"><![CDATA[
Hi,<br /><br />thanks for your reply.<br />I have uploaded a modified version of the simple powerswitch reference example. I modified the PROGMEM(const) parts of the code, so that i am able to compile it using my version of gcc:<br /><!-- m --><a class="postlink" href="http://ingo.orgizm.net/vusb/powerswitch_portd.tar.gz">http://ingo.orgizm.net/vusb/powerswitch_portd.tar.gz</a><!-- m --><br />I also modified the parts of code (inside main.c), that modifies PORTD so it wont interfere with the pins on PORTD used for usb-communication.<br />The config as it is in the upload doesnt work for me. The device wont enumerate properly.<br /><br />But if you modify the config like<br /><div class="codebox"><p>Code: </p><pre><code>#define USB_CFG_IOPORTNAME B<br />#define USB_CFG_DMINUS_BIT 0<br />#define USB_CFG_DPLUS_BIT 1<br /></code></pre></div><br />everything works just fine. <br />The code relies on 12Mhz clock-rate.<br />It would be great if you could check this on your hardware and report me the results.<br /><br />Thanks in advance,<br /><br />mov01<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=6162">mov01</a> — Wed Dec 28, 2011 5:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Peter Chaffe]]></name></author>
		<updated>2011-12-27T09:28:12+02:00</updated>

		<published>2011-12-27T09:28:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20542#p20542</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20542#p20542"/>
		<title type="html"><![CDATA[Re: problem on atmega8 with USB_CFG_IOPORTNAME set to D]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20542#p20542"><![CDATA[
What code are you using?<br />Upload it and I'll try it on a atmega328 which i believe is pin compatible with the atmega8...<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=6086">Peter Chaffe</a> — Tue Dec 27, 2011 9:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mov01]]></name></author>
		<updated>2011-12-23T16:55:07+02:00</updated>

		<published>2011-12-23T16:55:07+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20517#p20517</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20517#p20517"/>
		<title type="html"><![CDATA[problem on atmega8 with USB_CFG_IOPORTNAME set to D]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6309&amp;p=20517#p20517"><![CDATA[
Hi,<br /><br />i am having a problem setting USB_CFG_IOPORTNAME to D getting vusb to work. If i use B instead and connect INT0 additionally to D+ everything works fine, only if i use D as USB_CFG_IOPORTNAME and connect D+ directly to INT0 i cant get it to work. I seems to me, that there is a link between using PD2 as IOPORTNAME and as external interrupt at the same time.<br /><br />this works:<br /><br />#define USB_CFG_IOPORTNAME      B<br />#define USB_CFG_DMINUS_BIT       0<br />#define USB_CFG_DPLUS_BIT         1<br /><br />and connecting a additional wire between B1 and INT0.<br /><br />this doesnt work:<br /><br />#define USB_CFG_IOPORTNAME      D<br />#define USB_CFG_DMINUS_BIT       4<br />#define USB_CFG_DPLUS_BIT         2<br /><br />Does anyone expirienced simillar issues or has any idea why this could happen?<br /><br />Greetz, mov01<br /><br />By the way, i recognized that variables inside PROGMEM now needs to be declared as const(wich is in all available vusb-downloads not the case) getting a vusb firmware compiled with a modern avr-gcc.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=6162">mov01</a> — Fri Dec 23, 2011 4:55 pm</p><hr />
]]></content>
	</entry>
	</feed>
