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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-02-28T23:01:10+02:00</updated>

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

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-02-28T23:01:10+02:00</updated>

		<published>2008-02-28T23:01:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1248&amp;p=4415#p4415</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1248&amp;p=4415#p4415"/>
		<title type="html"><![CDATA[Interupt]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1248&amp;p=4415#p4415"><![CDATA[
Regarding how to enable/disable interrupts: You have to set the interrupt-enable bit for your interrupt in the appropriate register. That's similar to the code in usbInit().<br /><br />The interrupt handler should not be declared with ISR if you use AVR-USB since it must allow other interrupts. Use UTIL_INTERRUPT instead where UTIL_INTERRUPT is declared as<br /><br /><div class="codebox"><p>Code: </p><pre><code>#define UTIL_INTERRUPT&#40;signame&#41;                         \<br />    void signame &#40;void&#41; __attribute__ &#40;&#40;interrupt&#41;&#41;;    \<br />    void signame &#40;void&#41;<br /></code></pre></div><br /><br />There's currently no tutorial, only examples, see our reference implementations.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Feb 28, 2008 11:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-02-27T11:34:25+02:00</updated>

		<published>2008-02-27T11:34:25+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1248&amp;p=4388#p4388</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1248&amp;p=4388#p4388"/>
		<title type="html"><![CDATA[Interupt]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1248&amp;p=4388#p4388"><![CDATA[
Hi,<br /><br />I want to use the Interupt1 to measure a fequency.<br />If there is a falling edge the timer has to start. At a rising edge the timer should stop.<br /><br />So my question is how to initialize the interupt. In the usbInit() the Interup0 is initialized. <br />But my interupt should only be acitve if it will be used. So I want to activate and disable it on some points in the programm.<br /><br />My other question is, how and where I have to write the ISR?<br />Can I write it like this:<br /><div class="codebox"><p>Code: </p><pre><code>ISR&#40;INT1_vect&#41;<br />   &#123;      <br />      int_help++;<br />   &#125;</code></pre></div><br /><br />I hope you can help me.<br /><br />One last question I have:<br />Is there anywhere a tutorial or a documentation how AVR-USB is used?<br /><br />Peter<p>Statistics: Posted by Guest — Wed Feb 27, 2008 11:34 am</p><hr />
]]></content>
	</entry>
	</feed>
