<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/</id><updated>2021-04-01T08:02:55.074000Z</updated><subtitle>Recent posts to MCP3008 Lib to MCP3208</subtitle><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#9df0/70b9" rel="alternate"/><published>2021-04-01T08:02:55.074000Z</published><updated>2021-04-01T08:02:55.074000Z</updated><author><name>laruso</name><uri>https://forge.codesys.com/u/laruso/</uri></author><id>https://forge.codesys.comf89f4260fd64215fc6d5a35e632f340f528578d5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Wouldn't it be enough to shift 6 digits instead of only 4 digits and leave the code as it is?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nv"&gt;old&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nv"&gt;original&lt;/span&gt; &lt;span class="nv"&gt;code&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;      &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;      &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;1&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="sc"&gt;#80&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;SHL&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;usiChannel&lt;/span&gt; &lt;span class="nv"&gt;AND&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;, &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;      &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;2&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;;   &lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nv"&gt;changed&lt;/span&gt; &lt;span class="nv"&gt;code&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;MCP3208&lt;/span&gt;
        &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;1&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="sc"&gt;#80&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;SHL&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;usiChannel&lt;/span&gt; &lt;span class="nv"&gt;AND&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;, &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;2&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;;   &lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; &lt;span class="nv"&gt;new&lt;/span&gt; &lt;span class="nv"&gt;code&lt;/span&gt;

      &lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;NOT&lt;/span&gt; &lt;span class="nv"&gt;transfer&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pabyTxBuffer&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;aby&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; , &lt;span class="nv"&gt;pabyRxBuffer&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;aby&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; , &lt;span class="nv"&gt;udiLen&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; , &lt;span class="nv"&gt;uiDelayus&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
         &lt;span class="nv"&gt;_iState&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
      &lt;span class="nv"&gt;END_IF&lt;/span&gt;
      &lt;span class="nv"&gt;ui&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;2&lt;/span&gt;]&lt;span class="c1"&gt;;&lt;/span&gt;
      &lt;span class="nv"&gt;ui&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ui&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;BYTE_TO_UINT&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;1&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;AND&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="sc"&gt;#1111&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
      &lt;span class="nv"&gt;auiValue&lt;/span&gt;[&lt;span class="nv"&gt;usiChannel&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ui&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The Tx part has to be changed, because the transmitted data is shifted in relation to the 10-bit chip. But why do "AND 2#1111" to the received Rx part? Can you please explain?&lt;/p&gt;
&lt;p&gt;I know for right now, that also the bit length is 12 instead of 10, with the MCP32 series. But the library for the MCP3202 don't have any other code for received data. Can anybody explain?&lt;/p&gt;
&lt;p&gt;I did the changes mentioned in your post to a MCP3204 and didn't get some data put of it, yet. Everything I have to do additionally is to reduce the amount of channels from 0...7 to 0...3. The code in this section/method for the MCP3204 should look like this?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;_iState&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;

    &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="nv"&gt;usiChannel&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;TO&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="k"&gt;DO&lt;/span&gt;
        &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;1&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="sc"&gt;#80&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;SHL&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;usiChannel&lt;/span&gt; &lt;span class="nv"&gt;AND&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;, &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;2&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;;            &lt;/span&gt;

        &lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;NOT&lt;/span&gt; &lt;span class="nv"&gt;transfer&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pabyTxBuffer&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;aby&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; , &lt;span class="nv"&gt;pabyRxBuffer&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;aby&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; , &lt;span class="nv"&gt;udiLen&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; , &lt;span class="nv"&gt;uiDelayus&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
            &lt;span class="nv"&gt;_iState&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;END_IF&lt;/span&gt;

        &lt;span class="nv"&gt;ui&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;2&lt;/span&gt;]&lt;span class="c1"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;ui&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ui&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;BYTE_TO_UINT&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;aby&lt;/span&gt;[&lt;span class="mi"&gt;1&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;AND&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="sc"&gt;#1111&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;auiValue&lt;/span&gt;[&lt;span class="nv"&gt;usiChannel&lt;/span&gt;] :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ui&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;END_FOR&lt;/span&gt;     
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And additionally change the device description. Isn't it?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#3084" rel="alternate"/><published>2020-05-18T09:53:16.842000Z</published><updated>2020-05-18T09:53:16.842000Z</updated><author><name>phenixrb</name><uri>https://forge.codesys.com/u/phenixrb/</uri></author><id>https://forge.codesys.com5a8c076ed9a82c89cd9eab014e97f34877ee5f3e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hello everyone, hope you are well.&lt;/p&gt;
&lt;p&gt;I come back to you concerning the MCP3208,&lt;br/&gt;
after making the changes to go from MCP3008 to MCP3208, seen earlier in the post.&lt;br/&gt;
first, the modifications work well with the MCP3208, I receive many values of the chips.&lt;/p&gt;
&lt;p&gt;my problem: I would like to use two MCP3208 chips.&lt;br/&gt;
I noticed that in the lib for MCP3008 or now MCP3208,&lt;br/&gt;
it is not possible to choose the hardware address, as it is possible to do for MCP23S17 chips.&lt;br/&gt;
and so I can only use one MCP3208 chip.&lt;/p&gt;
&lt;p&gt;thanks for any help.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#afb3" rel="alternate"/><published>2020-02-27T15:26:01.378000Z</published><updated>2020-02-27T15:26:01.378000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com9767757162bb4b7a0417ce8d939b30d8c249c129</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; phenixrb&lt;/p&gt;
&lt;p&gt;"&lt;span&gt;[quote="I-Campbell"]&lt;/span&gt;Hi, phenixrb.&lt;br/&gt;
 Did you install the device description to CODESYS using Tools &amp;gt; Device Repository?  I copied your device description image out to file, then added it to my device repository, then it came up when I went to add a device to my master.&lt;/p&gt;
&lt;p&gt;It looks OK."&lt;/p&gt;
&lt;p&gt;HI I-Campbell,&lt;br/&gt;
thank you, i hadn't done that!&lt;br/&gt;
it works better now .... &lt;/p&gt;
&lt;p&gt;I bought two MCP2308 chips, and now I have to test this in real life.&lt;br/&gt;
with a second activated SPI: SPI-1 with 2 CS, cs1.0 and cs.1.1&lt;br/&gt;
I keep SPI-0 for MCP23S17, with 1 CS,&lt;br/&gt;
since chips have physical addresses, 1 CS is sufficient.&lt;/p&gt;
&lt;p&gt;Regarding FORGE, I'm going to look at how to make the driver available to others, it's new to me.&lt;br/&gt;
and above all I do not claim to have created the driver.&lt;br/&gt;
I took the explanations of the other participants on this post,&lt;br/&gt;
and I just did a program test on the raspberry.&lt;br/&gt;
also, comments are welcome.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#801e" rel="alternate"/><published>2020-02-27T15:26:00.684000Z</published><updated>2020-02-27T15:26:00.684000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com1ff30ded26b0f7a5beeef4e83d8f0603ea6b883e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, phenixrb.&lt;br/&gt;
 Did you install the device description to CODESYS using Tools &amp;gt; Device Repository?  I copied your device description image out to file, then added it to my device repository, then it came up when I went to add a device to my master.&lt;/p&gt;
&lt;p&gt;It looks OK.&lt;/p&gt;
&lt;p&gt;Will you upload to forge?&lt;br/&gt;
I have already registered your device ID here:&lt;br/&gt;
&lt;a class="" href="https://forge.codesys.com/drv/io-drivers/database/Home/"&gt;https://forge.codesys.com/drv/io-drivers/database/Home/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next step for you would be to :&lt;br/&gt;
1. register, then make a new io driver project here:&lt;br/&gt;
&lt;a class="" href="https://forge.codesys.com/drv/add_project"&gt;https://forge.codesys.com/drv/add_project&lt;/a&gt;&lt;br/&gt;
By convention, Either MCP3208 or SPI MCP3208 as the name, and mcp3208 as the URL&lt;br/&gt;
2. update the diver ID register (my first link of this post) to this newly created homepage url&lt;br/&gt;
3. Perhaps duplicate and reword the wiki from the MCP3008 project.  I notice you handle your IO differently though, so proofread and make sure it make sense for your implementation.  (You can get the source by clicking History &amp;gt; select r19 as v1 and r20 as V2 then hitting compare)&lt;br/&gt;
4. Perhaps use cForge tool to create a package of your two files, .library and .xml&lt;br/&gt;
5. select a license and add it's file to your project&lt;br/&gt;
6. check it into your project's code repository&lt;br/&gt;
7. (Optional) invite others to critque&lt;/p&gt;
&lt;p&gt;let me know how I can help.  I look forward to seeing you get your first driver up on the forge.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Screen Shot 2020" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=5181"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#057b" rel="alternate"/><published>2020-02-27T15:25:58.733000Z</published><updated>2020-02-27T15:25:58.733000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com90e305bd4c09f89f0af91a603f1174d053b0902e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; phenixrb&lt;/p&gt;
&lt;p&gt;Hello everyone ,&lt;/p&gt;
&lt;p&gt;can you tell me if the procedure is good regarding:&lt;br/&gt;
the modification of the MCP3008 library to MCP3208 ?&lt;/p&gt;
&lt;p&gt;I used the MCP3008 files as a base.&lt;/p&gt;
&lt;p&gt;I modified "AfterReadInputs" as indicated in the post,&lt;br/&gt;
replaced "MCP3008" by "MCP3208" in all the other files in the library.&lt;br/&gt;
save as a "compiled library" named MCP3208 and installed in the "library repository".&lt;/p&gt;
&lt;p&gt;then I modified the "xml" file from MCP3008 to MCP3208.&lt;br/&gt;
following the indications of FORGE.&lt;/p&gt;
&lt;p&gt;are there any errors?&lt;/p&gt;
&lt;p&gt;is it possible to have an open source driver in the device list?&lt;br/&gt;
because, for the moment it does not appear in the list.&lt;br/&gt;
if so, what is the procedure?&lt;/p&gt;
&lt;p&gt;thank you&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: device mcp3208 xml.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=5127"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: enregistrement bibliothèque.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=5126"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: LISTE CHOIX APPAREILS.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=5125"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#7439" rel="alternate"/><published>2020-02-27T15:25:58.038000Z</published><updated>2020-02-27T15:25:58.038000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comde8a5906e39e4b216e906ae0826dd766712d1cef</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; phenixrb&lt;/p&gt;
&lt;p&gt;hello Edwin,&lt;/p&gt;
&lt;p&gt;thank you for that clarification ,&lt;br/&gt;
is the information described in this post sufficient to adapt the MCP3008 device to MCP3208?&lt;/p&gt;
&lt;p&gt;and best wishes for this new year.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#8ffd" rel="alternate"/><published>2020-02-27T15:25:57.339000Z</published><updated>2020-02-27T15:25:57.339000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com2a43de2752caad45c010d20ee1d16eadfb47f4e4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
the difference on these two device descriptions,&lt;br/&gt;
_IO offers additional the mapping page, to map variables.&lt;br/&gt;
So use either the one or the other.&lt;br/&gt;
( without _io you get the values from MCP3008.auiValue&lt;span&gt;[0]&lt;/span&gt; see the example project)&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: IncludeIIOMapping.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=5117"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#c270" rel="alternate"/><published>2020-02-27T15:25:55.415000Z</published><updated>2020-02-27T15:25:55.415000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com5021cda3913d561de10c8da6dc2221cc71b73e12</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; phenixrb&lt;/p&gt;
&lt;p&gt;Good morning all ,&lt;/p&gt;
&lt;p&gt;I want to try to modify, the device MCP3008 to MCP3208, using the information described in this post.&lt;br/&gt;
I find two DEVICES for MCP3008, in "CODESYS Control for Raspberry PI" "3.5.15.20":&lt;br/&gt;
MCP3008.devdesc&lt;br/&gt;
MCP3008_IO.devdesc&lt;/p&gt;
&lt;p&gt;should both be changed?&lt;br/&gt;
thank you&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#e1ed" rel="alternate"/><published>2020-02-27T15:25:54.734000Z</published><updated>2020-02-27T15:25:54.734000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comc053408f7ef3cb776d6d0c567094a8f62e451336</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; phenixrb&lt;/p&gt;
&lt;p&gt;Hello everyone ,&lt;br/&gt;
can you explain to me how to integrate the MCP3208 library in a project.&lt;br/&gt;
or how to modify the existing MCP3008 library from codesys to MCP3208?&lt;/p&gt;
&lt;p&gt;I can use the examples explained in this post, but impossible for me to integrate it into a complete project.&lt;/p&gt;
&lt;p&gt;I wish to be able to use the 8 inputs.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 Lib to MCP3208</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9112cbdb0a/?limit=25#6b83" rel="alternate"/><published>2020-02-27T15:25:54.048000Z</published><updated>2020-02-27T15:25:54.048000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comdad536f721b5c589c4dc464c0865063d8f186ab6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Joseph Sen Krobin&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;yyannekk hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi backflip&lt;br/&gt;
Thank you for sharing your code! Helped me alot. I'm now also able to get data from an MCP3208&lt;br/&gt;
Now my problem is I want to communicate with a totally different DAC, the MCP4922 (data sheet &lt;a class="" href="http://akizukidenshi.com/download/MCP4922.pdf" rel="nofollow"&gt;http://akizukidenshi.com/download/MCP4922.pdf&lt;/a&gt;). It's  a write-only device.&lt;br/&gt;
Now I think I just need to apply the datasheets SPI definition into the code (i.e. extend the BeforeWriteOutputs method). However this is not an easy task, as I'm pretty new to SCL programming. The sample SPI_MCP23S17 seems to be interesting, however with my limited knowledge it's also not easy (impossible) to understand.&lt;br/&gt;
Can you give me some hints on how to proceed? Maybe direct me to some other examples, or literature?&lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;</summary></entry></feed>