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!

sort by: active | newest | oldest
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:
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.
Are you looking for a high efficiency circuit, or just something that works ? Steve
Directly, it can drive a couple of standard LEDs - the kind that need a few mA to run. Otherwise, you would need to build something.

How much current did you want ?

Use a PWM port, filter that to DC, then add a single op amp as a voltgae to current converter.
orksecurity7 years ago
Not directly. You would have to build a digitally-controlled current regulator, and then use the AVR to control that.