<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Issue working with MCP4725 (Digital to Analog converter) and Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ede18d37d7/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ede18d37d7/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/ede18d37d7/</id><updated>2022-11-25T10:42:57.773000Z</updated><subtitle>Recent posts to Issue working with MCP4725 (Digital to Analog converter) and Raspberry Pi</subtitle><entry><title>Issue working with MCP4725 (Digital to Analog converter) and Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ede18d37d7/?limit=25#fa9c" rel="alternate"/><published>2022-11-25T10:42:57.773000Z</published><updated>2022-11-25T10:42:57.773000Z</updated><author><name>princessdvlk</name><uri>https://forge.codesys.com/u/princessdvlk/</uri></author><id>https://forge.codesys.comca93c5b6545a3fba5fb601d0004a85c8b8b5e1e2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everyone,&lt;/p&gt;
&lt;p&gt;I am facing an issue when working with MCP4725 and raspberry pi. I have downloaded the MCP4725 library from this forum. No matter what value I put in the MCP4725.xdacIn, the voltage is always at 0V.&lt;/p&gt;
&lt;p&gt;iDacValue : INT;&lt;br/&gt;
MCP4725.xdacIn := iDacValue; (screenshot = Issue DAC 1)&lt;/p&gt;
&lt;p&gt;I am using a hardware that has raspberry pi core. The Codesys version I am using is Ver3.5 SP17 Patch3. I tried putting 97 in I2C Bus Parameters for MCP4725 (screenshot = Issue DAC 2) based on a conversation thread here on this forum. But still, I am facing the same issue.&lt;/p&gt;
&lt;p&gt;I have been using ADC in I2C mode as well. I didn't face any problem with that as I got an example code for it. &lt;/p&gt;
&lt;p&gt;Am I facing this problem because I am using ADC and DAC with I2C at the same time?&lt;/p&gt;
&lt;p&gt;Could anyone please help me out? I am attaching the screenshots as well. &lt;/p&gt;
&lt;p&gt;It is also mentioned in the library method file 'AfterReadInputs' (screenshot = Issue DAC 3) that we must change wInfo&lt;span&gt;[0]&lt;/span&gt; to 16#60 from 16#40 if we want to write the values into DAC register and EEPROM. I guess these files are write protected. Do I have to change this value and if so how? I am unable to do that.&lt;/p&gt;
&lt;p&gt;Looking forward to your reply.&lt;/p&gt;
&lt;p&gt;Thanking you in advance.&lt;br/&gt;
Best Regards!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>