I’m guessing that you figured this out already or don’t care any more. But in case you were wondering, you can use the GPIO pins, google around for this and there’s the “interrupt method”. Maybe the easiest if you don’t mind 10bit resolution would be to use the PWM with an optocoupler, like the LED dimming example. Then you could go right to the analog in pin. I guess it really depends on how fast you need to do it. 10 bit is 1024…so that would give you about… 800-20=780; 780/1024 = 0.76kHz per step.