<?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: SPI difference between libmaple 0.0.9 to 0.0.12 ?</title>
		<link>http://forums.leaflabs.com/topic.php?id=1440</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:17:47 +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=1440" rel="self" type="application/rss+xml" />

		<item>
			<title>Abo on "SPI difference between libmaple 0.0.9 to 0.0.12 ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1440#post-8555</link>
			<pubDate>Fri, 09 Mar 2012 15:44:14 +0000</pubDate>
			<dc:creator>Abo</dc:creator>
			<guid isPermaLink="false">8555@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Sorry for the series of posts... I was rushing through things... Problem SOLVED (for now)&#60;/p&#62;
&#60;p&#62;1. The regular pulse is on MOSI and the NSS (not MOSI)&#60;/p&#62;
&#60;p&#62;In version 0.0.9, the NSS still controlled by the programmer after Spi.begin. In 0.0.12 (probably 0.0.11 or before too), NSS somehow doesn't response to the digitalWrite(10, HIGH); line.&#60;/p&#62;
&#60;p&#62;2. I put the &#34;pinMode(10, OUTPUT);&#34; line AFTER Spi.begin, then everything started to work again. So somehow we need to explicitly 're-mode' the NSS pin in 0.0.12&#60;/p&#62;
&#60;p&#62;Problem solved.&#60;/p&#62;
&#60;p&#62;There is a related post on NSS in &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=1020&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=1020&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Abo on "SPI difference between libmaple 0.0.9 to 0.0.12 ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1440#post-8552</link>
			<pubDate>Fri, 09 Mar 2012 15:12:52 +0000</pubDate>
			<dc:creator>Abo</dc:creator>
			<guid isPermaLink="false">8552@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello all - I reduce the above program into a smaller one&#60;/p&#62;
&#60;p&#62;//*********************&#60;br /&#62;
void setup()&#60;br /&#62;
{&#60;br /&#62;
  delay(3000);&#60;br /&#62;
  pinMode(10, OUTPUT);&#60;br /&#62;
  pinMode(9, OUTPUT);&#60;br /&#62;
  Spi.begin(SPI_1_125MHZ, MSBFIRST, 1);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void loop()&#60;br /&#62;
{&#60;br /&#62;
  digitalWrite(10, LOW);&#60;br /&#62;
  delayMicroseconds(50);&#60;br /&#62;
  Spi.send(0x0C4);&#60;br /&#62;
  digitalWrite(10, HIGH);&#60;br /&#62;
  delay(1000);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;I'm trying to see the difference between 0.0.9 vs 0.0.12 on the MISO and MOSI line. For 0.0.9, I see a regular pulse on both MISO and MOSI every second. For 0.0.12, I see only the first pulse, and seems like the SPI is dead there on. Any ideas?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Abo on "SPI difference between libmaple 0.0.9 to 0.0.12 ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1440#post-8547</link>
			<pubDate>Fri, 09 Mar 2012 13:01:43 +0000</pubDate>
			<dc:creator>Abo</dc:creator>
			<guid isPermaLink="false">8547@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I’m currently testing with mirgrating my project from 0.0.9 IDE to 0.0.12 IDE. I found out my SPI communication got broken in the 0.0.12 IDE. I wonder what is the difference in the setup process ?&#60;/p&#62;
&#60;p&#62;I narrow down my code to the following:&#60;/p&#62;
&#60;p&#62;//*************************************&#60;br /&#62;
HardwareSPI Spi(1);&#60;br /&#62;
int SPI_OUT = 0x0A;&#60;br /&#62;
int Configuration_Array[38]={0x0A, 0x0A, 0x0F, 0x0C, 0x03, 0x0E, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x0A, 0x0C, 0x0A, 0x0D, 0x00, 0x02, 0x0D, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0x04, 0x06, 0x00, 0x05, 0x00, 0x06, 0x0A, 0x05, 0x05, 0x0A, 0x09, 0x00, 0x03, 0x00, 0x0A};&#60;/p&#62;
&#60;p&#62;void setup()&#60;br /&#62;
{&#60;br /&#62;
  delay(3000);&#60;br /&#62;
  pinMode(10, OUTPUT);&#60;br /&#62;
  pinMode(9, OUTPUT);&#60;/p&#62;
&#60;p&#62;  Spi.begin(SPI_1_125MHZ, MSBFIRST, 1);	// resetting the slave device&#60;br /&#62;
  digitalWrite(9, LOW);&#60;br /&#62;
  delayMicroseconds(200);&#60;br /&#62;
  digitalWrite(9, HIGH);&#60;/p&#62;
&#60;p&#62;  for (uint8 i=0;i&#38;lt;38;i++)&#60;br /&#62;
  {&#60;br /&#62;
    digitalWrite(10, LOW);			// CS slave&#60;br /&#62;
    delayMicroseconds(50);&#60;br /&#62;
    SPI_OUT = Spi.send(Configuration_Array[i]);&#60;br /&#62;
    digitalWrite(10, HIGH);&#60;/p&#62;
&#60;p&#62;    SerialUSB.println(SPI_OUT, HEX);&#60;br /&#62;
  }&#60;br /&#62;
}&#60;br /&#62;
//*************************************&#60;/p&#62;
&#60;p&#62;The above code works fine in 0.0.9, but doesn’t work at all in 0.0.12 (using the same hardware)&#60;/p&#62;
&#60;p&#62;Many thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
