This is an old revision of the document!
Digital Analog Converter - MCP4802/22
The MCP4802 is a dual 8-Bit Digital Analog Converter with SPI interface. The MCP4822 is the 12-Bit version.
WiringPi and the MCP 4802
To connect the MCP 4802 to the Raspberry Pi connect the SPI pins of the MCP4802 like that:
MCP4802 Raspberry Pi Vdd 5V CS CE1 SCLK SCLK SDI MOSI Vss GND LDAC GND
Before using the Wiring object enable the SPI interface in:
$ sudo raspi-config
Links
https://projects.drogon.net/raspberry-pi/wiringpi/spi-library/
https://projects.drogon.net/raspberry-pi/gertboard/analog-inout/
https://www.petervis.com/Raspberry_PI/Gertboard_Raspberry_Pi_Expansion/Gertboard_Digital_to_Analog_Converter.html
https://engineer.john-whittington.co.uk/2015/03/raspberry-pi-dac-mcp4725-with-wiringpi/