<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Testing the Microchip MCP3421 18-bit ADC</title><link>/members-area/personalblogs/b/frank-milburn-s-blog/posts/testing-the-microchip-mcp3421-18-bit-adc</link><description>I have what seems to be a continuously ongoing project to measure low resistances with milliohm precision. The latest version had an inexpensive voltmeter that used the Microchip MCP3421 MCP3421 in the display. The chip costs $2.39 in smal...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Testing the Microchip MCP3421 18-bit ADC</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/testing-the-microchip-mcp3421-18-bit-adc</link><pubDate>Tue, 23 Feb 2021 18:10:58 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:28b4100e-f801-4693-94c3-27b10cbdc423</guid><dc:creator>Andrew J</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Thanks Frank - actually, I wanted to pick your brains if you were using the same one - which you are!&amp;nbsp; I was trying to understand how these three methods worked:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=uint8_t+MCP342x%3A%3AgeneralCallReset%28void%29]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;beginTransmission&lt;/span&gt;(&lt;span&gt;0x00&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;write&lt;/span&gt;(&lt;span&gt;0x06&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&lt;span&gt;return&lt;/span&gt; &lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;endTransmission&lt;/span&gt;();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span&gt;uint8_t&lt;/span&gt; &lt;span&gt;MCP342x&lt;/span&gt;::&lt;span&gt;generalCallLatch&lt;/span&gt;(&lt;span&gt;void&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;beginTransmission&lt;/span&gt;(&lt;span&gt;0x00&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;write&lt;/span&gt;(&lt;span&gt;0x04&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&lt;span&gt;return&lt;/span&gt; &lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;endTransmission&lt;/span&gt;();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span&gt;uint8_t&lt;/span&gt; &lt;span&gt;MCP342x&lt;/span&gt;::&lt;span&gt;generalCallConversion&lt;/span&gt;(&lt;span&gt;void&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;beginTransmission&lt;/span&gt;(&lt;span&gt;0x00&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;write&lt;/span&gt;(&lt;span&gt;0x08&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&lt;span&gt;return&lt;/span&gt; &lt;span&gt;Wire&lt;/span&gt;.&lt;span&gt;endTransmission&lt;/span&gt;();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Transmitting to address 0 is a broadcast: i.e. to all devices on the bus.&amp;nbsp; I would assume this code is written on the basis that there is nothing but one or more MCP342X devices on the bus.&amp;nbsp; In each case it follows with a byte which sets the configuration register for the device:&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://ww1.microchip.com/downloads/en/DeviceDoc/22226a.pdf" rel="nofollow ugc noopener" target="_blank"&gt;Page 18 of the datasheet&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x108/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-28b4100e-f801-4693-94c3-27b10cbdc423/8308.contentimage_5F00_207418.png:620:108]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;So, taking generalCallReset() as an example, it writes 0x06 or 00000110 so sets S0 and G1 (60SPS/14-bits and x2 Gain).&amp;nbsp; S1/S0 are the Sample Rate Selection bits and G1 and G0 are the Gain Selection bits. I&amp;#39;m not sure that makes sense unless the &amp;#39;default&amp;#39; configuration is meant to be that - all the examples call this method at the start.&amp;nbsp; That doesn&amp;#39;t really make sense and neither do the bytes used in the other two methods.&amp;nbsp; &lt;/p&gt;&lt;p&gt;generalCallLatch() sends byte 00000100 (Sets S0 so 60SPS)&lt;/p&gt;&lt;p&gt;generalCallConversion() sends byte 00001000 (Sets S1 so 15SPS)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;There&amp;#39;s no documentation/comments for these methods so I was wondering what I was misunderstanding.&amp;nbsp;&amp;nbsp; I have no need or intention of broadcasting but I&amp;#39;d still like to understand these methods.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any ideas?&lt;/p&gt;&lt;/div&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10879&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Testing the Microchip MCP3421 18-bit ADC</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/testing-the-microchip-mcp3421-18-bit-adc</link><pubDate>Tue, 23 Feb 2021 17:37:38 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:28b4100e-f801-4693-94c3-27b10cbdc423</guid><dc:creator>Andrew J</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Frank, which library did you use?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10879&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Testing the Microchip MCP3421 18-bit ADC</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/testing-the-microchip-mcp3421-18-bit-adc</link><pubDate>Tue, 23 Feb 2021 06:26:18 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:28b4100e-f801-4693-94c3-27b10cbdc423</guid><dc:creator>navadeepganeshu</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Did you put that small ceramic capacitor on the power supply rail from -ve to -ve? &lt;/p&gt;&lt;p&gt;Misplacement or what does it do there? &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10879&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Testing the Microchip MCP3421 18-bit ADC</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/testing-the-microchip-mcp3421-18-bit-adc</link><pubDate>Mon, 22 Feb 2021 22:50:51 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:28b4100e-f801-4693-94c3-27b10cbdc423</guid><dc:creator>Andrew J</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;#39;m waiting for the delivery of a PCB to use a MC3428 - 16-bit delta-sigma ADC.&amp;nbsp; It will be interesting to see how well that turns out.&amp;nbsp; The good thing about the ADC, compared to the DMM, is that you could characterise the INL and DNL errors and calibrate them out in software, at least to a certain extent.&amp;nbsp; Partly it can be done dynamically and partly with a lookup table although the latter isn&amp;#39;t great for a memory constrained device like an Arduino of course.&amp;nbsp; I think there&amp;#39;s lots of scope for playing with the one soldered on to a DIP adapter? &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-28b4100e-f801-4693-94c3-27b10cbdc423/contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10879&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Testing the Microchip MCP3421 18-bit ADC</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/testing-the-microchip-mcp3421-18-bit-adc</link><pubDate>Mon, 22 Feb 2021 20:07:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:28b4100e-f801-4693-94c3-27b10cbdc423</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice find.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10879&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Testing the Microchip MCP3421 18-bit ADC</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/testing-the-microchip-mcp3421-18-bit-adc</link><pubDate>Mon, 22 Feb 2021 15:46:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:28b4100e-f801-4693-94c3-27b10cbdc423</guid><dc:creator>genebren</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;It will interesting to see how the MCP3421 works in your milliohm meter.&amp;nbsp; Good luck!&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10879&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>