loading

Can i use an avr microprocessor to output a specific current?

if anyone has some arduino code or something for an attiny 13 it would help alot!

For complex solutions like this I find it is often best to use IC's designed for the job since they are cheap and really simplify the task. Here is an example that may suit your needs:
http://www.maxim-ic.com/app-notes/index.mvp/id/921
One chip shown there is about $1.10 and the other is $1.70, and since the chip is built for the purpose it usually does a good job and eliminates some possibilities for error.
Use a PWM port, filter that to DC, then add a single op amp as a voltgae to current converter.
orksecurity6 years ago
Not directly. You would have to build a digitally-controlled current regulator, and then use the AVR to control that.