Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
raspberry:dac_mcp4802-22 [2020/10/09 16:34] admin [Digital Analog Converter - MCP4802 MCP4822] |
raspberry:dac_mcp4802-22 [2020/10/16 21:56] admin [with BCM2835 Library] |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Digital Analog Converter - MCP4802/22 ===== | ===== 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.\\ | ||
[[http:// | [[http:// | ||
+ | ---- | ||
+ | === WiringPi and the MCP 4802 === | ||
+ | To connect the MCP 4802 to the Raspberry Pi connect the SPI pins of the MCP4802 like that:\\ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | | ||
+ | |||
+ | 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 ==== | + | ==== with Commandline |
+ | [[https:// | ||
+ | |||
+ | to output some voltage: | ||
+ | $ echo -ne " | ||
+ | |||
+ | ---- | ||
+ | ==== with BCM2835 Library ==== | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ---- | ||
+ | ==== with WiringPi ==== | ||
+ | |||
+ | # | ||
+ | |||
+ | [[http:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ---- | ||
+ | ==== Links ==== | ||
+ | [[https:// | ||
+ | [[http:// | ||
---- | ---- |