<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: A few API questions</title>
		<link>http://forums.leaflabs.com/topic.php?id=640</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:15:01 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=640" rel="self" type="application/rss+xml" />

		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3743</link>
			<pubDate>Fri, 25 Feb 2011 20:28:57 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3743@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Great; merged.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3742</link>
			<pubDate>Fri, 25 Feb 2011 16:23:14 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">3742@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Great !&#60;br /&#62;
Works fine for me... Thanks :-)&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3740</link>
			<pubDate>Fri, 25 Feb 2011 13:28:55 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3740@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Xavier,&#60;/p&#62;
&#60;p&#62;I've made a branch (liquidcrystal-speed) which should take 32 usec off of LiquidCrystal::pulseEnable().&#60;/p&#62;
&#60;p&#62;Can you/will someone try it out and report back so I can merge it into master?  Thanks!&#60;/p&#62;
&#60;p&#62;Just in case:&#60;br /&#62;
$ git pull&#60;br /&#62;
$ git checkout liquidcrystal-speed&#60;br /&#62;
$ ... test it out ...&#60;br /&#62;
$ git checkout master&#60;/p&#62;
&#60;p&#62;edit: typo, 37 usec -&#38;gt; 32 usec
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3728</link>
			<pubDate>Thu, 24 Feb 2011 16:40:44 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">3728@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks for the nice move.&#60;br /&#62;
I saw you wrote :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Enable pulse must be &#38;gt; 450 ns.  Value chosen here is the max&#38;lt;br /&#38;gt;
  // of the following two reports:&#38;lt;br /&#38;gt;
  // &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=640&#38;amp;page=2&#38;#038;lt;br&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=640&#38;amp;page=2&#38;#038;lt;br&#60;/a&#62; /&#38;gt;
  // &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=512&#38;#038;lt;br&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=512&#38;#038;lt;br&#60;/a&#62; /&#38;gt;
  digitalWrite(_enable_pin, HIGH);&#38;lt;br /&#38;gt;
  delayMicroseconds(30);&#38;lt;br /&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;strong&#62;I just want to confirm that it also work for me with the value of the other report.&#60;br /&#62;
  delayMicroseconds(12);&#60;br /&#62;
&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;18 microseconds is kind of a lot at 72Mhz in a real time process ;-)&#60;br /&#62;
18*72 = 1296 cycles !&#60;br /&#62;
It even works with 1 micros at this place... wich is more than twice what the spe csuggest... (450ns)...&#60;br /&#62;
As i'm trying to optimize my code, i'm sensitive to this waste of CPU power...&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3716</link>
			<pubDate>Wed, 23 Feb 2011 21:36:50 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3716@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Xavier,&#60;/p&#62;
&#60;p&#62;Thanks for the report.  Another user had also made a similar suggestion:&#60;br /&#62;
&#60;a href=&#34;http://code.google.com/p/leaflabs/issues/detail?id=42&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/leaflabs/issues/detail?id=42&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;However, I hadn't tested it, and the comments in LiquidCrystal.cpp made me hesitate to include the patch without doing so.  Given two reports that faster timing works, I'll move something like this into master.&#60;/p&#62;
&#60;p&#62;Looking at the source, it's also pretty unclear to my why the calls to pinMode() are where they are, in write4bits() as well as write8bits().&#60;/p&#62;
&#60;p&#62;I've pushed the following commit into master, which incorporates the changes made by you and structuresound:&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/libmaple/commit/7e887c28df28e41c9974b87dd7d10433480e8c6b&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/commit/7e887c28df28e41c9974b87dd7d10433480e8c6b&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks to both of you for the reports!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3691</link>
			<pubDate>Sun, 20 Feb 2011 14:14:42 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">3691@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, &#60;/p&#62;
