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

Thread: MicroE-506 with AudioControlWM8731master Problem

  1. #1
    Junior Member
    Join Date
    Mar 2020
    Location
    Italy
    Posts
    16

    MicroE-506 with AudioControlWM8731master Problem

    Hi guys, i'm trying to setup my new buy. MicroE-506 With Teensy 4.0 (or Teensy 3.2).
    I'm having some problem with easy examples so probably there's something that I dont understand.

    I'm trying to connect my poket operator (PO-16) in (mic-in jack) and my headpohones (in output jack) to make some real time effect.

    If I connect just AudioInputI2S in a AudioOutputI2S everything seems to work and i can hear the sound in my headphones.
    But if I use some effect like Filter or Delay I have problem.
    if I use Filter -> I can hear just a strong white noise
    if I use a Delay -> I can hear PO input but everything is distorted (like clipping)

    I have follow wiring instruction in the WM8731MikroSine Example.

    This the code of filter test

    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioInputI2S            i2s1;           //xy=99,60
    AudioFilterBiquad        biquad1;        //xy=257,60
    AudioOutputI2S           i2s2;           //xy=416,60
    AudioConnection          patchCord1(i2s1, 0, biquad1, 0);
    AudioConnection          patchCord2(biquad1, 0, i2s2, 0);
    AudioConnection          patchCord3(biquad1, 0, i2s2, 1);
    AudioControlWM8731master wm8731m1;       //xy=526.0104370117188,988.0103330612183
    // GUItool: end automatically generated code
    
    
    void setup() {
      
    
      delay(1000); // allow the WM7831 extra time to power up
      wm8731m1.enable();
    
      AudioMemory(15);
    
      wm8731m1.volume(0.50);
      wm8731m1.inputSelect(AUDIO_INPUT_MIC);
      // wm8731m1.inputSelect(AUDIO_INPUT_LINEIN); // not connected on MikroE-506
    
    
      
      // Butterworth filter, 12 db/octave
      biquad1.setLowpass(0, 1000, 0.707);
    
      // Linkwitz-Riley filter, 48 dB/octave
      //biquad1.setLowpass(0, 800, 0.54);
      //biquad1.setLowpass(1, 800, 1.3);
      //biquad1.setLowpass(2, 800, 0.54);
      //biquad1.setLowpass(3, 800, 1.3);
    }
    
    
    void loop() {
    }


    Can anyone help me.

    Thank
    Andrea

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,118
    If you configure the WM8731 with AudioControlWM8731master, then you need to use AudioInputI2Sslave and/or AudioOutputI2Sslave to communicate with it.

    Using AudioControlWM8731master together with AudioInputI2S & AudioOutputI2S will cause both Teensy and the WM8731 to attempt to drive BCLK and LRCLK. Not good...

  3. #3
    Junior Member
    Join Date
    Mar 2020
    Location
    Italy
    Posts
    16
    Quote Originally Posted by PaulStoffregen View Post
    If you configure the WM8731 with AudioControlWM8731master, then you need to use AudioInputI2Sslave and/or AudioOutputI2Sslave to communicate with it.

    Using AudioControlWM8731master together with AudioInputI2S & AudioOutputI2S will cause both Teensy and the WM8731 to attempt to drive BCLK and LRCLK. Not good...
    Ok, now it's working! :-)

    Thank you very much for your help.

Posting Permissions

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