Need a string of Arduino code to control digital pot
$10-30 USD
Terminado
Publicado hace más de 5 años
$10-30 USD
Pagado a la entrega
Hi, I need a string of Arduino code to control a digital trim pot (model AD5206, datasheet here: [login to view URL]).
I need it to set the following values on its six outputs:
W1: 10K.
W2: 10K.
W3: 5K.
W4: 1K.
W5: 3K.
W6: 300R.
I know that I can set values between 0 .. 255 with the following command:
[login to view URL](output);
[login to view URL](value);
But it only delivers relevant value, and what I need is actual resistance, like a real trim pot. Ready to test your code right away.
Thanks!
I have derived equation from datasheet you refer , So, Resistance of port B to W is:
#define RW 45 //wipercontact resistance
#define RBA 10000 //resistance from pin B to A
int R // This is resistance you are looking for
int value = (R - RW)/RBA * 256 // 256 is max value of 8 bit
$15 USD en 1 día
4,9 (69 comentarios)
6,2
6,2
10 freelancers están ofertando un promedio de $18 USD por este trabajo
Dear sir
I have more than 10 years experience in embedded systems design, please check my profile please message me so that We can discuss
Best regards