&#60;p&#62;I don't compile for ARM in eclipse...&#60;br /&#62;
I created a simple project that compile my sources for Linux...&#60;br /&#62;
I launch &#34;make *&#34; from an xterm to compile for ARM.&#60;/p&#62;
&#60;p&#62;Regarding the debugging, since i plugged a 2x20 LCD and use LiquidCrystal, every thing is much easier.&#60;/p&#62;
&#60;p&#62;I noticed that writing to LCD took a huge amount of time that broke my real time process.&#60;br /&#62;
I made 2 modifications in LiquidCrystal.cpp&#60;br /&#62;
I reduced the delay in pulseEnable... don't really tried smaller numbers but those one worked for me... 60 micros instead of 3000 !&#60;/p&#62;
&#60;p&#62;inline void LiquidCrystal::pulseEnable(void) {&#60;br /&#62;
  digitalWrite(_enable_pin, LOW);&#60;br /&#62;
  delayMicroseconds(30);&#60;br /&#62;
  digitalWrite(_enable_pin, HIGH);&#60;br /&#62;
  delayMicroseconds(30);&#60;br /&#62;
  digitalWrite(_enable_pin, LOW);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;And i also moved the pinMode() call from write4bits() to init() function... I'm not sure why that was done every time.&#60;br /&#62;
If that works for everybody, that would be great to have this in the main branch.&#60;/p&#62;
&#60;p&#62;I also could plug rotary encoders with 2 74HC165 shift registers.&#60;br /&#62;
Works fine: 6 rotary encoders and 1 button using 3 maple pins ! (still have 3 free pins on the second 74HC165).&#60;/p&#62;
&#60;p&#62;So much fun with this maple !&#60;br /&#62;
Thanks a lot guys, i'll publish soon what i've wrote.&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3675</link>
			<pubDate>Fri, 18 Feb 2011 17:49:45 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3675@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Xavier,&#60;/p&#62;
&#60;p&#62;The other workaround, of course, is just to close your screen before you try to upload :).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3671</link>
			<pubDate>Fri, 18 Feb 2011 17:12:45 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3671@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi Xavier,&#60;/p&#62;
&#60;p&#62;Yes, it's normal to have to reset your Maple if you have a screen opened to its virtual serial port.  Due to operating system restrictions, at most one process can claim the port at a time.  Thus, the bootloader won't receive the reset signal if you've already got a screen open on it.&#60;/p&#62;
&#60;p&#62;I like to use Serial1 for that reason -- it's the fastest USART on the board, and when hooked up to an FTDI chip, I can leave my screen session running and still reprogram the board.&#60;/p&#62;
&#60;p&#62;Glad to hear that you've been having a good experience so far.  Can you tell us a little bit about how you set up Eclipse?  We've been meaning to provide a tutorial on that for a while, but all of us are old-fashioned emacs or vim users, so we haven't gotten around to figuring it out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3667</link>
			<pubDate>Fri, 18 Feb 2011 16:45:43 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">3667@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I use the last version with the linux chain.&#60;br /&#62;
