I set up this board recently and it was a bit of a struggle. Here's what worked for me:
setup
1) Wire all of the pins on the front "bank" (opposite from the green screw pins) of the board to their corresponding pins on the Pi. There is also a jumper between AINCOM and AGND which may be left on (this is on my board; if there's no jumper, add that connection). Also add a connection from
2) Wire 5V to VCC and 5V to VREF on the right hand yellow bank of pins. Mine came with jumpers in, connecting 5V to 3.3V on both sides. Just shift them forward one and you're good to go.
3) Wire LEDB to DAC1 and LEDA to DAC0. Again, jumpers, so not necessary.
4) If you have jumpers in the right bank, remove the two jumpers connecting AD1 to LDR and AD0 to ADJ.
5) Download the code from here, unzip (you can get a free trial of winzip, which works nicely), and transfer to the pi using a jump drive. Once on the pi move it off the jump drive. I just moved it into the ~/Documents
directory.
6) Use the code given here in the command line of your pi to install bcm2835.
7) cd
into the folder that has the code downloaded in step 5 and cd into the DAC8532 folder. Type in make
, then sudo ./dac832_test
. If this doesn't work, run chmod +x dac8532_test
then the above. If that doesn't work, add sudo
to your call to chmod
. If that doesn't work, look at some of the solutions here in the comments.
At this point, the LEDs on the board should blink (item 7 was to run a test file) and your board is properly setup.
python use
1) install required packages - do sudo apt-get update
then sudo apt-get install python-dev
. On my Pi this was automatically installed. Other packages to install:
sudo apt-get install python-rpi.gpio
sudo apt-get install python-smbus
sudo apt-get install python-serial
sudo apt-get install python-spidev
sudo apt-get install python-imaging
2) turn I2C, SPI, and serial on. Do this by doing sudo raspi-config
then going to #5 - interfacing options, then selecting P4 (SPI), P5 (I2C), and P6 (serial) and following the prompts given to turn them each on.
3)
I'll add to this as I figure out more (hopefully with stuff on using with Python and on wiring up to various output pins of the Pi), but this was hard for me to figure out for the reasons you provide, along with the fact that I'm a newbie when it comes to this stuff, so I thought I'd write it up here. I apologize though because I don't know about the MCP3008 chip and I'm exactly a year late. Relevant xkcd.