Audio Adaptor and Teensy 3.2 running I2C scanner shows nothing.

Status
Not open for further replies.

DaQue

Well-known member
Am I missing something basic? I have a Teesny plugged on the PJRC audio board and when I run I2C_t3 I2C Advanced Bus Scanner I get :

Code:
[---------------------------------------------------
Bus Status Summary
==================
 Bus    Mode   SCL  SDA   Pullup   Clock
Wire   MASTER   19   18  External  400000 Hz
Wire2  MASTER   29   30  External  400000 Hz
---------------------------------------------------
Starting scan: Wire
No devices found.
---------------------------------------------------
Starting scan: Wire2
No devices found.
---------------------------------------------------
/CODE]

It should report the STGL5000 adress on the audio board right?
 
I really need to know if just the Teensyand audio adapter stacked togeather if the scanner would return a found address for ithe audio board chip. If it should I must have a bad Teensy or audio board. I want to start working with a 2nd chip that I will later hook up to I2C on the same pins and need to verify my hookup dioesn't some how kill the I2C. After that I hope to see a scanner reply with both addresses then I can start the real work.
 
Last edited:
well,i couldn't get a simple wire.h scan to work on audio adaptor. But if I added some Audio stuff to the scan sketch, it would work

Code:
#include <Wire.h>

#include <Audio.h>
AudioOutputI2S      audioOutput;        // start codec

uint8_t address;
int8_t status;

void setup() {
  Serial.begin(9600); while (!Serial);

  Wire.begin();
}

void loop() {
  Serial.println("Scanning...");

  for (address = 1; address <= 127; address++) {
    Wire.beginTransmission(address);
    status = Wire.endTransmission();

    if (status == 0) {
      Serial.print("I2C device found at: 0x");
      Serial.println(address, HEX);
    }
  }

  Serial.println("done");

  delay(2000);
}
Scanning...
I2C device found at: 0xA
done

------
maybe codec needs MCLK ticking
 
Last edited:
Occam's razor: the minimum needed in the I2C scanner is Audio.h and AudioOutputI2S audioOutput;
The instantiation of AudioOutputI2S starts the MCLK on the codec.
 
Thanks for the help. I now know my Teensy and audio board are good. It reports 0xA. My understanding of the way the scanner worked was incorrect, I thought it would just find any I2C on the buss. I didn't think I had to wake the chip up first.
 
Now i have the 2nd chip responding to the test program above but its odd. The audio board is reporting 0xA but the 2nd chip I need to learn to talk to is answering 0x40 and the data sheet says it should be on 0x80. I guess it could be an error in the docs. It is labeled "advanced information" on the first page. it is true that there is only the one chip on the audio board on I2c and its at 0Xa? Would a level shift problem cause a chip to report on the wrong address? The chip has its own 2.7 volt regulator and the Teensy is 3.3 but it still seems to find it ok. FYI the reason the other chip didn't respond at first is I forgot to pull its voltage regulator enable pin high.
 
Thank you sir!

The document I am looking at for the chip is from 2000. I think it has me doing stuff the wire library already does mostly automatically with waiting for a line to go back high etc... I keep forgetting about some of Paul's documentation pages
 
Status
Not open for further replies.
Back
Top