Hello, with a school friend I try a DAC MCP4921 with aArduino Micro to operate.
used this library: http://arduino.alhin.de/index.php?n=8
The DAC needs MOSI SCK and SS, apparently no miso …
After some searching pins from the micro only on the ISCP header, but the SS only at the pin header.
After several attempts I still can not measure the output voltage at the DAC.
Does anyone have experience with the block and could help me with the code? See you other Problems?
Here is my result so far:
#include <AH_MCP4921.h> // Bibliothek für 12Bit DAC MCP4921
apparently no miso ...
Since it's an output device it doesn't need to "talk back" and hence MISO is not required.
How have you wired it? Sketch or photo please.
Hi, Nick! I solved the problem independently.
Now I take the connectors from the normal pins, not the ICSP-Header.
Also, I had MISO and MOSI confused in the code and in the output.
It now works beautifully! Here is a photo with a dual DAC (MCP4922), which also works great,too
AH_MCP4922 AnalogOutput1(14,15,17,LOW,HIGH); //define AnalogOutput1 for MICRO_board, select DAC_A, Gain=1x
AH_MCP4922 AnalogOutput2(14,15,17,HIGH,LOW); //define AnalogOutput2 for MICRO_board, select DAC_B, Gain=2x