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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-09-10T10:12:26+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-09-10T10:12:26+02:00</updated>

		<published>2011-09-10T10:12:26+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5724&amp;p=19563#p19563</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=19563#p19563"/>
		<title type="html"><![CDATA[Re: using different pins]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=19563#p19563"><![CDATA[
Hi,<br /><blockquote><div><cite>Guest wrote:</cite>I am using an ATTINY85 and wish to use PINB3 and PINB4 for USB in order free up PINB 0-2 fpr SPI communication.</div></blockquote><br />Pls. note that Pin B2 is also the Int0 input pin. V-USB seems to use this interrupt. So if you connect the USB D+ data line to another pin, you have to figure out which interrupt can be used by v-usb. In your case you connect D+ to B3 and therefore you must enable PCINT3 and provide v-usb with the corresponding irpt vector number. But this is clearly described in usbconfig.h -- pls. read the comments!<br /><br />Here are the relevant entries for usbconfig.h:<br /><br /><div class="codebox"><p>Code: </p><pre><code>#define USB_CFG_IOPORTNAME      B<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 />#define USB_INTR_VECTOR         PCINT0_vect  <br /></code></pre></div><br /><br />Note that you should avoid using interrupts of a higher priority than PCINT0. <br /><br /><br />Cheerieo,<br />Volker.<p>Statistics: Posted by Guest — Sat Sep 10, 2011 10:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Tim_BandTech.Com]]></name></author>
		<updated>2011-09-08T21:58:29+02:00</updated>

		<published>2011-09-08T21:58:29+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5724&amp;p=19549#p19549</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=19549#p19549"/>
		<title type="html"><![CDATA[Getting SPI going with v-usb on the tiny85]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=19549#p19549"><![CDATA[
I'm interested in doing this too, but I haven't tried it yet.<br />I've only just gotten the EasyLogger going.<br />I'm not sure that there will be room in the timing to run the SPI port while performing the USB functionality.<br />Still, maybe with some error correcting software it is possible.<br />To me, this could become an stdio type of buffered interface for debugging for another avr chip.<br />Just enough pins to do the job...<br />This is also the configuration for a programmer, so I would research programmers for the tinyx5 chips also.<br /><br />Sorry to see so few responses here. I think the problem is that the applications are so divergent that there may be good people who could respond, but your problem is not up their alley. If this SPI / v-usb integrated system works, then it will be the minimal parts/pin count system for that functionality. So maybe we can cajole someone into consideration of this configuration. Then again, maybe we are overlooking something really obvious... <br /><br /> - Tim<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5633">Tim_BandTech.Com</a> — Thu Sep 08, 2011 9:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-05-30T16:46:36+02:00</updated>

		<published>2011-05-30T16:46:36+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5724&amp;p=18628#p18628</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=18628#p18628"/>
		<title type="html"><![CDATA[Re: using different pins]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=18628#p18628"><![CDATA[
Maybe I should add that I removed the a/d initialisation and polling function from the code.<p>Statistics: Posted by Guest — Mon May 30, 2011 4:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-05-30T16:21:43+02:00</updated>

		<published>2011-05-30T16:21:43+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5724&amp;p=18627#p18627</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=18627#p18627"/>
		<title type="html"><![CDATA[using different pins]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5724&amp;p=18627#p18627"><![CDATA[
Hello<br /><br />I know this has been discussed before, but the corresponding thread (<a href="http://forums.obdev.at/viewtopic.php?f=8&amp;t=1067&amp;start=15" class="postlink">http://forums.obdev.at/viewtopic.php?f=8&amp;t=1067&amp;start=15</a>) is more than 3 years old and some things/terms have changed since, so I'm starting a new one.<br /><br />I am using an ATTINY85 and wish to use PINB3 and PINB4 for USB in order free up PINB 0-2 fpr SPI communication.<br /><br />Circuit and software are based one the easylogger example and work fine as long as PINB0 and 2 are used for USB. As a first step, I connected D- to PINB4 and D+ toPINB3 and put a wire between PINB0 and PINB4. In usbconfig.h, I changed  USB_CFG_DMINUS_BIT to 4 and USB_CFG_DPLUS_BIT to 3. However, this setup already fails, attached to a PC, the device is not recognised. When I solder back D+ and D- to PINB2 and PINB0 and undo the config changes, it appears as a keyboard again. I also tried with PINB0 connected to D-, as suggested in config.h (allthough it should work with D-, too) but no luck.<br /><br />Is there anything else to take care of? According to the documentation, just changing the USB_CFG_DMINUS / -PLUS setting should work as long as long as one of the wires is connected to INT0. But it doesn't. I measured the connections, double-checked the whole circuit, soldered back the wires to PINB0 / PINB2 a few times - I think the circuit is OK. I also initialised DDRB and PORTB to 0 in main().<br /><br />Thank you in advance.<p>Statistics: Posted by Guest — Mon May 30, 2011 4:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
