Logic Analyzer on OUT1A breaks I2S


Well-known member

I'm debugging a board and wondering why I'm not getting anything at all out of OUT1A via my scope or logic analyzer. So I setup a test with the audio shield, T 4.0 and the LA2016 logic analyzer. I'm running the standard USB_Passthrough example and playing some Youtube.

When the device turns on, everything works fine and I get audio through my headphones via the audio shield. Then I capture the I2S via the KingstVIS interface on my Windows 10 PC. The Analyzer captures the data just fine, but then everything on the headphones go completely dead and OUT1A becomes solid low (no signal). If I run the analyzer again, or look at the pin on the scope, there is no output on OUT1A but it maintains the BCLK and LRCLK.

So the logic analyzer is capturing the data fine but then breaks the I2S data completely. Is there something that I am doing wrong? Is there anything someone can recommend to read the data line without breaking it?

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

AudioInputUSB            usb1;           //xy=200,69  (must set Tools > USB Type to Audio)
AudioOutputI2S           i2s1;           //xy=365,94
AudioConnection          patchCord1(usb1, 0, i2s1, 0);
AudioConnection          patchCord2(usb1, 1, i2s1, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=302,184

void setup() {                

void loop() {
  // read the PC's volume setting
  float vol = usb1.volume();

  // scale to a nice range (not too loud)
  // and adjust the audio shield output volume
  if (vol > 0) {
    // scale 0 = 1.0 range to:
    //  0.3 = almost silent
    //  0.8 = really loud
    vol = 0.3 + vol * 0.5;

  // use the scaled volume setting.  Delete this for fixed volume.


// Teensyduino 1.35 & earlier had a problem with USB audio on Macintosh
// computers.  For more info and a workaround:
// https://forum.pjrc.com/threads/34855-Distorted-audio-when-using-USB-input-on-Teensy-3-1?p=110392&viewfull=1#post110392

Screenshot 2023-05-11 143342.jpg

Grounds different?

A 'scope is always going to tell you more, especially if something odd is happening.
I think maybe grounding was the issue. I've switched to the 'scope and I seem to be making progress. Thanks for the tip, MarkT.