Browse Source

Improve DAC and I2S slave documentation

dds
PaulStoffregen 8 years ago
parent
commit
ad5ce98926
2 changed files with 23 additions and 11 deletions
  1. BIN
      gui/img/dac_speaker.jpg
  2. +23
    -11
      gui/index.html

BIN
gui/img/dac_speaker.jpg View File

Before After
Width: 240  |  Height: 189  |  Size: 21KB

+ 23
- 11
gui/index.html View File

{"type":"AudioInputI2S","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioInputI2S","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputI2SQuad","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s_quad","inputs":0,"outputs":4,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioInputI2SQuad","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s_quad","inputs":0,"outputs":4,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputAnalog","data":{"defaults":{"name":{"value":"new"}},"shortName":"adc","inputs":0,"outputs":1,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioInputAnalog","data":{"defaults":{"name":{"value":"new"}},"shortName":"adc","inputs":0,"outputs":1,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputI2Sslave","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2ss","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputI2Sslave","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2sslave","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputUSB","data":{"defaults":{"name":{"value":"new"}},"shortName":"usb","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioInputUSB","data":{"defaults":{"name":{"value":"new"}},"shortName":"usb","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputI2S","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioOutputI2S","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputI2SQuad","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s_quad","inputs":4,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioOutputI2SQuad","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s_quad","inputs":4,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputSPDIF","data":{"defaults":{"name":{"value":"new"}},"shortName":"spdif","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioOutputSPDIF","data":{"defaults":{"name":{"value":"new"}},"shortName":"spdif","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputAnalog","data":{"defaults":{"name":{"value":"new"}},"shortName":"dac","inputs":1,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioOutputAnalog","data":{"defaults":{"name":{"value":"new"}},"shortName":"dac","inputs":1,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputPWM","data":{"defaults":{"name":{"value":"new"}},"shortName":"pwm","inputs":1,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioOutputPWM","data":{"defaults":{"name":{"value":"new"}},"shortName":"pwm","inputs":1,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputI2Sslave","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2ss","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputI2Sslave","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2sslave","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputUSB","data":{"defaults":{"name":{"value":"new"}},"shortName":"usb","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioOutputUSB","data":{"defaults":{"name":{"value":"new"}},"shortName":"usb","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioMixer4","data":{"defaults":{"name":{"value":"new"}},"shortName":"mixer","inputs":4,"outputs":1,"category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioMixer4","data":{"defaults":{"name":{"value":"new"}},"shortName":"mixer","inputs":4,"outputs":1,"category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioPlayMemory","data":{"defaults":{"name":{"value":"new"}},"shortName":"playMem","inputs":0,"outputs":1,"category":"play-function","color":"#E6E0F8","icon":"arrow-in.png"}}, {"type":"AudioPlayMemory","data":{"defaults":{"name":{"value":"new"}},"shortName":"playMem","inputs":0,"outputs":1,"category":"play-function","color":"#E6E0F8","icon":"arrow-in.png"}},
<script type="text/x-red" data-help-name="AudioInputI2Sslave"> <script type="text/x-red" data-help-name="AudioInputI2Sslave">
<h3>Summary</h3> <h3>Summary</h3>
<div class=tooltipinfo> <div class=tooltipinfo>
<p>Receive 16 bit stereo audio from an I2S device using I2S slave mode.</p>
<p>Receive 16 bit stereo audio from an I2S device using I2S slave mode
(where the ADC or codec chip, not Teensy, controls audio timing).</p>
</div> </div>
<h3>Audio Connections</h3> <h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3> <table class=doc align=center cellpadding=3>
<script type="text/x-red" data-help-name="AudioOutputAnalog"> <script type="text/x-red" data-help-name="AudioOutputAnalog">
<h3>Summary</h3> <h3>Summary</h3>
<div class=tooltipinfo> <div class=tooltipinfo>
<p>Transmit 12 bit audio using Teensy 3.1's built-in digital to analog converter.</p>
<p>Transmit 12 bit audio using Teensy's built-in digital to analog converter.</p>
<p align=center><img src="img/dac_speaker.jpg"><br>
<small><a href="http://www.pjrc.com/store/prop_shield.html" target="_blank_">Prop Shield with 4&ohm; Speaker</a></small></p>
</div> </div>
<h3>Audio Connections</h3> <h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3> <table class=doc align=center cellpadding=3>
<tr class=odd><td align=center>In 0</td><td>Audio Channel</td></tr> <tr class=odd><td align=center>In 0</td><td>Audio Channel</td></tr>
</table> </table>
<h3>Functions</h3> <h3>Functions</h3>
<p>This object has no functions to call from the Arduino sketch. It
simply streams data from the ADC to its output port.</p>
<p class=func><span class=keyword>analogReference</span>(ref);</p>
<p class=desc>Configure output voltage range:<br>
<span class=literal>INTERNAL</span> selects 1.2 volt peak-to-peak output.<br>
<span class=literal>EXTERNAL</span> selects 3.3 volt peak-to-peak output.
</p>
<h3>Hardware</h3> <h3>Hardware</h3>
<p align=center><img src="img/dacpin.jpg"></p> <p align=center><img src="img/dacpin.jpg"></p>
<p>Signal range is 0 to 1.2V</p>
<p>Most applications require at least a 10&micro;F DC-blocking capacitor.</p>
<p>TODO: photo of Teensy 3.1 with 10&micro;F capacitor and 3.5mm jack.</p>
<p>Signal range default is 0 to 1.2V</p>
<p>The output voltage has DC level. Some applications require a DC-blocking capacitor. If unsure, a 10&micro;F is usually a safe value to use. If an aluminum or tantalum capacitor is used, the positive terminal should connect to Teensy's DAC pin.</p>
<p>The DAC pin is used with the
<a href="http://www.pjrc.com/store/prop_shield.html" target="_blank_">Prop Shield</a>
to drive speakers.</p>
<h3>Examples</h3> <h3>Examples</h3>
<p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; PassThroughMono <p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; PassThroughMono
</p> </p>
not filtered. This may not not filtered. This may not
be an issue for many uses, but care should be used if amplified and driven be an issue for many uses, but care should be used if amplified and driven
to high power tweeters.</p> to high power tweeters.</p>
<p>When using 3.3V output, the power supply is used for the analog reference. Noise
present on the 3.3V power can couple to the DAC output signal.
</p>
</script> </script>
<script type="text/x-red" data-template-name="AudioOutputAnalog"> <script type="text/x-red" data-template-name="AudioOutputAnalog">
<div class="form-row"> <div class="form-row">
<p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; PassThroughMono <p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; PassThroughMono
</p> </p>
<h3>Notes</h3> <h3>Notes</h3>
<p>This object only works properly when Tools > CPU_Speed is set to
<p>This object only works properly when Tools &gt; CPU_Speed is set to
48 or 96 MHz. Other speeds aren't supported and will likely fail 48 or 96 MHz. Other speeds aren't supported and will likely fail
in strange ways.</p> in strange ways.</p>
<p>The PWM carrier frequency is 88.2 kHz. The suggested circuit <p>The PWM carrier frequency is 88.2 kHz. The suggested circuit
<script type="text/x-red" data-help-name="AudioOutputI2Sslave"> <script type="text/x-red" data-help-name="AudioOutputI2Sslave">
<h3>Summary</h3> <h3>Summary</h3>
<div class=tooltipinfo> <div class=tooltipinfo>
<p>Transmit 16 bit stereo audio to an I2S device using I2S slave mode.</p>
<p>Transmit 16 bit stereo audio to an I2S device using I2S slave mode
(where the DAC or codec chip, not Teensy, controls audio timing).</p>
</div> </div>
<h3>Audio Connections</h3> <h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3> <table class=doc align=center cellpadding=3>

Loading…
Cancel
Save