0-20mv power
One option is to employ a digital potentiometer, use 5V voltage reference and reduce the digital potentiometer output from 0-5V to 0-20mV by 2-resistor voltage divider ..
Another option is to use a digital to analog converter and again reduce its output voltage form whatever it produces (0-5V, for example) to 0-20mV using 2-resitor voltage divider ..
In both cases, if required, you can use a rail-to-rail voltage buffer-follower to ensure that your 0-20mV voltage source behavies like a voltage source ie. it has very low output impedance ..
Regards,
IanP