Hello,
of course I have inserted pull up resistors. You must always use these with i2c.
The bug is also understandable in the simulation, by using alternately once pwm
or once dac as output.
regards
Dirk
Problem with DAC MCP41x6
-
- Posts: 61
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 10, 2020 3:55 pm
- Been thanked: 4 times
-
- Matrix Staff
- Posts: 1763
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 448 times
- Been thanked: 607 times
Re: Problem with DAC MCP41x6
Hi Dirk,
I'm having a look now, I assume you mean the MCP47x6 DAC component.
Have you checked the user address bits property matches the address of the device?
Might be worth trying the I2C scanner program and seeing if that can see the device and confirm its address.
https://www.flowcode.co.uk/wiki/index.p ... ss_Scanner
I'm having a look now, I assume you mean the MCP47x6 DAC component.
Have you checked the user address bits property matches the address of the device?
Might be worth trying the I2C scanner program and seeing if that can see the device and confirm its address.
https://www.flowcode.co.uk/wiki/index.p ... ss_Scanner
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Problem with DAC MCP41x6
Hi Ben,
Of course I have always installed pullup resistors. Other I2C devices work properly. It still does not work. Because program becomes extremely slow and I get no output on the DAC. With pwm the speed is about 10 times or more as fast. You can see this very well in my program once PWM and then DAC is used as output.
regrds
Dirk
Of course I have always installed pullup resistors. Other I2C devices work properly. It still does not work. Because program becomes extremely slow and I get no output on the DAC. With pwm the speed is about 10 times or more as fast. You can see this very well in my program once PWM and then DAC is used as output.
regrds
Dirk
Re: Problem with DAC MCP41x6
Of course I have installed pullup resistors.
Other I2C devices work properly. The drastic drop in the speed of the program can be seen very well in my small program by using the DAC and then the PWM as output. The speed with dac is 10 - 20 times slower than with pwm.
Please get one of these dac's and you will see that there is also no output on the DAC.
Dirk
Other I2C devices work properly. The drastic drop in the speed of the program can be seen very well in my small program by using the DAC and then the PWM as output. The speed with dac is 10 - 20 times slower than with pwm.
Please get one of these dac's and you will see that there is also no output on the DAC.
Dirk
Re: Problem with DAC MCP41x6
Of course I have installed pullup resistors.
Other I2C devices work properly. The drastic drop in the speed of the program can be seen very well in my small program by using the DAC and then the PWM as output. The speed with dac is 10 - 20 times slower than with pwm.
Please get one of these dac's and you will see that there is also no output on the DAC.
Dirk
Other I2C devices work properly. The drastic drop in the speed of the program can be seen very well in my small program by using the DAC and then the PWM as output. The speed with dac is 10 - 20 times slower than with pwm.
Please get one of these dac's and you will see that there is also no output on the DAC.
Dirk
-
- Matrix Staff
- Posts: 1474
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 522 times
- Been thanked: 476 times
Re: Problem with DAC MCP41x6
Hi Dirk.
It sounds like you could have got the address wrong with the properties, which is causing blocking timing issues with PWM.
Yes, you do set the address within properties, but they have to match the address preset within the hardware.
The MCP47x6 datasheet states:
Note: Address Bits (A2:A0) specified at time of device
order
So the address can be any 1 of the 8 addresses.
So you might be selecting a different address that the chip is set to.
What you will need to do is find out what the actual address is.
If you have a logic analyser, scope, or USB to UART converter then the I2C address finder/sniffer[/url] will show you what the correct address is.
Without using one, I don't think you will get any further.
This is what Ben has also suggested.
My guess is you are using FC9 so this should work.
As you have not used a 9 or 10 post icon I can't post a link to the sniffer on the Wiki as that is for FC10.
I will be deleting your duplicated posts to tidy up this topic.
It sounds like you could have got the address wrong with the properties, which is causing blocking timing issues with PWM.
Yes, you do set the address within properties, but they have to match the address preset within the hardware.
The MCP47x6 datasheet states:
Note: Address Bits (A2:A0) specified at time of device
order
So the address can be any 1 of the 8 addresses.
So you might be selecting a different address that the chip is set to.
What you will need to do is find out what the actual address is.
If you have a logic analyser, scope, or USB to UART converter then the I2C address finder/sniffer[/url] will show you what the correct address is.
Without using one, I don't think you will get any further.
This is what Ben has also suggested.
My guess is you are using FC9 so this should work.
As you have not used a 9 or 10 post icon I can't post a link to the sniffer on the Wiki as that is for FC10.
I will be deleting your duplicated posts to tidy up this topic.
Martin
Re: Problem with DAC MCP41x6
Hello,
I have replied many times but my answers are not showing. No idea why that is. Of course have installed pullup resistors, otherwise the i2c devices do not work. The speed of the program is 10 times slower with i2c DAC than with PWM. You can see this very well with my small program. Please get a MPC4716 and connect it. Also there is no output on the DAC. In the simulation there is an output. In the simulation the program is also 10 times slower. I have absolutely no idea what this can be.
Dirk
I have replied many times but my answers are not showing. No idea why that is. Of course have installed pullup resistors, otherwise the i2c devices do not work. The speed of the program is 10 times slower with i2c DAC than with PWM. You can see this very well with my small program. Please get a MPC4716 and connect it. Also there is no output on the DAC. In the simulation there is an output. In the simulation the program is also 10 times slower. I have absolutely no idea what this can be.
Dirk