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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2012-05-12T05:28:36+02:00</updated>

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

		<entry>
		<author><name><![CDATA[honupata]]></name></author>
		<updated>2012-05-12T05:17:04+02:00</updated>

		<published>2012-05-12T05:17:04+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6048&amp;p=21579#p21579</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6048&amp;p=21579#p21579"/>
		<title type="html"><![CDATA[Re: V-USB(20100715) with Arduino - HID Data]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6048&amp;p=21579#p21579"><![CDATA[
FYI,<br /><br />Here is how I did it:<br /><br />char buffer[128];<br /><br />uchar usbFunctionRead(uchar *data, uchar len)<br />{<br />    if(len &gt; bytesRemaining)                // len is max chunk size<br />        len = bytesRemaining;               // send an incomplete chunk<br />    bytesRemaining -= len;<br />uchar i;<br />    for(i = 0; i &lt; len; i++)<br />        data[i] = buffer[currentAddress++]; // copy the data to the buffer<br />    return len;                             // return real chunk size<br />}<br /><br />/* usbFunctionWrite() is called when the host sends a chunk of data to the<br /> * device. For more information see the documentation in usbdrv/usbdrv.h.<br /> */<br />uchar usbFunctionWrite(uchar *data, uchar len)<br />{<br />uchar i;<br />for(i=0;i&lt;len;i++)  <br />buffer[currentAddress+i]=*(data+i);  <br />currentAddress += len;<br />bytesRemaining -= len;<br />return bytesRemaining == 0; /* return 1 if this was the last chunk */  <br />}<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5786">honupata</a> — Sat May 12, 2012 5:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daid]]></name></author>
		<updated>2011-09-26T10:04:55+02:00</updated>

		<published>2011-09-26T10:04:55+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6048&amp;p=19709#p19709</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6048&amp;p=19709#p19709"/>
		<title type="html"><![CDATA[Re: V-USB(20100715) with Arduino - HID Data]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6048&amp;p=19709#p19709"><![CDATA[
Take a look at how the arduino serial driver does it, it also keeps a buffer for data, you could do the same thing. And this is more a general C/Arduino question so the avr-freaks forums might serve you better.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5154">Daid</a> — Mon Sep 26, 2011 10:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honupata]]></name></author>
		<updated>2012-05-12T05:28:36+02:00 </updated>

		<published>2011-09-24T02:06:13+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6048&amp;p=19694#p19694</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6048&amp;p=19694#p19694"/>
		<title type="html"><![CDATA[HID Data Transfert without eeprom_write_block/eeprom_read_bl]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6048&amp;p=19694#p19694"><![CDATA[
Hi,<br /><br />I just update vusb-for-arduino (<!-- m --><a class="postlink" href="http://code.google.com/p/vusb-for-arduino/">http://code.google.com/p/vusb-for-arduino/</a><!-- m --><br />) with the latest version of V-USB(20100715) (only the HID Data part).<br />The vusb-for-arduino example sketch works fine with the C command line hidtool.exe provided as example (see attachment <!-- m --><a class="postlink" href="http://arduino.cc/forum/index.php/topic,73229.msg549623.html#msg549623">http://arduino.cc/forum/index.php/topic ... #msg549623</a><!-- m -->)  <img class="smilies" src="./../../../images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /> <br /><br />My goal is to do a gmail notifier <!-- m --><a class="postlink" href="http://www.justblair.co.uk/the-attiny45-usb-led-e-mail-twitter-and-pidgin-notifier.html">http://www.justblair.co.uk/the-attiny45 ... ifier.html</a><!-- m --> but with a Atmega328 a the Arduino IDE<br /><br />Here is where I need help:<br />The comunication between the firmware hid-data\main.c  and the Arduino is done by implementing a data store of 128 bytes in EEPROM (eeprom_write_block/eeprom_read_block). I really want to avoid using the EEPROM (it is slow and the lifespan is limited at 100000 writes).<br /><br />I don’t know enought C to implement a differrent way to transfer the data between the VUSB\hid-data\main.c and the Arduino (Can an array in the RAM passed between the hid-data\main.c and Arduino do the job) ?<br /><br />Thank you for your help.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5786">honupata</a> — Sat Sep 24, 2011 2:06 am</p><hr />
]]></content>
	</entry>
	</feed>
