<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to use SPI with the stack ??]]></title><description><![CDATA[<p dir="auto">Hi guys,</p>
<p dir="auto">today I spent some time getting my MCP3204 working. It´s a 4 channel ADC with an SPI Bus.<br />
I connected the MCP like this:</p>
<pre><code>#define SPI1_CLK  18  // D -&gt; Clk   -&gt; Pin 11  
#define SPI1_MISO 19  // Q -&gt; D Out -&gt; Pin 10     
#define SPI1_MOSI 23  //   -&gt; D In  -&gt; Pin  9    
#define SPI1_SS   16 //    -&gt; CS    -&gt; Pin  8   
</code></pre>
<p dir="auto">It´s working as expected as far as I don´t use any display stuff from the M5 Stack.</p>
<p dir="auto">As soon as I ad the following to my code:</p>
<pre><code> M5.begin(); // true, false, false);
 M5.Lcd.printf("TEST");
</code></pre>
<p dir="auto">things getting wired. The readings of my MCP3204 are wrong.</p>
<p dir="auto">I convert the AD values to temperature vales since I use some BBQ sensors. And the results are about 2 degrees wrong when adding the M5 Display.<br />
Example: Reading temp without Display -&gt; ~21° and with display ~23° or sometime ~17°<br />
I can do some addition checks with the plain AD values to get a better understanding.</p>
<p dir="auto">But anyway ... What´s wrong in using the SPI bus for a second device?<br />
Are there any drawbacks i don´t know? Any issues?</p>
<p dir="auto">Maybe someone has some explanation for this topic.</p>
<p dir="auto">Dominik</p>
]]></description><link>https://community.m5stack.com/topic/414/how-to-use-spi-with-the-stack</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 23:48:00 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/414.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Nov 2018 14:41:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to use SPI with the stack ?? on Sun, 18 Nov 2018 17:46:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi Rob.<br />
Yes there are 100nF directly at the Power supply of the Mcp3204.<br />
But that won't help. I Ordered some lm4040 to have a clean voltage reference.<br />
I think that will help.</p>
<p dir="auto">Regards<br />
Dominik</p>
]]></description><link>https://community.m5stack.com/post/2021</link><guid isPermaLink="true">https://community.m5stack.com/post/2021</guid><dc:creator><![CDATA[moelski]]></dc:creator><pubDate>Sun, 18 Nov 2018 17:46:33 GMT</pubDate></item><item><title><![CDATA[Reply to How to use SPI with the stack ?? on Sun, 18 Nov 2018 15:48:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/736">@moelski</a> Have you tried adding a small capacitor to ground?</p>
]]></description><link>https://community.m5stack.com/post/2019</link><guid isPermaLink="true">https://community.m5stack.com/post/2019</guid><dc:creator><![CDATA[Rop]]></dc:creator><pubDate>Sun, 18 Nov 2018 15:48:26 GMT</pubDate></item><item><title><![CDATA[Reply to How to use SPI with the stack ?? on Sun, 18 Nov 2018 15:27:56 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, it's useful.</p>
]]></description><link>https://community.m5stack.com/post/2018</link><guid isPermaLink="true">https://community.m5stack.com/post/2018</guid><dc:creator><![CDATA[Kabron]]></dc:creator><pubDate>Sun, 18 Nov 2018 15:27:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to use SPI with the stack ?? on Sun, 18 Nov 2018 09:31:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi Guys,<br />
I think I figured out the main problem.</p>
<p dir="auto">It has nothing todo with the SPI bus ... It´s the 3,3V line.<br />
<img src="/assets/uploads/files/1542533354105-img_20181118_102318-resized.jpg" alt="0_1542533354547_IMG_20181118_102318.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Take a look at the picture. If you set the LCD to 80 (~33%) brightness then the PWM signal is extremly present on the 3,3v line ... And the MCP3204 don´t like that :-)</p>
<p dir="auto">And this is a picture with 255 (100% on) brightness ...<br />
<img src="/assets/uploads/files/1542533456911-img_20181118_102352-resized.jpg" alt="0_1542533457784_IMG_20181118_102352.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">No further explanation needed ...</p>
<p dir="auto">Dominik</p>
]]></description><link>https://community.m5stack.com/post/2008</link><guid isPermaLink="true">https://community.m5stack.com/post/2008</guid><dc:creator><![CDATA[moelski]]></dc:creator><pubDate>Sun, 18 Nov 2018 09:31:17 GMT</pubDate></item></channel></rss>