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

Thread: Teensyduino 1.52 breaks AudioOutputPT8211

  1. #1

    Teensyduino 1.52 breaks AudioOutputPT8211

    Hi, I recently upgraded from Teensyduino 1.51 to 1.52 in order to switch a project over from the Teensy 4.0 to the 4.1. The project uses the Audio library with the PT8211 DAC. In doing so corrupted any and all audio with a harsh modulating tone around 347Hz on both the 4.0 and 4.1. The issue persists whether I use AudioOutputPT8211 or AudioOutputPT8211_2.

    The following code (and attached circuit image) is a minimal example that reproduces the problem using the latest Teensyduino standalone (Arduino 1.8.12, Teensyduino 1.52). This one starts with the harsh 347Hz modulation as mentioned, but after a second or so syncs the sine wave with the 347Hz modulation, producing the waveform shown on the scope image. Reverting back to Teensyduino 1.51 fixes the issue.

    The other DAC breakout I have lying around is the Adafruit UDA1334, and I was able to get it working under Teensyduino 1.52 using AudioOutputI2S2 without the modulating tone issue.

    Please let me know if there is a workaround or a fix planned, as I would simplify my project to use the 4.1 with the PT8211 over the 4.0 or the UDA1334. Many thanks!

    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    #include <MIDI.h>
    
    AudioSynthWaveform osc;  
    AudioOutputPT8211_2 out;
    
    AudioConnection out_l(osc, 0, out, 0);
    AudioConnection out_r(osc, 0, out, 1);
    
    void setup() {
      AudioMemory(4);
      osc.begin(1.0, 440.0, WAVEFORM_SINE);
    }
    
    void loop() {
    
    }
    Click image for larger version. 

Name:	IMG_1764_.jpg 
Views:	6 
Size:	140.7 KB 
ID:	20722
    Click image for larger version. 

Name:	IMG_1766_.jpg 
Views:	8 
Size:	167.7 KB 
ID:	20723

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,584
    I think that the PT8211 stuff can and will be fixed when FrankB reads this discussion.

    But I'm not sure if it's a good idea to use the PT8211 for new projects, this chip is not longer produced and what one is getting on the market today is only remaining old stock as long as supplies last. Thus, if you want to make sure that you can still provide your clients with spare parts in 5 years, switch over to a newer chip.

  3. #3

  4. #4
    Beautiful. Everything works great. Thank you very much, Paul.

    Theremingenieur, thank you for the suggestion. This project in question is not intended for production, but this is good to know as I was considering using the PT8211 on another project that I do plan on selling.

Posting Permissions

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