Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: No sound with an Audio Adaptor and Teensy 3.0

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    5

    No sound with an Audio Adaptor and Teensy 3.0

    I have an old 3.0 I'm trying to use for an audio project, but I can't make it play any sounds.


    I went back to the sample code and non of that works either. For example ToneSweep gets stuck in
    Code:
    while(myEffect.isPlaying())
    with no sound playing. The sweep never finishes.
    Trying to play a WAV file seems to finish playing immediately, isPlaying never returns true.

    SD card reading appears to work fine and I have the boards stacked with headers.

    Any ideas?

    Thanks!

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,169
    Well if you are using the pin in the back that on the Teensy 3.1/3.2 is a DAC (digital -> analog converter) that can play sounds when ampified, that is your problem. The Teensy 3.0 did not have a DAC. Instead the pin that occupied that location was the reset pin. The pin name (A14) used for the DAC on Teensy 3.2 is not a valid pin on Teensy 3.0.

  3. #3
    Junior Member
    Join Date
    Aug 2019
    Posts
    5
    I'm not using that pin. The only thing connected at the moment is the audio board (in the correct orientation)

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,464
    Can you run File > Examples > SD > CardInfo, of course with chip select to pin 10 and the 2 extra lines for the audio board alternate pins uncommented.

  5. #5
    Junior Member
    Join Date
    Aug 2019
    Posts
    5
    CardInfo produces this followed by a file list that looks correct

    15:07:47.123 ->
    15:07:47.123 -> Initializing SD card...Wiring is correct and a card is present.
    15:07:47.543 ->
    15:07:47.543 -> Card type: SDHC
    15:07:47.543 ->
    15:07:47.543 -> Volume type is FAT32
    15:07:47.543 ->
    15:07:47.543 -> Volume size (Kbytes): 31154688
    15:07:47.543 -> Volume size (Mbytes): 30424
    15:07:47.543 ->
    15:07:47.543 -> Files found on the card (name, date and size in bytes):

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,464
    I ran CardInfo on a Teensy 3.0 with Arduino 1.8.9 and Teensyduino 1.47. Here's what I see.

    Click image for larger version. 

Name:	sc.png 
Views:	3 
Size:	42.1 KB 
ID:	17374

    Also tried the audio library examples. Looks like audio output may be broken with Teensy 3.0 and version 1.47. I also tried 1.46. WavFilePlayer definitely does work with 1.46.

  7. #7
    Junior Member
    Join Date
    Aug 2019
    Posts
    5
    Thanks! I'll give 1.46 a try

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,464
    I've committed a fix on github.

    https://github.com/PaulStoffregen/Au...df3a762f11237e

    The restructuring to support Teensy 4.0 unwittingly broke Teensy 3.0, even though the code works fine on Teensy 3.2, 3.5 and 3.6. On Teensy 3.0, the DMA doesn't work unless it's enabled earlier.

    Here's a copy of the fixed output_i2s.cpp. If you want to use 1.47, just replace your copy with this fixed version and Teensy 3.0 will again work with I2S output.
    Attached Files Attached Files

  9. #9
    Junior Member
    Join Date
    Aug 2019
    Posts
    5
    That did it, thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •