<?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[GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances]]></title><description><![CDATA[<p dir="auto">I am hoping some of the more learned/experienced people in the forum can help me with a couple of issues regarding use of GPY/FiPY on the Expansion Board 3.</p>
<p dir="auto">After a few years away, I am currently getting some hands on experience in coding - this time with Micropython, for a couple of projects I have been tasked with. I have some questions that I need some clarification on - a bit long winded but I have tried to explain the purpose and reasons for them</p>
<p dir="auto">The more complex project currently uses a GPY on the Exp Bd 3 and requires:<br />
<strong>1. Using Two x SD Cards.</strong></p>
<ul>
<li>Using the Exp. Bd, SD for internal storage of sensor data and connection via WLAN, LTE, FTP and Web Server functionality to record constant sensor data, send it to remote servers and allow it to be viewed and/or accessed from remote log ins eith on WLAN or WAN.</li>
<li>The other SD card I would like to use as an externally accessible mechanism to allow manual operations on site to (i) retrieve data ,  (ii) apply code updates  and revisions (licenses etc for various sensor functions) and (iii) allow changes to configuration settings.</li>
<li>At the moment I an using the on-board SDIO for the internal SD Card and after quite a bit of trial and error I now have a workable SPI interface for the 'external' SD card. There are limited pin mapping options and I am using:</li>
<li>SDIO  seems to use PINS P4 (SD CMD), P8 (SD DAT0) and P23 (SD CLK)</li>
<li>SPI is currently on PINS P9 (SPI CS), P10 SPI CLK),  P11 (MOSI) and P14 (MISO)</li>
</ul>
<p dir="auto">Other PIN assignments are:</p>
<ul>
<li>P19,  P20 - CLK Crystal (accurate clocking and timing required )</li>
<li>P21 for I2C SDA and P22 for I2C SCLK</li>
</ul>
<p dir="auto">The above seems to work OK, but is a work in progress as I refine the associated capabilities of the two SD cards, file handling and also the current I2C sensors - but also see the following item 2.</p>
<p dir="auto"><strong>2. Using Two x I2C Interfaces</strong><br />
Through the prototype development I have found that I need one sensor to operated continuously, recording and analysing data at a fairly high rate and oversampling to provide increased accuracy. I don't believe the type of sensor and what it is recording to be relevant to the issue I am asking about. At present the lower rate/lower accuracy sensors work fine and record ambient environmental conditions quite happily to the internal SD card. However, when I add the high sample rate/high accuracy sensor to the I2C bus I seem to get a range of errors which I believe is due to 'interference' or timing issues between the devices on the I2C bus - OS Errors and data errors. If I run either the high speed/accuracy device or the low speed items separately there are no such errors so I think the two sections of code are fine on their own. But run together, even in separate threads, the issues occur.</p>
<p dir="auto">So my questions about I2C are these:<br />
a. is it feasible to have two I2C instances running at the same time? If so, this would permit me to treat the two I2C interfaces separately in code I think, and reduce or remove the errors.</p>
<p dir="auto">b. If two I2C instances is achievable, the shortage of mappable pins in the GPY/Exp Bd combo makes this a bit difficult to implement.</p>
<ul>
<li>My current thinking is to leave the existing I2C instance ('i2c_B') on Pins P21 (SDA) and P22 (SCLK) and have the second instance ('i2c_A') on Pin P3 for the second SDA and share the Pin 22 (SCLK) across both instances?<br />
I will try this but I am wondering if anyone can comment on whether this might work or am I wasting my time. I don't see too many issues using the same clock speed for the two instances, I have tried both separately and it seems fine at 1000000 for them both. Of course the sensor devices and the micro-controller/expansion board combo use the same power rails, so that shouldn't be an issue.</li>
</ul>
<p dir="auto">I am hoping there are people in this forum who might be able to help - the issues are more a result of GPY/FiPy/Exp Bd mapping limitations than code, but maybe I am headed in the wrong direction? Any comments or suggestions would be most welcome. Getting SDIO and SPI working was quite an effort,  and dual I2C instances might be unworkable but I haven't been able to find much in the way of documentation to help me so far either way. Maybe I am asking too much?</p>
<p dir="auto">My other option of course is to use two micro-controllers but that brings the complications of interfacing of the two together, so as to use common communications and data cards, plus increased power requirements etc. etc. (as you all would appreciate).</p>
<p dir="auto">Thanks for reading this and thanks in advance for any responses offered. My apologies also for any typos in the above..  :-)</p>
<p dir="auto">Steve W</p>
]]></description><link>https://forum.pycom.io/topic/4179/gpy-fipy-expansion-bd-3-multi-i2c-and-sd-card-instances</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 18:07:57 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/4179.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Jan 2019 08:49:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Thu, 03 Jan 2019 08:49:53 GMT]]></title><description><![CDATA[<p dir="auto">I am hoping some of the more learned/experienced people in the forum can help me with a couple of issues regarding use of GPY/FiPY on the Expansion Board 3.</p>
<p dir="auto">After a few years away, I am currently getting some hands on experience in coding - this time with Micropython, for a couple of projects I have been tasked with. I have some questions that I need some clarification on - a bit long winded but I have tried to explain the purpose and reasons for them</p>
<p dir="auto">The more complex project currently uses a GPY on the Exp Bd 3 and requires:<br />
<strong>1. Using Two x SD Cards.</strong></p>
<ul>
<li>Using the Exp. Bd, SD for internal storage of sensor data and connection via WLAN, LTE, FTP and Web Server functionality to record constant sensor data, send it to remote servers and allow it to be viewed and/or accessed from remote log ins eith on WLAN or WAN.</li>
<li>The other SD card I would like to use as an externally accessible mechanism to allow manual operations on site to (i) retrieve data ,  (ii) apply code updates  and revisions (licenses etc for various sensor functions) and (iii) allow changes to configuration settings.</li>
<li>At the moment I an using the on-board SDIO for the internal SD Card and after quite a bit of trial and error I now have a workable SPI interface for the 'external' SD card. There are limited pin mapping options and I am using:</li>
<li>SDIO  seems to use PINS P4 (SD CMD), P8 (SD DAT0) and P23 (SD CLK)</li>
<li>SPI is currently on PINS P9 (SPI CS), P10 SPI CLK),  P11 (MOSI) and P14 (MISO)</li>
</ul>
<p dir="auto">Other PIN assignments are:</p>
<ul>
<li>P19,  P20 - CLK Crystal (accurate clocking and timing required )</li>
<li>P21 for I2C SDA and P22 for I2C SCLK</li>
</ul>
<p dir="auto">The above seems to work OK, but is a work in progress as I refine the associated capabilities of the two SD cards, file handling and also the current I2C sensors - but also see the following item 2.</p>
<p dir="auto"><strong>2. Using Two x I2C Interfaces</strong><br />
Through the prototype development I have found that I need one sensor to operated continuously, recording and analysing data at a fairly high rate and oversampling to provide increased accuracy. I don't believe the type of sensor and what it is recording to be relevant to the issue I am asking about. At present the lower rate/lower accuracy sensors work fine and record ambient environmental conditions quite happily to the internal SD card. However, when I add the high sample rate/high accuracy sensor to the I2C bus I seem to get a range of errors which I believe is due to 'interference' or timing issues between the devices on the I2C bus - OS Errors and data errors. If I run either the high speed/accuracy device or the low speed items separately there are no such errors so I think the two sections of code are fine on their own. But run together, even in separate threads, the issues occur.</p>
<p dir="auto">So my questions about I2C are these:<br />
a. is it feasible to have two I2C instances running at the same time? If so, this would permit me to treat the two I2C interfaces separately in code I think, and reduce or remove the errors.</p>
<p dir="auto">b. If two I2C instances is achievable, the shortage of mappable pins in the GPY/Exp Bd combo makes this a bit difficult to implement.</p>
<ul>
<li>My current thinking is to leave the existing I2C instance ('i2c_B') on Pins P21 (SDA) and P22 (SCLK) and have the second instance ('i2c_A') on Pin P3 for the second SDA and share the Pin 22 (SCLK) across both instances?<br />
I will try this but I am wondering if anyone can comment on whether this might work or am I wasting my time. I don't see too many issues using the same clock speed for the two instances, I have tried both separately and it seems fine at 1000000 for them both. Of course the sensor devices and the micro-controller/expansion board combo use the same power rails, so that shouldn't be an issue.</li>
</ul>
<p dir="auto">I am hoping there are people in this forum who might be able to help - the issues are more a result of GPY/FiPy/Exp Bd mapping limitations than code, but maybe I am headed in the wrong direction? Any comments or suggestions would be most welcome. Getting SDIO and SPI working was quite an effort,  and dual I2C instances might be unworkable but I haven't been able to find much in the way of documentation to help me so far either way. Maybe I am asking too much?</p>
<p dir="auto">My other option of course is to use two micro-controllers but that brings the complications of interfacing of the two together, so as to use common communications and data cards, plus increased power requirements etc. etc. (as you all would appreciate).</p>
<p dir="auto">Thanks for reading this and thanks in advance for any responses offered. My apologies also for any typos in the above..  :-)</p>
<p dir="auto">Steve W</p>
]]></description><link>https://forum.pycom.io/post/24605</link><guid isPermaLink="true">https://forum.pycom.io/post/24605</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Thu, 03 Jan 2019 08:49:53 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sat, 05 Jan 2019 03:36:26 GMT]]></title><description><![CDATA[<p dir="auto">Step 1. Buy an actual non-Python MCU board (e.g. Adafruit ItsyBitsy M0) and program a test written in C/Arduino to see if you get the I2C interference problems with two sensors thereon. If you don't, it's another Pycom software problem.</p>
<p dir="auto">Step 2. Consider using an external MCU written in C/Arduino as your main MCU, and powering on the Pycom as needed through a MOSFET for the communications piece. That is how I am using Pycom products. I love the Pycom hardware. But I absolutely detest Python and the crappy software environment on these boards. It feels like running a teachings-kids-how-to-program programming language being run on totally competent hardware that should be programmed in C/Arduino. I note that it is very possible to program Pycom boards on Arduino. As it stands, I cannot trust it for 24/7 operations. Pycom really made a bad decision tying themselves to such a stupid, inefficient, high-level programming language for kids, not professionals. I know Python people will read this and say &quot;well you just don't know how to write proper code with try/except error handling, yada yada&quot;. I'm sorry, but for any industrial application that needs 24/7 reliability, you can't risk the fickle variability of this giant interpreted language. You need to be able to do raw pointer/memory math - totally impossible with this Micropython stuff - and if you screw something up, your code continues instead of dies in the field with an unhandled exception. I know, watchdog timer, try/except, 'faster development than C', I've heard it all. I hate Python. But the Pycom GPy has been relatively excellent used as a 4G modem externally switched on/off, and has way more potential if used as a raw ESP32 board in Arduino. I would recommend you try out my design of low power Cortex M0 master controller taking sensor data dynamically switching on/off Pycom GPy for LTE/etc communications. You'll also save a ton of power as the Pycom boards are insanely, prohibitively power consumptive even with WiFi off, since they do not offer a way for you to change the clock speed. Maybe some expert will come in here and prove me wrong with code that puts my GPy to 2MHz in Python.</p>
<p dir="auto">Hope this helps.</p>
]]></description><link>https://forum.pycom.io/post/24648</link><guid isPermaLink="true">https://forum.pycom.io/post/24648</guid><dc:creator><![CDATA[PaulM]]></dc:creator><pubDate>Sat, 05 Jan 2019 03:36:26 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sat, 05 Jan 2019 22:39:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/2766">@paulm</a> Thanks for the comments. I hear what you are saying and strangely enough I am doing some parallel development using an M0 board, much as you are. I still have the same I2C issues though but with more pins available it is easier to work around. :-)</p>
<p dir="auto">All in all the GPY suits my needs for this project, with careful attention to timing/times,memory etc.  but I may be pushing the limits soon  :-)</p>
<p dir="auto">I haven't experienced any reliability issues to date and my test mule has been running for nearly 4 weeks now without issues. The error handling module is quite 'involved' but seems to manage all the issues so far - including logging them. It isn't running the full code of course (while I sort out threading &amp; I2C), using 18 out of 22 sensors, but doing everything at a greatly increased frequency and lots of writing of data to disk, so it is as loaded as I can get it.</p>
<p dir="auto">Thanks again for your advice with SPI earlier, I now have that working really well and am developing code to do file copies, transfers, updates etc. Also adding in some SMS functionality after successfully playing with that a bit yesterday.</p>
]]></description><link>https://forum.pycom.io/post/24651</link><guid isPermaLink="true">https://forum.pycom.io/post/24651</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Sat, 05 Jan 2019 22:39:17 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sat, 05 Jan 2019 19:42:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> Therwe was a discussion eralier of connecting two I2C buses. <a href="https://forum.pycom.io/topic/4001/some-magnetometer-sensors-are-incompatible-with-the-pytrack-shield/11">https://forum.pycom.io/topic/4001/some-magnetometer-sensors-are-incompatible-with-the-pytrack-shield/11</a><br />
<s>The Pycom Firmware only allows to have one I2C initiated at a time. That is a strange limitation. So the post above switches between the physical buses by sequences of init-use-deinit.</s><br />
You could also consider to multiplex the buses by hardware, e.g. with an analog switch like the CD4052 ic.<br />
Edit: You can use multiple I2C buses, up to three, which operate independent.</p>
]]></description><link>https://forum.pycom.io/post/24653</link><guid isPermaLink="true">https://forum.pycom.io/post/24653</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Sat, 05 Jan 2019 19:42:53 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sat, 05 Jan 2019 18:15:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> Did you pay some attention to the correct value of the i2c pullup resistors? When it comes to higher speeds there is a need for higher pullup currents (= lower resistor values).<br />
Having a dozen i2c devices on a single bus should not be a problem.</p>
]]></description><link>https://forum.pycom.io/post/24654</link><guid isPermaLink="true">https://forum.pycom.io/post/24654</guid><dc:creator><![CDATA[Elizar]]></dc:creator><pubDate>Sat, 05 Jan 2019 18:15:30 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sat, 05 Jan 2019 20:13:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3277">@elizar</a> Hi, yes I did a lot of trial and error experimentation using external pull-ups and have a workable solution which lets me use fast mode (1000000) . Having two I2C buses seems to be the way to go for this project - using P21/P22 (3.9K PU's)and P3/P22 (3.3K PU's). Using a common clock doesn't appear to be a problem either - but only limited testing don with that configuration so far.</p>
]]></description><link>https://forum.pycom.io/post/24655</link><guid isPermaLink="true">https://forum.pycom.io/post/24655</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Sat, 05 Jan 2019 20:13:51 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sat, 05 Jan 2019 20:51:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> said in <a href="/post/24605">GPY/FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances</a>:</p>
<blockquote>
<p dir="auto">Is it feasible to have two I2C instances running at the same time?</p>
</blockquote>
<p dir="auto">Yes. I just tried that. Both instances need separate pins, of which you do not have too many. And any attempt to use two buses at the same time using the same pin for SCL fails. The only thing that works when using two I2C instances who share the SCL line and have separate SDA lines, is to alternatively init and deinit them. But then a single I2C bus too would be sufficient.</p>
<p dir="auto">Unfortunately there is no API access to the GPIO matrix for an attempt to redefine Pins P13-P18, if that would be possible at all.</p>
]]></description><link>https://forum.pycom.io/post/24656</link><guid isPermaLink="true">https://forum.pycom.io/post/24656</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Sat, 05 Jan 2019 20:51:41 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sat, 05 Jan 2019 22:22:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> Thanks for that info Robert. I'm still experimenting and testing but I seem to have two I2C buses (GPY as master for both), using a common clock, working to a fashion. I'll evaluate the stored data today to be sure. I am using an i2C mux on a different project with good success, so I might look at that as a way to get around the limited mappable pins available on the FiPy/Gpy.  I'll also try using P8 gor the second i2c SAD/SCL, but that pin is assigned to SDIO - as sdDATA0 so I have avoided that pin so far. I think that I am trying to do too much with the limited physical pin capabilities of the GPY. :-(  but otherwise it is doing a great job for this particular project.</p>
<p dir="auto">The problem with the attached sensors is that one in particular is heavily over-sampled for accuracy and read at a very high frequency, continuously, so getting data basically floods the  bus it is on. Might need a dedicated sub processor for it.</p>
<p dir="auto">I have found there is quite a lot of helpful information on Pycom products available but it isn't always easy to find when you need it  :-)</p>
]]></description><link>https://forum.pycom.io/post/24660</link><guid isPermaLink="true">https://forum.pycom.io/post/24660</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Sat, 05 Jan 2019 22:22:06 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sun, 06 Jan 2019 08:53:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> I just tried to reassign UART0, RX to e.g. P15, using:</p>
<pre><code>&gt;&gt;&gt; from machine import UART
&gt;&gt;&gt; uart=UART(0, 115200, pins=('P1', 'P15'))
</code></pre>
<p dir="auto">Then P0 can be used as another GPIO pin. I tried that with I2C and it works fine. In my test I used P9,P10 for I2C, bus 0, and P22, P0 for I2C, Bus 1. Attached I2C devices work as expected.</p>
<p dir="auto">Edit: If the SD card is the only device on that bus. you can also try to pull CS to GND permanently, releasing P9, which is used for CS.</p>
]]></description><link>https://forum.pycom.io/post/24662</link><guid isPermaLink="true">https://forum.pycom.io/post/24662</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Sun, 06 Jan 2019 08:53:11 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sun, 06 Jan 2019 09:40:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> A couple of good suggestions there, that I will trial. One of them should solve my pin mapping issues. I hadn't tried using P0, never even occurred to me.. :-)   That P0 to P15 (or 16/17/18?) reassignment, would need to go in <a href="http://boot.py" target="_blank" rel="noopener noreferrer nofollow">boot.py</a> I guess?</p>
<p dir="auto">While my 2 I2C buses worked, using the common SCL, I don't think that is the best solution long term - but the tests proved that the two bus method removed the (timing?) errors I had been seeing in the sensor read process.</p>
]]></description><link>https://forum.pycom.io/post/24664</link><guid isPermaLink="true">https://forum.pycom.io/post/24664</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Sun, 06 Jan 2019 09:40:57 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Sun, 06 Jan 2019 09:46:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> said in <a href="/post/24664">GPY/FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances</a>:</p>
<blockquote>
<p dir="auto">That P0 to P15 (or 16/17/18?) reassignment, would need to go in <a href="http://boot.py" target="_blank" rel="noopener noreferrer nofollow">boot.py</a> I guess?</p>
</blockquote>
<p dir="auto">Yes, or early in <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a>. You still have telnet in case of trouble.<br />
About sharing SCL: I tried that, but it only worked when deinit'ing the not used bus. Otherwise I had bus errors.</p>
]]></description><link>https://forum.pycom.io/post/24665</link><guid isPermaLink="true">https://forum.pycom.io/post/24665</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Sun, 06 Jan 2019 09:46:20 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 02:34:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a>  Thanks Robert, your suggestion to move UART 0 to P1/P13 ( I used P13 because I already have 2 ADC inputs (P15/P16) configured to work as option switches) was a really good one - still puzzled why I didn't think of it myself. perhaps I just figured the board was setup to use P1/P0 as per the documentation I have. Two i2c buses now working in separate threads with no risk of SCL conflicts.</p>
]]></description><link>https://forum.pycom.io/post/24682</link><guid isPermaLink="true">https://forum.pycom.io/post/24682</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Mon, 07 Jan 2019 02:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 06:26:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> If you use one of the expansion or sensor boards from Pycom, this move is difficult, because the connection to the USB/UART bridge is hardwired.</p>
]]></description><link>https://forum.pycom.io/post/24685</link><guid isPermaLink="true">https://forum.pycom.io/post/24685</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Mon, 07 Jan 2019 06:26:45 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 06:39:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> Oh, I wondered about that..  As per the topic heading, I am using an Expansion board 3. So I'll scratch trying that option..  :-(</p>
]]></description><link>https://forum.pycom.io/post/24686</link><guid isPermaLink="true">https://forum.pycom.io/post/24686</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Mon, 07 Jan 2019 06:39:56 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 06:45:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> On an expansion board 3 (and 2) the RX and TX connections run through a jumper. So instead of scratching you can pull the jumper.</p>
]]></description><link>https://forum.pycom.io/post/24688</link><guid isPermaLink="true">https://forum.pycom.io/post/24688</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Mon, 07 Jan 2019 06:45:07 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 07:03:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> Won't pulling the jumper stop comms with Atom/Repl  over USB? Maybe I can connect P13 to the appropriate jumper pin..</p>
]]></description><link>https://forum.pycom.io/post/24689</link><guid isPermaLink="true">https://forum.pycom.io/post/24689</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Mon, 07 Jan 2019 07:03:32 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 08:29:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> Yes. Just pull the jumper and use a wire strap from the USB side of the jumper to P13.</p>
]]></description><link>https://forum.pycom.io/post/24692</link><guid isPermaLink="true">https://forum.pycom.io/post/24692</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Mon, 07 Jan 2019 08:29:42 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 20:10:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> Is there a schematic of the Expansion Board 3 available anywhere, so I don't have to pull the GPY/Expansion board out of the enclosure to trace connections all the time?</p>
]]></description><link>https://forum.pycom.io/post/24725</link><guid isPermaLink="true">https://forum.pycom.io/post/24725</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Mon, 07 Jan 2019 20:10:56 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 20:30:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> PyCom did not publish the schematics yet. And it is not clear whether they will do it. But at least the jumpers are documented. You can use an Ohm-meter to tell, which side is connected to the GPY/FiPy.</p>
]]></description><link>https://forum.pycom.io/post/24726</link><guid isPermaLink="true">https://forum.pycom.io/post/24726</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Mon, 07 Jan 2019 20:30:42 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Mon, 07 Jan 2019 22:03:24 GMT]]></title><description><![CDATA[<p dir="auto">.@robert-hh Yep, the DMM and a couple of extended probes works for this situation.</p>
]]></description><link>https://forum.pycom.io/post/24729</link><guid isPermaLink="true">https://forum.pycom.io/post/24729</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Mon, 07 Jan 2019 22:03:24 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Tue, 08 Jan 2019 07:42:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> Hi Robert, today I tried this mod, pulled the jumper and then patched to UART pin (the pin to outside of the Expansion Board 3) to P13. This arrangement seems to work fine for UART REPL and uploads while working on the code so that's great.</p>
<p dir="auto">One thing I noted from testing out the pin arrangements between the jumper block and the GPY is that GPY Pin 2 (P0 ) actually connects to the jumper marked TX on the Exp Bd 3 - I was expecting it to be RX? Also the RX pin on the board goes to GPY Pin 3 (P1). These seem to be ass about - incorrect labeling on the board maybe? I will check it again though.</p>
<p dir="auto">Edit: I pinned these out with a DMM, with GPY removed and got the same result. I'm confused though, because disconnecting P13 doesn't stop the REPL even though the jumper is out - a schematic would be so handy because I'm missing something!   Whoops, of course that is how it should be..  LOL  :-)</p>
<p dir="auto">Now I have that done, I can do some testing on the two i2c buses. I think my big problem with these and using separate threads is the LTE init/deinit commands that are part of the data upload routine, which stop the threads for a period of time, causing breaks in the sampling. The non critical sensors aren't a problem, but the over-sampled high speed sensor is badly affected by the thread halting. I need to see what I can do about that. The Expansion Board and GPY are all at the latest revisions so I am not sure what I can do. Might have to just work around that pause or perhaps use a separate micro, with buffering, for that sensor - something I was trying to avoid up until now. :-(</p>
]]></description><link>https://forum.pycom.io/post/24741</link><guid isPermaLink="true">https://forum.pycom.io/post/24741</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Tue, 08 Jan 2019 07:42:37 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Tue, 08 Jan 2019 07:02:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> Can you check whether timer interrupts still work while calling LTE init/deinit?</p>
]]></description><link>https://forum.pycom.io/post/24742</link><guid isPermaLink="true">https://forum.pycom.io/post/24742</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Tue, 08 Jan 2019 07:02:02 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Tue, 08 Jan 2019 07:12:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3193">@stevo52</a> said in <a href="/post/24741">GPY/FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances</a>:</p>
<blockquote>
<p dir="auto">These seem to be ass about - incorrect labeling on the board maybe?</p>
</blockquote>
<p dir="auto">Same on Expansion board 2. The labeling is wrong. Good to know. Please note, <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3525">@Paul-Thornton</a>!</p>
]]></description><link>https://forum.pycom.io/post/24744</link><guid isPermaLink="true">https://forum.pycom.io/post/24744</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Tue, 08 Jan 2019 07:12:45 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Tue, 08 Jan 2019 07:36:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> I'll do that and come back to you. I'll fry timers from <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a> and also from a thread.</p>
]]></description><link>https://forum.pycom.io/post/24746</link><guid isPermaLink="true">https://forum.pycom.io/post/24746</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Tue, 08 Jan 2019 07:36:43 GMT</pubDate></item><item><title><![CDATA[Reply to GPY&#x2F;FiPY &amp; Expansion Bd 3 - Multi I2C and SD Card Instances on Fri, 11 Jan 2019 00:55:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> OK, I set up some code to try this out, several timers at different periods and several threads including one to start LTE, send an SMS and then deinit. From what I can see, the timers do NOT get interupted by the LTE device. It seems the timer counts are retained and dumped to REPL as soon as possible (buffered apparently).  There is some corruption/mixup of REPL lines but all the timer flags are there</p>
<p dir="auto">I will investigate a bit further and see if I can use this to my advantage. One thread/timer I will need will be at 11uS preferably, so as it is too fast to capture by eye, I'll have to write to a file to a file to evaluate any impact by the LTE device. Biggest constraint might be the actual time to write to disk. A FIFO data buffer is probably a good solution - some work to do there.</p>
<p dir="auto">The test code was pretty rough and ready so its needs a lot of refinement to be truly useful as a valid test.</p>
]]></description><link>https://forum.pycom.io/post/24836</link><guid isPermaLink="true">https://forum.pycom.io/post/24836</guid><dc:creator><![CDATA[Stevo52]]></dc:creator><pubDate>Fri, 11 Jan 2019 00:55:34 GMT</pubDate></item></channel></rss>