Need a string of Arduino code to control digital pot
$10-30 USD
Concluído
Publicado há quase 6 anos
$10-30 USD
Pago na 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 em 1 dia
4,9 (69 avaliações)
6,2
6,2
10 freelancers estão ofertando em média $18 USD for esse trabalho
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