Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
raspberry:dac_mcp4802-22 [2020/10/09 16:41]
admin
raspberry:dac_mcp4802-22 [2020/10/16 21:56]
admin [with BCM2835 Library]
Line 9: Line 9:
 To connect the MCP 4802  to the Raspberry Pi connect the SPI pins of the MCP4802 like that:\\ To connect the MCP 4802  to the Raspberry Pi connect the SPI pins of the MCP4802 like that:\\
  
-{{:raspberry:mcp4802_pinout.jpg?400|}}\\+{{:raspberry:mcp4802_pinout.jpg?200|}}\\
  
    MCP4802       Raspberry Pi    MCP4802       Raspberry Pi
        
-    VDD           5V +    Vdd           5V 
-    VREF          5V +    CS            CE1 
-    AGND          GND +    SCLK          SCLK 
-    DGND          GND +    SDI           MOSI 
-    CLK           SCLK +    Vss           GND 
-    DOUT          MISO +    LDAC          GND
-    DIN           MOSI +
-    CS/SHDN       CE1+
  
 {{:puredata:gpio-pinout-diagram-2.png?400|}}\\ {{:puredata:gpio-pinout-diagram-2.png?400|}}\\
Line 28: Line 26:
  
 ---- ----
-==== Links ====+==== with Commandline ====
  
 +[[https://swharden.com/blog/2016-09-28-generating-analog-voltages-with-the-raspberry-pi/]]\\
 +
 +to output some voltage:
 +  $ echo -ne "\x1F\xFF" > /dev/spidev0.1
 +
 +----
 +==== with BCM2835 Library ====
 +[[https://www.airspayce.com/mikem/bcm2835/]]\\
 +[[https://www.youtube.com/watch?v=0QcteUtzB4o]]\\
 +[[https://raspberry-projects.com/pi/programming-in-c/spi/using-the-spi-interface]]\\
 +
 +
 +----
 +==== with WiringPi ====
 +
 +   #include <wiringPiSPI.h>
 +
 +[[http://wiringpi.com/reference/spi-library/]]\\
 +[[https://projects.drogon.net/raspberry-pi/wiringpi/spi-library/]]\\
 +[[https://projects.drogon.net/raspberry-pi/gertboard/analog-inout/]]\\
 +[[https://projects.drogon.net/understanding-spi-on-the-raspberry-pi/]]\\
 +
 +[[https://www.petervis.com/Raspberry_PI/Gertboard_Raspberry_Pi_Expansion/Gertboard_Digital_to_Analog_Converter.html]]\\
 +[[https://learn.sparkfun.com/tutorials/raspberry-pi-spi-and-i2c-tutorial/all]]\\
 +
 +
 +----
 +==== Links ====
  
 +[[https://skpang.co.uk/blog/archives/689]]\\
 +[[http://www.netzmafia.de/skripten/hardware/RasPi/RasPi_SPI.html]]\\
  
 ---- ----