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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-07-23T05:39:23+02:00</updated>

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

		<entry>
		<author><name><![CDATA[apollononnno]]></name></author>
		<updated>2008-07-23T05:39:23+02:00</updated>

		<published>2008-07-23T05:39:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=5829#p5829</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=5829#p5829"/>
		<title type="html"><![CDATA[Re: problem solved]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=5829#p5829"><![CDATA[
I am use &quot;Atmega168p&quot;, and consecutive port &quot;2*8BIT&quot; 4pin of PC2 except RESET, PC0, <br />and PC1, PC3, PC4, and PC5 will be effectively used. <br />I want to change &quot;Terminal USB&quot; from standard &quot;D+PD4,D-PD2&quot; to &quot;D+PC0,D-PC1&quot;. <br />I changed as follows. <br />To apply the name etc. of the function , for instance, &quot;USB_INTR_ENABLE&quot; more, I <br />want to learn in detail. <br />Is it correct which to be selected? &quot;usbconfig.h&quot; &quot;usbdrv.h&quot; &quot;usbconfig-prototype.h&quot; &quot;bootloaderconfig.h&quot;<br />I<br />I wrote made &quot;.hex&quot; in atmega168p. <br />However, it was not able not to operate at all, and to confirm the content as a <br />programmer. <br />I. If another problem is not solved more, the pin change of USB cannot be confirmed. <br /><br />I did not find the item which fell under &quot;1&quot;.<br />I validated &quot;2&quot; and got a result of compiling it.<br />However, I was not &quot;three&quot; negative results in that, but watched a slightly bad part.<br />Do not I need to pay attention to this item?<br /><br />/* &quot;usbconfig-prototype.h&quot; &quot;bootloaderconfig.h&quot; */<br />/* Atmega168p */<br />/* ----------------------- Optional Hardware Config ------------------------ */<br />#define USB_CFG_IOPORTNAME      C<br />#define USB_CFG_DMINUS_BIT      1<br />#define USB_CFG_DPLUS_BIT       0<br />/* ----------------------- Optional Hardware Config ------------------------ */<br />/* #define USB_CFG_PULLUP_IOPORTNAME   C */<br />/* #define USB_CFG_PULLUP_BIT          1 */<br /><br />/* usbconfig.h */<br />1<br />/* #define USB_INTR_CFG MCUCR / IVSEL? IVCE? */<br />/* #define USB_INTR_CFG_SET ((1 &lt;&lt; ISC00) | (1 &lt;&lt; ISC01)) / EICRA?INT0 */<br />2<br />#define USB_INTR_CFG_CLR 0<br />#define USB_INTR_ENABLE PCMSK1<br />#define USB_INTR_ENABLE_BIT PCINT8<br />#define USB_INTR_PENDING PCIFR<br />#define USB_INTR_PENDING_BIT PCIF1<br />3<br />usbdrv/usbdrv.h:198: warning: 'usbFunctionDescriptor' used but never defined<br />4<br />avr-objcopy -j .text -j .data -O ihex main.bin main.hex<br />avr-size main.hex<br />text data bss dec hex filename<br />0 2520 0 2520 9d8 main.hex<br />Build succeeded with 1 Warnings...<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1231">apollononnno</a> — Wed Jul 23, 2008 5:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-02-06T16:34:54+02:00</updated>

		<published>2008-02-06T16:34:54+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4149#p4149</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4149#p4149"/>
		<title type="html"><![CDATA[problem solved]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4149#p4149"><![CDATA[
Hi all,<br /><br />thanks to christian's remarks i found out the solution.<br /><br />in the file usbconfig-prototype. h there is the following define :<br /><br />#define USB_INTR_VECTOR         SIG_INTERRUPT0<br /><br /><br />this define must be change to :<br /><br />#define USB_INTR_VECTOR         SIG_PIN_CHANGE<br /><br />in order to be able to use PCINT interrupts.<br /><br />now it works.<br /><br />many thanks.<p>Statistics: Posted by Guest — Wed Feb 06, 2008 4:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-02-05T20:06:09+02:00</updated>

		<published>2008-02-05T20:06:09+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4136#p4136</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4136#p4136"/>
		<title type="html"><![CDATA[problems with using external interrupt different from INT0]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4136#p4136"><![CDATA[
Can you please mail me the entire project to the avrusb8 at obdev dot at address? I'd like to have a look at the disassembled binary.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Tue Feb 05, 2008 8:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-02-05T19:41:22+02:00</updated>

		<published>2008-02-05T19:41:22+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4135#p4135</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4135#p4135"/>
		<title type="html"><![CDATA[different INT doesn't work yet on tiny45]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=4135#p4135"><![CDATA[
Hi all,<br /><br />I am having same kind of issue on a tiny45 where i am trying to get the usb working on a different interrupt level.<br /><br />I started from the easylogger demo as such, in order not to use external crystal. this works succesfully.<br />Then i moved the USB line to PINB3 and PINB4, with a cable to INT0.<br />This version also works.<br /><br />Then i configure the usbconfig.h file in order to use the interrupt on PCINT3.<br />But this version doesn't work yet.<br /><br />code example : <br /><br />#define USB_CFG_DMINUS_BIT      4<br />#define USB_CFG_DPLUS_BIT       3<br /><br /> #define USB_INTR_CFG            PCMSK<br /> #define USB_INTR_CFG_SET        (1 &lt;&lt; PCINT3)<br />/* #define USB_INTR_CFG_CLR        0 */<br />/* #define USB_INTR_ENABLE         GIMSK */<br /> #define USB_INTR_ENABLE_BIT     PCIE<br />/* #define USB_INTR_PENDING        GIFR */<br /> #define USB_INTR_PENDING_BIT    PCIF<br /><br />For the time being I don't know yet how to debug. maybe you have some hints in order to progress.<br /><br />Also i am not using any other interrupts. My main application is doing nothing except initalising usb and setting interrupts, it is based on the easyloger demo.<br /><br /><br />int main(void)<br />{<br />uchar    i;<br /><br />    uchar calibrationValue = eeprom_read_byte(0);<br />    if(calibrationValue != 0xff){<br />        OSCCAL = calibrationValue;  /* a calibration value is supplied */<br />    }else{<br />        /* we have no calibration value, assume 8 MHz calibration and adjust from there */<br />        if(OSCCAL &lt; 125){<br />            OSCCAL += 3;    /* should be 3.5 */<br />        }else if(OSCCAL &gt;= 128){<br />            OSCCAL += 7;    /* should be 7 */<br />        }else{  /* must be between 125 and 128 */<br />            OSCCAL = 127;   /* maximum possible avoiding discontinuity */<br />        }<br />    }<br />    <br />    DDRB = (1 &lt;&lt; USB_CFG_DMINUS_BIT) | (1 &lt;&lt; USB_CFG_DPLUS_BIT);<br />    PORTB = 0;          /* indicate USB disconnect to host */<br />    for(i=0;i&lt;20;i++){  /* 300 ms disconnect, also allows our oscillator to stabilize */<br />        _delay_ms(15);<br />    }<br />    DDRB = 1 &lt;&lt; BIT_LED;    /* output for LED is pinB1*/<br />    <br />    usbInit();<br />    sei();<br />    for(;;){    /* main event loop */<br />       <br />        usbPoll();<br />        if(usbInterruptIsReady() &amp;&amp; nextDigit != NULL){ /* we can send another key */<br />            buildReport();<br />            usbSetInterrupt(reportBuffer, sizeof(reportBuffer));<br />            if(*++nextDigit == 0xff)    /* this was terminator character */<br />                nextDigit = NULL;<br />        }<br />               <br />    }<br />    return 0;<br />}<br /><br />if you see something.<br /><br />regards<p>Statistics: Posted by Guest — Tue Feb 05, 2008 7:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MaxAnarki]]></name></author>
		<updated>2008-01-25T17:43:04+02:00</updated>

		<published>2008-01-25T17:43:04+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3975#p3975</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3975#p3975"/>
		<title type="html"><![CDATA[problems with using external interrupt different from INT0]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3975#p3975"><![CDATA[
Ok, admin, please delete this topic..<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=677">MaxAnarki</a> — Fri Jan 25, 2008 5:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-01-11T18:38:27+02:00</updated>

		<published>2008-01-11T18:38:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3863#p3863</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3863#p3863"/>
		<title type="html"><![CDATA[problems with using external interrupt different from INT0]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3863#p3863"><![CDATA[
The main() code looks OK since you use the constants from usbconfig.h. USB RESET is the condition while in the delay loop. BTW: I would recommend to increase the RESET time to 500 ms. That's not related to the interrupt problem, though.<br /><br />I'm afraid I'm out of ideas here, other than the general hints I already gave. Sorry...<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Fri Jan 11, 2008 6:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-01-11T17:28:49+02:00</updated>

		<published>2008-01-11T17:28:49+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3860#p3860</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3860#p3860"/>
		<title type="html"><![CDATA[problems with using external interrupt different from INT0]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3860#p3860"><![CDATA[
But the configuration of that pins is made by the following part of the driver:<br /><br />intmain(void) <br />{<br />//cli();<br /><br />dev_init(); // all pins as output<br /><br />/* clear usb ports */<br />USB_CFG_IOPORT &amp;= (uchar)~((1&lt;&lt;USB_CFG_DMINUS_BIT)|(1&lt;&lt;USB_CFG_DPLUS_BIT));<br /><br />/* make usb data lines outputs */<br />USBDDR    |= ((1&lt;&lt;USB_CFG_DMINUS_BIT)|(1&lt;&lt;USB_CFG_DPLUS_BIT));<br /><br />/* USB Reset by device only required on Watchdog Reset */<br />_delay_loop_2(40000);   // 10ms<br /><br />/* make usb data lines inputs */<br />USBDDR &amp;= ~((1&lt;&lt;USB_CFG_DMINUS_BIT)|(1&lt;&lt;USB_CFG_DPLUS_BIT));<br /><br /><br />usbInit();<br /><br />/* Reset WDT<br />//__watchdog_reset();<br />wdt_reset();<br />// Write logical one to WDCE and WDE <br />WDTCR |= (1&lt;&lt;WDCE) | (1&lt;&lt;WDE);<br />// Turn off WDT <br />WDTCR = 0x00;<br />*/<br /><br /><br />sei();<br /><br />/* configure timer 0 for a rate of 12M/(1024 * 256) = 45.78 Hz (~22ms) */<br />//TCCR0 = 5;<br /><br />//wdt_enable(WDTO_1S);<br />......<br /><br /><br />And what did u mean about &quot;USB RESET&quot; ? I dont understand that.<p>Statistics: Posted by Guest — Fri Jan 11, 2008 5:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-01-11T17:08:16+02:00</updated>

		<published>2008-01-11T17:08:16+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3859#p3859</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3859#p3859"/>
		<title type="html"><![CDATA[problems with using external interrupt different from INT0]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3859#p3859"><![CDATA[
You mentioned that you updated usbconfig.h. That's all there is to change for the driver itself.<br /><br />But did you also update the hardware initialization in main()? Note that the USB pins must be configured as inputs without pull-up resistor. If you do a USB RESET in main, you must also update this code.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Fri Jan 11, 2008 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-01-11T12:47:19+02:00</updated>

		<published>2008-01-11T12:47:19+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3854#p3854</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3854#p3854"/>
		<title type="html"><![CDATA[problems with using external interrupt different from INT0]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3854#p3854"><![CDATA[
To: Christian<br /><br />Thank you for example. I have tried again to resolve the problem. I tried to solder USB wires to INT1(DPLUS), INT2(DMINUS), tried amount of different combinations of:<br /><br />#define USB_INTR_CFGMCUCSR // EICRB<br />#define USB_INTR_CFG_SET        ((1 &lt;&lt; ISC11) | (1 &lt;&lt; ISC10))<br />//#define USB_INTR_CFG_CLR0<br />//#define USB_INTR_ENABLEEIMSK //GIMSK<br />#define USB_INTR_ENABLE_BITINT1<br />//#define USB_INTR_PENDING        EIFR<br />#define USB_INTR_PENDING_BIT    INTF1<br />#define USB_INTR_VECTOR         SIG_INTERRUPT1<br /><br />and<br /><br />#define USB_CFG_IOPORTNAME      D<br />#define USB_CFG_DMINUS_BIT      2<br />#define USB_CFG_DPLUS_BIT       1<br /><br />but with no success.<br /><br />Remember, my schematic has only one connector - USB which works perfectly on many computers and notebooks using INT0.<p>Statistics: Posted by Guest — Fri Jan 11, 2008 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MaxAnarki]]></name></author>
		<updated>2008-01-11T12:00:26+02:00</updated>

		<published>2008-01-11T12:00:26+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3853#p3853</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3853#p3853"/>
		<title type="html"><![CDATA[problems with using external interrupt different from INT0]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1067&amp;p=3853#p3853"><![CDATA[
to VOBS<br /><br />Dear sir I asked answer from the authors of this driver and I do not need you to learn my code. I didnt post my code here.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=677">MaxAnarki</a> — Fri Jan 11, 2008 12:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
