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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-03-22T23:59:03+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-03-22T23:59:03+02:00</updated>

		<published>2010-03-22T23:59:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4038&amp;p=13811#p13811</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4038&amp;p=13811#p13811"/>
		<title type="html"><![CDATA[Using Pin Change Interrupt]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4038&amp;p=13811#p13811"><![CDATA[
Just a note on configuring V-USB for use with a pin change interrupt (PCINTx).<br /><br />To use, for example, PCINT16 on an ATmega168, the following configuration needs to be set in <em class="text-italics">usbconfig.h</em>:<br /><br />near the top:<br /><div class="codebox"><p>Code: </p><pre><code>#define USB_CFG_DPLUS_BIT       0 // PD0 is PCINT16</code></pre></div><br /><br />at the end:<br /><div class="codebox"><p>Code: </p><pre><code>#define USB_INTR_CFG            PCMSK2<br />#define USB_INTR_CFG_SET        (1 &lt;&lt; PCINT16)<br />#define USB_INTR_CFG_CLR        0 <br />#define USB_INTR_ENABLE         PCICR<br />#define USB_INTR_ENABLE_BIT     PCIE2<br />#define USB_INTR_PENDING        PCIFR<br />#define USB_INTR_PENDING_BIT    PCIF2<br />#define USB_INTR_VECTOR         SIG_PIN_CHANGE2<br /></code></pre></div><br /><br />Cheers,<br /> Chris<p>Statistics: Posted by Guest — Mon Mar 22, 2010 11:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
