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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-04-17T15:19:08+02:00</updated>

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

		<entry>
		<author><name><![CDATA[hker]]></name></author>
		<updated>2011-04-17T15:19:08+02:00</updated>

		<published>2011-04-17T15:19:08+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5614&amp;p=18224#p18224</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5614&amp;p=18224#p18224"/>
		<title type="html"><![CDATA[2 beginner's question]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5614&amp;p=18224#p18224"><![CDATA[
I started to read source code of V-USB since yesterday so I don't know much<br />I'm familiar with 8051(AT89S52) but I'm new to attinny/mega<br />I've no idea reading the wiki so I just try to study the source code.<br /><br />I'm going to make a IR emitter project, I use the chip for the signal, not carrier(done by other chips)<br /><br />In the power switch project,<br />I'm trying to give a specific pulse when a turning LED on signal is recieved<br />I traced the function in main.c(not changed)<br />static void outputByte(uchar b)<br />{<br />    PORTB = (PORTB &amp; ~0xfc) | (b &amp; 0xfc);<br />    PORTD = (PORTD &amp; ~0x30) | ((b &lt;&lt; 4) &amp; 0x30);<br />}<br />Can I add lines of pulse in this section?<br />I am trying to use _delayms() function with a for loop to give out the pulse and return to the main program.<br />If I increase the time of this function, will there be problem on USB communication?<br />If I can't, how can I estimate the time per cycle?<br />I just know that #define USB_CFG_INTR_POLL_INTERVAL      10mill<br />but the pulse must be in microsecond<br /><br />I'm going to migrate this project into attiny45 because number of ports is enough and i need many of it for saving cost<br />These are the parts that I found should be changed(not changed):<br />usbconfig.h:<br />#define USB_CFG_IOPORTNAME      B<br />#define USB_CFG_DMINUS_BIT      0<br />#define USB_CFG_DPLUS_BIT       1<br />main.c:<br />&quot;all port and DDR&quot;<br /><br />For makefile<br />I'll use mfile of WinAVR<br />The options are as follows :<br /><img src="http://tid.uio.no/~geirfrs/FYS3240/Oblig2/Bilder/MFile%20%5BWinAVR%5D.jpg" class="postimage" alt="Image" /><br /><br />Is it correct to only set the code generation part appropriately and save it? Any extra settings?<br />Is the above settings enough?<br /><br />size optimation maybe needed for the added pulse<br />who of the following measures can i take?<br /><!-- l --><a class="postlink-local" href="http://forums.obdev.at/viewtopic.php?f=8&amp;t=5587">viewtopic.php?f=8&amp;t=5587</a><!-- l --><br /><br />*I'm going to try the above things using pronyprog tomorrow<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5149">hker</a> — Sun Apr 17, 2011 3:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
