Advertisement
Guest User

Moving PWM to GPIO pins on the Raspberry Pi

a guest
Dec 10th, 2016
2,541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. # We are adding these to config.txt on the SD card
  2. # From Windows/etc, just edit the file in the root directory of the first partition, from the Pi itself edit /boot/config.txt
  3.  
  4. # Uncomment the settings you would like.
  5. # Make sure you are using a modern Raspberry Pi bootloader or this will do nothing.
  6. # If it does not seem to work, flash a fresh SD card with Raspbian and try it.
  7.  
  8. # If you want stereo sound from GPIO pins 18 and 13
  9. #dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
  10.  
  11. # If you want mono sound from GPIO pin 18 only
  12. #dtoverlay=pwm,pin=18,func=2
  13.  
  14. # You can use any of these GPIO pins for the above:
  15. # pin=18,func=2 (PWM0)
  16. # pin=13,func=4 (PWM1)
  17. # pin=19,func=5 (PWM1)
  18.  
  19. # Enable sigma delta modulation (considered experimental as explained in my video)
  20. #audio_pwm_mode=2
  21.  
  22. # If you are not using sigma delta, use this to make it sound cleaner at times:
  23. #disable_audio_dither=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement