RASP-PIZERO-Audio

De MCHobby - Wiki
Révision datée du 28 novembre 2015 à 22:04 par Admin (discussion | contributions) (Page créée avec « {{RASP-PIZERO-NAV}} {{bloc-etroit|text=Uh, well, there aren't any! That's right, to keep the Pi Zero small and low cost, the headphone audio filter isn't included You ca... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

{{bloc-etroit|text=Uh, well, there aren't any! That's right, to keep the Pi Zero small and low cost, the headphone audio filter isn't included

You can still get digital audio out via HDMI so if you plug it your Pi into a monitor with speakers, that will work fine.

GPIO #18 is also known as PWM0 and in the original Pi was coupled with a very basic RC filter to create the audio output:

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

(Annoyingly, the Pi B+ and Pi 2 schematics do not include any useful details about the filtering used after the Pi 1)

If you don't mind getting a few 150 and 270 ohm resistors, and two each of about 33nF (also known as 0.033uF) and 10uF capacitors, you can basically recreate those two filters.

Now all you need is access to PWM0_OUT and PWM1_OUT, which are...on GPIO #40 and #45 and are not brought out on the Pi Zero. Tragedy? Give up? No! You can get to PWM0 on GPIO #18 (ALT5) and PWM1 on GPIO #13 (ALT0) or GPIO #19 (ALT5) - see the full list of pins and alternate functions here

You can do that by adjusting the device tree overlay to change the PWM audio pins from pins #40 and #45 (which are not accessable) to pins #18 and #13. This very nice Pi forum thread will tell you how!

See here for a program that will let you set the alt forms of GPIO pins


Source: Introducing the Raspberry Pi Zero
Créé par LadyAda pour AdaFruit Industries.

Traduction réalisée et augmentée par Meurisse D pour MCHobby.be.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com