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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2007-08-18T09:24:50+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2007-08-18T09:24:50+02:00</updated>

		<published>2007-08-18T09:24:50+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2098#p2098</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2098#p2098"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2098#p2098"><![CDATA[
Fortunately our uni project doesn't require a large number of pins so we can avoid touching PB0-1 altogether. Being of electrical background myself I thought it easier to change the port rather then find out how to disable debugging from the hidkeys code (well assuming that is even what was causing the issues).  <img class="smilies" src="./../../../images/smilies/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" />  At least we did get it working, thanks for the support.<p>Statistics: Posted by Guest — Sat Aug 18, 2007 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-08-17T10:56:23+02:00</updated>

		<published>2007-08-17T10:56:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2092#p2092</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2092#p2092"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2092#p2092"><![CDATA[
I've completely overlooked that... PD1 is not a good choice if you compile with debugging enabled or if you otherwise enable the UART transmitter.<br /><br />If you can ensure that the UART transmitter is off, the driver should work with PD1.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Fri Aug 17, 2007 10:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2007-08-17T09:25:51+02:00</updated>

		<published>2007-08-17T09:25:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2091#p2091</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2091#p2091"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2091#p2091"><![CDATA[
uah I don't have an account so I can't edit, but that is supposed to say PD1 to PD5<p>Statistics: Posted by Guest — Fri Aug 17, 2007 9:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2007-08-17T09:24:10+02:00</updated>

		<published>2007-08-17T09:24:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2090#p2090</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2090#p2090"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2090#p2090"><![CDATA[
We have resolved the problem. I am not entirely sure why, an educated guess would be that the USART was interfering with the D- pin, but after moving D- from PB1 to PB5 and making changes to usbconfig.h accordingly it appears to be working.<br /><br />Thanks for your help and patience.<p>Statistics: Posted by Guest — Fri Aug 17, 2007 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2007-08-17T06:41:10+02:00</updated>

		<published>2007-08-17T06:41:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2089#p2089</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2089#p2089"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2089#p2089"><![CDATA[
Hi Christian thanks for your help. I've taken over for the weekend from Stephan and I'll start by a complete rebuild of the original circuit. I will let you know how this progresses and if I can find the error.<p>Statistics: Posted by Guest — Fri Aug 17, 2007 6:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-08-16T10:56:53+02:00</updated>

		<published>2007-08-16T10:56:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2072#p2072</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2072#p2072"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2072#p2072"><![CDATA[
Sorry, but then I'm out of ideas...<br /><br />Since the firmware has been tested very well, I would suspect that there is something wrong in the circuit...<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Aug 16, 2007 10:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Stephan]]></name></author>
		<updated>2007-08-15T23:21:44+02:00</updated>

		<published>2007-08-15T23:21:44+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2071#p2071</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2071#p2071"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2071#p2071"><![CDATA[
Yes we changed the Makefile to compile for the Mega88 and we use PD1 and PD2 for USB and set DDRD to 0x00. All the code I used is in the original post. I can't provide a debug log.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=372">Stephan</a> — Wed Aug 15, 2007 11:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-08-15T20:34:08+02:00</updated>

		<published>2007-08-15T20:34:08+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2069#p2069</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2069#p2069"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2069#p2069"><![CDATA[
The test program does not use the timer: You never clear TOV0 in TIFR0 by writing 1 to it. The loop therefore runs at maximum speed. Otherwise it should output something like 22.888 Hz.<br /><br />Having 12 MHz on CLKO should prove that the clock is correct, though.<br /><br />Then we have the remaining questions: Have you initialized the USB pins as inputs? Have you changed the Makefile to compile for the Mega88 instead of Mega8 (the two are not binary compatible). And finally: Can you provide a debug log?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Wed Aug 15, 2007 8:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Stephan]]></name></author>
		<updated>2007-08-15T15:52:37+02:00</updated>

		<published>2007-08-15T15:52:37+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2066#p2066</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2066#p2066"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2066#p2066"><![CDATA[
I used this test program and measured a frequency of 666KHz. <br /><br />#include &lt;avr/io.h&gt;<br />#include &lt;avr/wdt.h&gt;<br /><br /><br />static void initHardware(void)<br />{<br />    DDRD |= (1 &lt;&lt; DDD5);<br />    PORTD &amp;= ~(1 &lt;&lt; PD5);<br /><br />    TCCR0B = 5; /* Set timer to scale at 1024 eg 12MHz/1024/ 256 for<br />                   overflow */<br />}<br /><br />int main(void)<br />{<br />    wdt_enable(WDTO_2S);<br />    initHardware();<br />    for(;;){    /* main event loop */<br />        wdt_reset();<br />        if(TIFR0 &amp; (1 &lt;&lt; TOV0)){ /* Check for overflow */<br />            PORTD ^= (1 &lt;&lt; PD5); /* Toggle pin */<br />        }<br />    }<br />    return 0;<br />}<br /><br />/* ------------------------------------------------------------------------- */<br /><br /><br />I also changed the lfuse to 0x9F to output the clock rate on PB0 and measured 12MHz.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=372">Stephan</a> — Wed Aug 15, 2007 3:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-08-13T14:28:50+02:00</updated>

		<published>2007-08-13T14:28:50+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=669&amp;p=2053#p2053</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2053#p2053"/>
		<title type="html"><![CDATA[Problems with ATMega88]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=669&amp;p=2053#p2053"><![CDATA[
Can you make a simple test program which outputs a given frequency on a port pin and measure the frequency to make sure the clock rate is OK?<br /><br />And are you sure you have initialized D+ and D- as input pins?<br /><br />And, finally, if you enable debug level 2, can you capure the serial output?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Aug 13, 2007 2:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
