<?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: Can I use Maple Mini for my project</title>
		<link>http://forums.leaflabs.com/topic.php?id=2252</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:08:26 +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=2252" rel="self" type="application/rss+xml" />

		<item>
			<title>steve918 on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-26441</link>
			<pubDate>Mon, 03 Jun 2013 20:21:44 +0000</pubDate>
			<dc:creator>steve918</dc:creator>
			<guid isPermaLink="false">26441@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm getting somewhere  &#60;a href=&#34;http://cl.ly/image/3I2D3T1g2Z1g&#34; rel=&#34;nofollow&#34;&#62;http://cl.ly/image/3I2D3T1g2Z1g&#60;/a&#62;.  Reading from a DS2502 prom seems to work fine.  Search doesn't work properly and I am having some trouble debugging it at the moment.  I don't need search, but I'll try to work out why.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-26433</link>
			<pubDate>Mon, 03 Jun 2013 16:53:09 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">26433@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I personally think the one wire buss was cute when it came out but mostly a nuisance in the real world. There is no support for it on any processors peripheral side. And pjrc's bitbanging library is just that. Given that the sensors themselves take an enormous amount of time to actually get the data and that a single sensor going bad usually takes down the buss I prefer using the DS2482-800 as described below. &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.dorkbotpdx.org/blog/wardcunningham/diagnosis_in_a_complex_world#comment-698&#34; rel=&#34;nofollow&#34;&#62;http://www.dorkbotpdx.org/blog/wardcunningham/diagnosis_in_a_complex_world#comment-698&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-26418</link>
			<pubDate>Mon, 03 Jun 2013 11:02:21 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">26418@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;steve918 - Do you have access to an Arduino and/or storage oscilloscope or logic probe?&#60;br /&#62;
I think it will be quite difficult to debug without a working 'reference' platform (Arduino) or the ability to look at the signal.&#60;/p&#62;
&#60;p&#62;&#60;em&#62;&#34;search() doesn't seem to turn up anything&#34;&#60;/em&#62;&#60;br /&#62;
Are you saying the signal on the wire doesn't change, or &#60;code&#62;read_bit()&#60;/code&#62; always returns the same value, or something else?&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>steve918 on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-26411</link>
			<pubDate>Mon, 03 Jun 2013 01:36:05 +0000</pubDate>
			<dc:creator>steve918</dc:creator>
			<guid isPermaLink="false">26411@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I realize this post is a bit old, but I'm still having a bit of trouble after scouring the web for the same problem and there doesn't seem to be a concrete solution.&#60;/p&#62;
&#60;p&#62;I took the suggested changes from this thread along with some checking for #defines in the header.  The #elif defined(BOARD_maple) line is specific to the maple board (Not Maple Mini) It could possibly be made more generic by using #elif defined(MAPLE_IDE) like I did at the top.&#60;/p&#62;
&#60;p&#62;My current code&#60;br /&#62;
&#60;a href=&#34;https://gist.github.com/steve918/5696388&#34; rel=&#34;nofollow&#34;&#62;https://gist.github.com/steve918/5696388&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Complete diff from version 2.2 of PRJCs OneWire lib&#60;br /&#62;
&#60;a href=&#34;https://gist.github.com/steve918/5696407&#34; rel=&#34;nofollow&#34;&#62;https://gist.github.com/steve918/5696407&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The current code compiles, but search() doesn't seem to turn up anything so I'm not sure what might be wrong.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>raymadigan on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-13621</link>
			<pubDate>Tue, 11 Sep 2012 11:46:21 +0000</pubDate>
			<dc:creator>raymadigan</dc:creator>
			<guid isPermaLink="false">13621@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have it working now, I did take a little different approach.  It is still pretty bad, I don't know how to do it in a better way quickly.  eventually I will make it into a MAPLE version then all the platforms will still work.&#60;/p&#62;
