In my solution i have to replace an 10 turn potentiometer ( 5 K Ohms ) with a digital circuit. the potentiometer is dividing a voltage between 4v to 21v. so it seems if i could generate a voltage between 4v to 21v with a Atmega8 or Atmega128 ( indeed it must meet high accuracy ) I'm done ! I have tried to use Digital potentiometer , but got in to 2 problems :
1 - first they can not stand the current going throw the potentiometer : (21-4)/5K = 3.4mA
2 - they don't have the required accuracy (21-4)/256 = 66 mV ( but i need 0.5mV)
Is there any way i could do this?