It works beautifully (but i don't use the new stuffs).&#60;br /&#62;
I write my code in eclipse... to enjoy the refactoring and the &#34;F3/go to declaration&#34;.&#60;br /&#62;
Very nice.&#60;/p&#62;
&#60;p&#62;Is it normal that i have to reset the maple before typing &#34;make install&#34; if i opened a screen to the /dev/ttyACM0 ? Is there a way to avoid that ?&#60;/p&#62;
&#60;p&#62;My FM synth is going ahead rather well.&#60;br /&#62;
. Midi is working (sparkfun midi shield) : &#34;note on / note off / pitch bend&#34; only for the moment.&#60;br /&#62;
. 35156Hz /  PWM size : 2048&#60;br /&#62;
. Each voices has 3 FM operators (each one has a ADSR env)&#60;br /&#62;
. LFO modulation matrix (3 rows only for the moment)&#60;/p&#62;
&#60;p&#62;The maple can handle in real time 5 voices :-)&#60;/p&#62;
&#60;p&#62;Next step, adding some rotary encoders to change the parameters in real time, then a LCD.&#60;br /&#62;
I also have to try to reduce the background noise.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640&amp;page=2#post-3659</link>
			<pubDate>Thu, 17 Feb 2011 22:40:58 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3659@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;for reference, this is the commit:&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/libmaple/commit/12914284f5053d5c83cda8e5f8a944c2957c9f5c&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/commit/12914284f5053d5c83cda8e5f8a944c2957c9f5c&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640#post-3658</link>
			<pubDate>Thu, 17 Feb 2011 22:31:00 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3658@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ok, i've merged the nzmichaelh-master branch into libmaple master. this finally provides DMA support (libmaple/dma.h).  other new features:&#60;/p&#62;
&#60;p&#62;- independent watchdog (libmaple/iwdg.h)&#60;br /&#62;
- backup registers (libmaple/bkp.h)&#60;br /&#62;
- basic power management #defines (libmaple/pwr.h)&#60;br /&#62;
- a fixed ring_buffer implementation (libmaple/ring_buffer.h)&#60;br /&#62;
- various bug fixes and improvements (most notably to libmaple/usart.c, wirish/time.h, wirish/time.c, and libmaple/exti.c)&#60;/p&#62;
&#60;p&#62;credit and thanks to Michael Hope (nzmichaelh on github) for the initial implementation.&#60;/p&#62;
&#60;p&#62;i'm going to hold off on releasing an IDE snapshot for now, as the APIs are pretty low level and there's no formal documentation (although there are plenty of doxygen comments in the source).  if you've got some time and are using the unix toolchain, we'd love to hear any feedback/experience reports!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640#post-3606</link>
			<pubDate>Fri, 11 Feb 2011 11:23:09 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">3606@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I2S is supported on maple native, but I am not unconvinced that you couldnt get I2S running on a regular maple by tweaking the USART configuration a little bit and maybe do some bit banging. Ive been meaning to try this. Has anyone?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640#post-3588</link>
			<pubDate>Thu, 10 Feb 2011 05:02:31 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">3588@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks poslathian for your answer and for the very usefull thx example.&#60;br /&#62;
I have mixer at home connected to amplified speaker so i'm confident i will be able to hear some sounds ;-)&#60;/p&#62;
&#60;p&#62;I realized that 400Khz I2C is to slow for 40Khz 12 or 16bits audio.&#60;br /&#62;
I just gave a look to i2s and spi protocol... very intersting.&#60;br /&#62;
SPI would be better as it seems that the regular &#34;maple&#34; does not support i2s.&#60;/p&#62;
&#60;p&#62;Looking forward to see what you come with,&#60;/p&#62;
&#60;p&#62;BTW my maple arrived this morning :-))) how tiny ! impressive.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640#post-3584</link>
			<pubDate>Wed, 09 Feb 2011 19:48:57 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">3584@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;dont forget that soft i2c (master mode only) is already in the IDE as a library. It works with some devices (like the xl345) but not with others, mostly due to clock stretching issues. However, you can use this library now...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A few API questions"</title>
			<link>http://forums.leaflabs.com/topic.php?id=640#post-3583</link>
			<pubDate>Wed, 09 Feb 2011 19:43:26 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3583@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;zoofdxp,&#60;/p&#62;
&#60;p&#62;Hardware I2C is high on our list of priorities as well.  We're working on it, with an ETA of about 1 month for C-level support (and shortly thereafter, a wirish wrapper).&#60;/p&#62;
&#60;p&#62;We agree that it's an important hurdle to overcome. However, we had previously promised to fix some critical bugs before moving on to new features.  This work (which occurred on the debug-serialusb and nzmichaelh-master libmaple branches) is now wrapping up, and we'll be moving on to new features as soon as we can.&#60;/p&#62;
&#60;p&#62;Thanks to everybody for your patience!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
