mcp47x6 DAC

Any bugs you encounter with Flowcode should be discussed here.
bdjbuster
Posts: 14
http://meble-kuchenne.info.pl
Joined: Tue Dec 15, 2020 6:16 pm
Been thanked: 1 time

mcp47x6 DAC

Post by bdjbuster »

Hello,

I just created a program for the MCP47x6 with Flowcode 10, but when I upload it, it doesn't work. However, if I create the same program with Flowcode 8, it works fine.
Attachments
dac4xtest_FC8.fcfx
(15.86 KiB) Downloaded 10 times
dac4xtest_FC10.fcfx
(17.81 KiB) Downloaded 10 times

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: mcp47x6 DAC

Post by medelec35 »

Hello.
Thank you for letting us know.
We will look in to this as soon as we can.
Martin

bdjbuster
Posts: 14
Joined: Tue Dec 15, 2020 6:16 pm
Been thanked: 1 time

Re: mcp47x6 DAC

Post by bdjbuster »

Hello Martin, thank you for your response. Could you give me an indication of when you might be able to get to it? That way, I’ll know whether I should wait for it or try another way to get it working.

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: mcp47x6 DAC

Post by medelec35 »

Hello.
In what way does it not work, does microcontroller freeze, or just no output etc.
Have you tried with just one singe DAC?
I would suggest sending a string or outputting to an LED within main to see if Microcontroller is looping or stopped.
Can you let me know how you get on.
Martin

bdjbuster
Posts: 14
Joined: Tue Dec 15, 2020 6:16 pm
Been thanked: 1 time

Re: mcp47x6 DAC

Post by bdjbuster »

Hi, I tried it with one DAC, but it still doesn't work. When I check the SDA with the oscilloscope, the communication looks very different compared to when I create the same program with Flowcode 8. With the oscilloscope, I can also see that the microcontroller is not freezing

bdjbuster
Posts: 14
Joined: Tue Dec 15, 2020 6:16 pm
Been thanked: 1 time

Re: mcp47x6 DAC

Post by bdjbuster »

Hello Martin, I have some additional information for you. I am using an MCP4725 in Flowcode 8, but there wasn't a separate component for it, so I used the MCP47X6, and that worked fine. When I open the program in Flowcode 10, it takes over. However, Flowcode 10 also includes the MCP4725. So I just tried using it, but unfortunately, it doesn't work either.

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: mcp47x6 DAC

Post by medelec35 »

Hello.
Thanks for the update.
My MCP4725 should be here within the next couple of days, so I will see if I can get that working.
Martin

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: mcp47x6 DAC

Post by medelec35 »

Hi.
I have just tested my MCP4725 on an UNO and results are great.
The DAC was tracking the POT value really well.
Results MCP4725.png
Results MCP4725.png (9.37 KiB) Viewed 303 times
I have attached the test project.

Potentiometer1 is connected to a Potentiometer.
Potentiometer2 is directly connected to the DAC.

If you can't get yours going, then try the address scanner to make sure your DAC is being detected.
You will need to change the target device and pins allocations.
Attachments
MCP 4725 DAC Uno FC10.fcfx
(19.73 KiB) Downloaded 5 times
Martin

bdjbuster
Posts: 14
Joined: Tue Dec 15, 2020 6:16 pm
Been thanked: 1 time

Re: mcp47x6 DAC

Post by bdjbuster »

Hi Martin,
Thanks for your response. It's still not working on my end with the four DACs I'm using. However, if I use a ready-made DAC, it does work with Flowcode 10. Also, when I use the I2C address scanner from the Arduino IDE, I don't get any response from the four DACs to indicate their addresses. But with Flowcode 8, my DACs work fine, and with Flowcode 10, they don’t.
So it seems that Flowcode 10 uses two-way communication with the DAC chips, whereas Flowcode 8 does not. In other words, the DACs I’m using can receive messages but aren’t capable of sending anything back.
Do you have any idea how we can solve this?

bdjbuster
Posts: 14
Joined: Tue Dec 15, 2020 6:16 pm
Been thanked: 1 time

Re: mcp47x6 DAC

Post by bdjbuster »

Hi Martin,
I found the problem. There was a fault in the PCB of my DAC: a 10 kΩ resistor was placed between the SDA and SCL lines. Because of that, the DAC was able to receive communication but not send any.
Apparently, Flowcode 10 requires feedback (return communication) to function correctly, whereas Flowcode 8 does not.
I removed the resistors, and now everything is working properly.
Thanks for your help, and my apologies for assuming the issue was with Flowcode 10.

Post Reply