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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-05-19T06:55:54+02:00</updated>

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

		<entry>
		<author><name><![CDATA[gator456]]></name></author>
		<updated>2010-05-19T06:55:54+02:00</updated>

		<published>2010-05-19T06:55:54+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14528#p14528</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14528#p14528"/>
		<title type="html"><![CDATA[Re: Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14528#p14528"><![CDATA[
I examined the VUSB driver and verified the registers it is setting for the interrupts.  THen I ran a AVR Studio simulation and verified the correct initialization of EIMSK and EICRA.  I also wrote a small program to turn on a LED when INT0 was applied. THe program worked, so I know the INT0 logic is working.<br /><br />Any suggestions?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3887">gator456</a> — Wed May 19, 2010 6:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gator456]]></name></author>
		<updated>2010-05-18T06:28:33+02:00</updated>

		<published>2010-05-18T06:28:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14502#p14502</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14502#p14502"/>
		<title type="html"><![CDATA[Re: Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14502#p14502"><![CDATA[
I think I know what is going on, I just dont know how to fix it...<br /><br />I borrowed a logic analyzer from a friend and I downloaded USBlyzer.  THe USBlyzer says that the &quot;Enumeration of device failed&quot;.  When I look at power up sequence on the D+/D- lines on the logic analyzer I see 6 frames of data.  Then I disconnected the D+/D- lines from the AVR and reran the powerup sequence.   I saw the same data.     If i zoom in on one of the frames I see 1010101110010011010011101110100100... on the D+ line<br /><br />It seems like to me that the AVR is not responding to the interrupt that is coming in on the D+/D- line.  I have them signals connected to PIND2 (D+) and PIND4(D-)<br /><br />#define USB_CFG_IOPORTNAME      D<br />#define USB_CFG_DMINUS_BIT      4<br />#define USB_CFG_DPLUS_BIT       2<br /><br />Tomorrow or Wednesday I will see if I can write a small bit of code that will flash some LEDs when INT0 is asserted (just to make sure the interrup is working)<br /><br />BTW I know that the main loop is running because it is flashing a pair or LED's:<br /><br />Any suggestions?<br /><br />int main(void)<br />{<br />uchar   i;<br />uint8_t toggle = 0;      <br />   DDRC = 0xFF; <br />   PORTC = 0x00;<br />    wdt_enable(WDTO_1S);<br />    usbInit();<br />    usbDeviceDisconnect();  /* enforce re-enumeration, do this while interrupts are disabled! */<br />    i = 0;<br />    while(--i){             /* fake USB disconnect for &gt; 250 ms */<br />        wdt_reset();<br />        _delay_ms(1);<br />    }<br />    usbDeviceConnect();<br />    sei();<br />    for(;;){                /* main event loop */<br />        wdt_reset();<br />        usbPoll();<br />        if (toggle == 0 ) {<br />PORTC = 0xFF;<br />    toggle = 1;<br />   // _delay_ms(50);<br />    } else {<br />PORTC = 0x00;<br />    toggle = 0;<br />            //_delay_ms(50);<br />    }<br />        if(usbInterruptIsReady()){<br /> <br />            advanceCircleByFixedAngle();<br />            usbSetInterrupt((void *)&amp;reportBuffer, sizeof(reportBuffer));<br />        }<br />    }<br />    return 0;<br />}<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3887">gator456</a> — Tue May 18, 2010 6:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maxi]]></name></author>
		<updated>2010-05-16T04:12:37+02:00</updated>

		<published>2010-05-16T04:12:37+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14483#p14483</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14483#p14483"/>
		<title type="html"><![CDATA[Re: Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14483#p14483"><![CDATA[
<blockquote><div><cite>gator456 wrote:</cite>Are there any special requirements for the zeners?</div></blockquote><br />None that I could say, other than those recommeded in the wiki. I am using BZXC3V6 myself but you might find it will work without any level conversion, it really just depends on your system. Give it another go with the zeners, see what voltages you read on D+/- Also see what happens using only the 68R resistors.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2570">maxi</a> — Sun May 16, 2010 4:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gator456]]></name></author>
		<updated>2010-05-15T21:15:46+02:00</updated>

		<published>2010-05-15T21:15:46+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14482#p14482</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14482#p14482"/>
		<title type="html"><![CDATA[Re: Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14482#p14482"><![CDATA[
maxi<br /><br />This is good advice.  I have the zener diodes.  I have tried getting a USB interface working multiple times using the zener diode circuit.  I can switch back.   I am using a pair of NTE134A Zener's.  Are there any special requirements for the zeners?<br /><br />I have a sampling HP o-scope/logic analyzer coming from a friend on Sunday.  Maybe that will give me insight....<br /><br />Thanks<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3887">gator456</a> — Sat May 15, 2010 9:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maxi]]></name></author>
		<updated>2010-05-15T15:39:37+02:00</updated>

		<published>2010-05-15T15:39:37+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14479#p14479</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14479#p14479"/>
		<title type="html"><![CDATA[Re: Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14479#p14479"><![CDATA[
<blockquote><div><cite>gator456 wrote:</cite>My circuit is as shown in the with-series-diodes.png from the circuits directory (except mine is a atmega644)<br />The AVR is driven by a 12mhz crystal</div></blockquote><br />According to the datasheet ATmega644 is not rated for 12Mhz operation at &lt; 4.5V. Series diodes will drop the voltage to around 3.5V<br /><blockquote class="uncited"><div>Speed Grades<br />– ATmega644V: 0 - 4MHz @ 1.8 - 5.5V, 0 - 10MHz @ 2.7 - 5.5V<br />– ATmega644: 0 - 10MHz @ 2.7 - 5.5V, 0 - 20MHz @ 4.5 - 5.5V</div></blockquote><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2570">maxi</a> — Sat May 15, 2010 3:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gator456]]></name></author>
		<updated>2010-05-15T05:46:13+02:00</updated>

		<published>2010-05-15T05:46:13+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14476#p14476</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14476#p14476"/>
		<title type="html"><![CDATA[Re: Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14476#p14476"><![CDATA[
Maxi<br /><br />Thanks for responding.  I am pulling my hair out trying to get this to work.  I was a bit scatterbrained when I did the post and I now see that I left out all the details<br /><br />I am using a ATmega644 20PU<br />Programmer AVRisp MKII <br />I am implementing the hid-mouse example<br />My circuit is as shown in the with-series-diodes.png from the circuits directory (except mine is a atmega644)<br />The AVR is driven by a 12mhz crystal<br />My code is exactly as in the hid-mouse example except:<br />#define USB_CFG_CLOCK_KHZ       12000  // In usbconfig.h<br />#define F_CPU 12000000    // first line in main.c<br />My fuse settings are:<br />    Extended 0xFF<br />    High        0xD9<br />    Low         0xEE<br />These equate to: brown-out off, SPIEN=on, ext crystal 8mhz startup 1k CK + 0ms, boot flash=4096 words , addr $7000 and everything else off<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3887">gator456</a> — Sat May 15, 2010 5:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maxi]]></name></author>
		<updated>2010-05-13T22:40:21+02:00</updated>

		<published>2010-05-13T22:40:21+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14458#p14458</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14458#p14458"/>
		<title type="html"><![CDATA[Re: Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14458#p14458"><![CDATA[
EDIT:<br /><br />Sorry, I replied to the wrong post though most of what I mentioned in your other thread applies here too.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2570">maxi</a> — Thu May 13, 2010 10:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gator456]]></name></author>
		<updated>2010-05-13T06:33:36+02:00</updated>

		<published>2010-05-13T06:33:36+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14450#p14450</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14450#p14450"/>
		<title type="html"><![CDATA[Need help with HID-mouse example]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4274&amp;p=14450#p14450"><![CDATA[
I cannot seem to get this most basic example working.<br /><br />I have implemented the USB using the with-zener.png example.  I compiled the example using AVRstudio and AVRISPMkII.  I am using an ATmega644 20PU with a 12mhz crystal.  THe code compiles just fine and the hex file programs into the AVR.  THe checksum comes back clean.  When I plug the device into the USB port Windows says that it is an unrecognized device.<br /><br />I have also written some &quot;flashing LED&quot; programs and they work just fine.<br /><br />I have also tried the powerswitch example without any luck.<br /><br />What am I doing wrong.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3887">gator456</a> — Thu May 13, 2010 6:33 am</p><hr />
]]></content>
	</entry>
	</feed>
