Dear All:
I have problems with digital potentiometer MCP41010, I need to set 3 steps, 0 for 0 kOhms, 128 for 5 kohms and 3 for 10 kohms, but I not sure if pin connections and configurations are OK
PIC16F877A
XT
8 MHz
Cs RC7
Sck RC3
SDI RC5
Thanks
MCP41010 Digital Pot
- Benj
- Matrix Staff
- Posts: 14373
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4447 times
- Been thanked: 4150 times
- Contact:
Re: MCP41010 Digital Pot
Hello,
Having a quick look at your program you are not manipulating the CS output. You should use an output icon to do this as fitting with the timing diagrams on the device datasheet.
Your other pin connections look to be correct.
I would output a 1 on RC7 before the SPI init and then output a 0 just before you send the 2 bytes then output a 1 again before the 5 second delay. Hopefully this should allow the device to work.
Having a quick look at your program you are not manipulating the CS output. You should use an output icon to do this as fitting with the timing diagrams on the device datasheet.
Your other pin connections look to be correct.
I would output a 1 on RC7 before the SPI init and then output a 0 just before you send the 2 bytes then output a 1 again before the 5 second delay. Hopefully this should allow the device to work.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: MCP41010 Digital Pot
I added 1 icon to control Cs pin, now it works excellent
Thanks
Thanks
- Rating: 5.26%
-
-
- Posts: 88
- Joined: Wed Jul 04, 2012 11:21 pm
- Has thanked: 37 times
- Been thanked: 12 times
- Contact:
Re: MCP41010 Digital Pot
Hello ,
I am trying to control an MCP41010 device.
Since it is the first time i am using the SPI communication, is there any example for in flow code for this device?
I cannot understand which three pins are supposed to handle the SPI. Is it RC6 and RC7 and what is the third?
Thanks in advance
George
I am trying to control an MCP41010 device.
Since it is the first time i am using the SPI communication, is there any example for in flow code for this device?
I cannot understand which three pins are supposed to handle the SPI. Is it RC6 and RC7 and what is the third?
Thanks in advance
George
- Benj
- Matrix Staff
- Posts: 14373
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4447 times
- Been thanked: 4150 times
- Contact:
Re: MCP41010 Digital Pot
Hello George,
This should help to get you started with SPI.
http://www.matrixtsl.com/blog/simplifie ... c-and-spi/
This should help to get you started with SPI.
http://www.matrixtsl.com/blog/simplifie ... c-and-spi/
- Rating: 5.26%
-
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 88
- Joined: Wed Jul 04, 2012 11:21 pm
- Has thanked: 37 times
- Been thanked: 12 times
- Contact:
Re: MCP41010 Digital Pot
Hi Benj, i finally managed to implement potentiometers wiper position control therefore i can control the output resistance.
Thank You very much!
Thank You very much!
- Rating: 5.26%
-