&#60;p&#62;What I did to make it work.&#60;/p&#62;
&#60;p&#62;The class definition is:&#60;/p&#62;
&#60;p&#62;OneWire::OneWire(uint8_t pin)&#60;br /&#62;
{&#60;br /&#62;
	pinMode(pin, INPUT);&#60;br /&#62;
	bitmask = PIN_TO_BITMASK(pin);&#60;br /&#62;
	baseReg = PIN_TO_BASEREG(pin);&#60;br /&#62;
#if ONEWIRE_SEARCH&#60;br /&#62;
	reset_search();&#60;br /&#62;
#endif&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;I modified it to&#60;/p&#62;
&#60;p&#62;OneWire::OneWire(uint8_t pin)&#60;br /&#62;
{&#60;br /&#62;
	pinMode(pin, INPUT);&#60;br /&#62;
        bitmask = pin;&#60;br /&#62;
#if ONEWIRE_SEARCH&#60;br /&#62;
	reset_search();&#60;br /&#62;
#endif&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;changed the 5 macros to:&#60;br /&#62;
#define DIRECT_READ(base, mask)         digitalRead (mask)&#60;br /&#62;
#define DIRECT_MODE_INPUT(base, mask)   pinMode (mask, INPUT)&#60;br /&#62;
#define DIRECT_MODE_OUTPUT(base, mask)  pinMode(mask, OUTPUT)&#60;br /&#62;
#define DIRECT_WRITE_LOW(base, mask)    digitalWrite(mask, LOW)&#60;br /&#62;
#define DIRECT_WRITE_HIGH(base, mask)   digitalWrite(mask, HIGH)&#60;/p&#62;
&#60;p&#62;and made sure all the code that passed to the macros was correct.&#60;/p&#62;
&#60;p&#62;I ran into a few other problems like&#60;/p&#62;
&#60;p&#62;static const uint8_t PROGMEM dscrc_table[] = {&#60;/p&#62;
&#60;p&#62;the compiler didn't like this but I was lucky that it was convenient to not need the table in place for a slower code example.&#60;/p&#62;
&#60;p&#62;Is there a define for the Maple platform so I can make all of the changes Maple specific in library so I can use it cross platform.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>raymadigan on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-13566</link>
			<pubDate>Tue, 11 Sep 2012 02:28:13 +0000</pubDate>
			<dc:creator>raymadigan</dc:creator>
			<guid isPermaLink="false">13566@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I just finished a bunch of projects, got my Maple and read some code so I am tryint to figure this out.  I thought I would first try to implement the macros using known functions and this is what I have come up with.&#60;/p&#62;
&#60;p&#62;DIRECT_READ(base, mask) -&#38;gt; digitalRead(?)&#60;br /&#62;
DIRECT_MODE_INPUT(base, mask) -&#38;gt; pinMode(?, INPUT)&#60;br /&#62;
DIRECT_MODE_OUTPUT(base, mask) -&#38;gt; pinMode(?, OUTPUT)&#60;br /&#62;
DIRECT_WRITE_HIGH(base, mask) -&#38;gt; digitalWrite(?, HIGH)&#60;br /&#62;
DIRECT_WRITE_LOW(base, mask) -&#38;gt; digitalWrite(? LOW)&#60;/p&#62;
&#60;p&#62;For PIN_TO_BASEREG(pin) and PIN_TO_BITMASK(pin)  I would use what you suggest to start with.&#60;/p&#62;
&#60;p&#62;My question is, all of the DIRECT macros are passed the base and mask but the replacement functions require the pin.&#60;/p&#62;
&#60;p&#62;The library takes the pin that is passed in at initialization, gets the basereg and bitmask that it then uses  pass to the macros.  For my first pass, I think I will replace the macro call with the direct function call.  This way I will have access to the pin.  If anyone has another suggestion, I would be more then happy to consider it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>LarryP on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-12097</link>
			<pubDate>Sat, 28 Jul 2012 20:28:37 +0000</pubDate>
			<dc:creator>LarryP</dc:creator>
			<guid isPermaLink="false">12097@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@raymadigan,&#60;/p&#62;
&#60;p&#62;Many (most?) Arduinos or clones have 5 volt I/O.  Maple boards, including the Maple mini have only a limited number of 5 volt tolerant inputs and no 5 volt outputs, unless you add level shifting circuitry.  I suggest you take a carefful look at the Maple Mini's pin map and probably budget some space for one or more level shifting chips, especially if you want to interface to your existing circuitry.  &#60;/p&#62;
&#60;p&#62;That said, I'm using a Maple Mini for a project and will probably order a couple more in the near future.  Maples run rings around Arduinos; I like them.&#60;/p&#62;
&#60;p&#62;Hope this helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-12067</link>
			<pubDate>Fri, 27 Jul 2012 15:44:47 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">12067@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;raymadigan - given you're a software engineer, you could likely do a 1-Wire port by implementing the 7 macros using digitalRead/digitalWrite and switching off interrupts (disable USB, and AFAIK everything will be alright). &#60;/p&#62;
&#60;p&#62;I say this partly because you have Arduinos, and so could validate the software using one of them as a dummy 1-wire device, or &#34;1-wire network sniffer&#34;.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>raymadigan on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-12036</link>
			<pubDate>Thu, 26 Jul 2012 23:37:41 +0000</pubDate>
			<dc:creator>raymadigan</dc:creator>
			<guid isPermaLink="false">12036@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Sorry it took me so long to respond.  I have read the entries above and think that the ds2482 is my best option.  I guess I need to post this warning, in case I ask some simple question as I try to get it to work.  I am a software engineer and the reason I started building these projects was the wealth if information available for the arduino project.  I am very impressed with the maple platform and hope I can move all of my projects to it.  &#60;/p&#62;
&#60;p&#62;Thanks for all of your help, I appreciate it very much.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-11978</link>
			<pubDate>Wed, 25 Jul 2012 00:11:15 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">11978@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Ditto on the DS2482.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-11941</link>
			<pubDate>Mon, 23 Jul 2012 13:50:35 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">11941@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I've had a quick look at the 1-wire library (downloaded from &#60;a href=&#34;http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip)&#34; rel=&#34;nofollow&#34;&#62;http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip)&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;It uses direct access to pins. It is nicely isolated in some macros, but it relies on those macros being implemented.&#60;/p&#62;
&#60;p&#62;Reading Wikipedia, 1-wire is so slow that you might get this library working using ordinary digitalWrite/digitalRead to implement the macros. This might be fast enough. I imagine the application doesn't spend a lot of its time reading data from 1-wire sensors. &#60;/p&#62;
&#60;p&#62;Also, when talking 1-wire, it barely matters how quick the digital I/O is (on a Maple) because the 1-wire protocol is so slow that the MCU is stuck waiting for the data exchange.&#60;/p&#62;
&#60;p&#62;Wikipedia says a USART and some external components is enough to talk (in hardware) to 1-wire&#60;br /&#62;
&#60;a href=&#34;http://en.wikipedia.org/wiki/1-Wire&#34; rel=&#34;nofollow&#34;&#62;http://en.wikipedia.org/wiki/1-Wire&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Anyway, I think I'd start with something like (COMPLETELY UNTESTED):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;#define PIN_TO_BASEREG(pin)             ((IO_REG_TYPE*)(pin))
#define PIN_TO_BITMASK(pin)             ((IO_REG_TYPE)(pin))&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then implement the macros using &#60;code&#62;base&#60;/code&#62; as the pin number or mask as the pin number.&#60;/p&#62;
&#60;p&#62;If you needed to get 1-Wire software library working faster (which I don't think is important because the protocol speed dominates), you'd have to dig into the Maple library and the STM32F103 hardware. That would be more challenging. &#60;/p&#62;
&#60;p&#62;Two macros &#60;code&#62;PIN_TO_BASEREG&#60;/code&#62; andf &#60;code&#62;PIN_TO_BITMASK&#60;/code&#62; use portInputRegister and digitalPinToBitMask which are not available on Maple, so you'd have to dig into the maple infrastructure, and look at PIN_MAP to implement them.&#60;/p&#62;
&#60;p&#62;The other macros &#60;code&#62;DIRECT_READ&#60;/code&#62; &#60;code&#62;DIRECT_MODE_INPUT&#60;/code&#62;, &#60;code&#62;DIRECT_MODE_OUTPUT&#60;/code&#62;, &#60;code&#62;DIRECT_WRITE_LOW&#60;/code&#62;, &#60;code&#62;DIRECT_WRITE_HIGH&#60;/code&#62; use the underlying hardware representation of the digital ports. This is documented in the STM32F103 hardware manual (RM0008).&#60;/p&#62;
&#60;p&#62;The code also switches interrupts on and off, which would be mapped onto the Maples NVIC controller.&#60;/p&#62;
&#60;p&#62;How much C and microcontroller stuff have you done?&#60;br /&#62;
Have you got access to an oscilloscope? If not, implement the 7 macros using digitalRead/digitalWrite and call it a day.&#60;/p&#62;
&#60;p&#62;(Edit: or you might use something like a DS2482 to interface to 1-wire from I2C)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-11940</link>
			<pubDate>Mon, 23 Jul 2012 12:37:54 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">11940@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;raymadigan&#60;/p&#62;
&#60;p&#62;There are recent threads discussing the sdfat library.&#60;br /&#62;
I haven't seen the Dallas onewire protocol mentioned for a while, but, IIRC, it is feasible to port it (but it's about a year since I used it)&#60;/p&#62;
&#60;p&#62;The softserial library would be more of a challenge.&#60;br /&#62;
How many serials do you need? IIRC, a 48pin STM32F103CB has three hardware USART, so most people try to use them. So AFAIK, no one has bothered porting the softserial library.&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>raymadigan on "Can I use Maple Mini for my project"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2252#post-11938</link>
			<pubDate>Mon, 23 Jul 2012 12:19:57 +0000</pubDate>
			<dc:creator>raymadigan</dc:creator>
			<guid isPermaLink="false">11938@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Greetings,&#60;/p&#62;
&#60;p&#62;I have a project that I attempted to use an arduino for, but it got too big too fast.  I need a platform that I can easily mount on a circuit board and not take up too much room, and the mini fits that perfectly.  It also has a better set of pins/controls and if I can use it, it will be much better for my project.  &#60;/p&#62;
&#60;p&#62;The real question is, are ports available for some of the libraries that I use, and if not, how hard is it to port them to the Maple cpu.  I use the following libraries and if anyone can point me in a direction, I can figure out if I can make it work.&#60;/p&#62;
&#60;p&#62;I use the following library:&#60;br /&#62;
sd, the sdfat library, i have an updated version.&#60;br /&#62;
onewire, for Dallas temperature sensors&#60;br /&#62;
SoftwareSerial, I use more then one serial device.&#60;/p&#62;
&#60;p&#62;Any help would be appreciated.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
