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.
mcp47x6 DAC
-
- Posts: 14
- http://meble-kuchenne.info.pl
- Joined: Tue Dec 15, 2020 6:16 pm
- Been thanked: 1 time
mcp47x6 DAC
- Attachments
-
- dac4xtest_FC8.fcfx
- (15.86 KiB) Downloaded 10 times
-
- dac4xtest_FC10.fcfx
- (17.81 KiB) Downloaded 10 times
Re: mcp47x6 DAC
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.
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: mcp47x6 DAC
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.
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
Re: mcp47x6 DAC
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
Re: mcp47x6 DAC
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.
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: mcp47x6 DAC
Hi.
I have just tested my MCP4725 on an UNO and results are great.
The DAC was tracking the POT value really well. 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.
I have just tested my MCP4725 on an UNO and results are great.
The DAC was tracking the POT value really well. 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
Re: mcp47x6 DAC
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?
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?
Re: mcp47x6 DAC
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.
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.