<?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[[Solved]Fire, PaHUB, &amp; ADC (ADS1100)]]></title><description><![CDATA[<p dir="auto">Hi all, so just started playing with M5 - Nice!</p>
<p dir="auto">Although early days, i've just ploughed into a possible noob problem! I'm needing to connect ADC (unit) via PaHub (unit) to M5 Fire (port A). All good except i'm getting way out comparison readings.. As follows</p>
<p dir="auto">--&gt; Using the ADC via PaHub to Fire (portA ) vs running ADC directly via Fire (portA) no PaHub.<br />
<img src="/assets/uploads/files/1561799994413-m5muxadc00.jpg" alt="0_1561799990671_M5MuxADC00.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">So using ADC via PaHub reading ~ 2610 (Int), using ADC to Port A directly ~ 3120 (int), 1.2 VDC battery connected to ADC.</p>
<p dir="auto">I'm aware that I2c pullUp resisters exist on HUB &amp; ADC,  in parallel (total ~ &gt; 3 kOhm), which should be ok.</p>
<p dir="auto">Any thoughts would be appreciated..</p>
<p dir="auto">Cheers</p>
<pre><code>/*
    hardware: M5Stack Fire, unit's --&gt; M5 Mux (TCA9548A) + ADC (ADS1100)
    test00: connecting ADS board to TCA9548A then to M5 Stack Fire (port A)
    test01: TCA connected directly into Fires port A, not via TCA9548A
    connect: PORTA(21, 22)
*/

#include &lt;Wire.h&gt;

// ADS1100 I2C address is 0x48
// TCA9548A I2C address is 0x70

#define ADC_Addr 0x48
#define MUX_Addr 0x70

//Hub range is 0 to 5
//Select port on mux 0-5
void muxPortSelect(uint8_t i) {
  if (i &gt; 5) return;

  Wire.beginTransmission(MUX_Addr);
  Wire.write(1 &lt;&lt; i);
  Wire.endTransmission();
}

void setup()
{
  int error = 0;
  // Initialise I2C communication as MASTER
  Wire.begin();
  // Initialise Serial Communication, set baud rate = 115200
  Serial.begin(115200);

  // Set Mux channel
  muxPortSelect(0);  // &lt;--- Comment out and plug ADC directly into port A

  // Set ADC
  Wire.beginTransmission(ADC_Addr);
  // Continuous conversion mode, 8 SPS, 1PGA
  //Wire.write(0x0C);
  // Stop I2C Transmission
  error = Wire.endTransmission();
  if (error == 0) {
    Serial.println("OK we have ok");
  } else {
    Serial.println("No Good -- Bummer");
  }
  delay(100);
}

void loop()
{
  unsigned int data[2];

  // Request 2 bytes of data
  Wire.requestFrom(ADC_Addr, 2);

  // Read 2 bytes of data
  // raw_adc msb, raw_adc lsb
  if (Wire.available() == 2)
  {
    data[0] = Wire.read();
    data[1] = Wire.read();
  }

  // Convert the data
  float raw_adc = (data[0] * 256.0) + data[1];
  if (raw_adc &gt; 32767)
  {
    raw_adc -= 65536;
  }

  // Output data to serial monitor
  Serial.print("Digital Value of Analog Input : ");
  Serial.println(raw_adc);

  delay(300);
}
</code></pre>
]]></description><link>https://community.m5stack.com/topic/1107/solved-fire-pahub-adc-ads1100</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 06:01:20 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1107.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Jun 2019 06:07:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Solved]Fire, PaHUB, &amp; ADC (ADS1100) on Sat, 29 Jun 2019 14:45:33 GMT]]></title><description><![CDATA[<p dir="auto">Nice find.<br />
Just reached my knowledge of i2c and yeh found that the pullups have bee put on the hubs i2c lines as well as the line to the M5Stack port a.<br />
nice but of bug fixing.<br />
Just don't forget to put them back if you want to connect the ADC directly to the M5stack in future.</p>
]]></description><link>https://community.m5stack.com/post/4729</link><guid isPermaLink="true">https://community.m5stack.com/post/4729</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 29 Jun 2019 14:45:33 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]Fire, PaHUB, &amp; ADC (ADS1100) on Sat, 29 Jun 2019 13:56:57 GMT]]></title><description><![CDATA[<p dir="auto">Solved...</p>
<p dir="auto">Remove 4.7K Ohm pull up's from i2c lines!, un-soldered from ADC (Mux resistors were too small/difficult to get to) would have liked to remove resistors from Mux as possible issue will also effect other connected units.</p>
<p dir="auto"><img src="/assets/uploads/files/1561814833239-adc00.jpg" alt="0_1561814829552_ADC00.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/4727</link><guid isPermaLink="true">https://community.m5stack.com/post/4727</guid><dc:creator><![CDATA[mick]]></dc:creator><pubDate>Sat, 29 Jun 2019 13:56:57 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]Fire, PaHUB, &amp; ADC (ADS1100) on Fri, 28 Jun 2019 00:54:39 GMT]]></title><description><![CDATA[<p dir="auto">sorry for reply too later, i will go to test</p>
]]></description><link>https://community.m5stack.com/post/4712</link><guid isPermaLink="true">https://community.m5stack.com/post/4712</guid><dc:creator><![CDATA[heybin]]></dc:creator><pubDate>Fri, 28 Jun 2019 00:54:39 GMT</pubDate></item></channel></rss>