An inexpensive way to achieve a Digital to Analog Converter (DAC) with a Picaxe 14M. This uses R-2R resistor ladder. The tolerance of resistors is important, the more accurate, the better the results are.
I've used 100/200 ohms resitors 1% tolerance (quite common, out of the junk box).
Test code:
This is no invention, just a reiteration of a well known circuit.
I've used 100/200 ohms resitors 1% tolerance (quite common, out of the junk box).
Test code:
Code:
#picaxe 14M
for b0 = 0 to 63
pins = b0
wait 1
next b0
do:loop
Attachments
-
18.8 KB Views: 138
Last edited: