Teensy audio board + i2c oled

Status
Not open for further replies.

danixdj

Well-known member
I have a problem with a OLED on the same I2C..

When i use a scketch without audio settings the oled works fine, when i put a the audio code the OLED don't work.

If i use:

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);

the audio board don't play and also the OLED is black.

Together it's impossibile, why?

it's all on the same i2c wires..
 
Sanity check, with the same physical wiring you can get got to work or fail depending on the inclusion of the display.begin line?

First thought had been double dosage of pullup resistors and/or something that wasn't tri stating an output when it had finished comunication but I take it this is with unchanged hardware?

My guess here is that the display and audio board are configuring incompatible i2C settings. Normally fix would be to add some code swapping the setting back and forth but that's not going to work well with streaming audio. As a place to start check what configuration that OLED display begin is doing (Audio has it in several places, see output_i2s in config_i2s). It doesn't seem to be an address clash as audio uses address 0x0A but it's also configuring i2C for DMA. If the OLED library is configuring for direct drive or worse bitbanging things are going to not work in interesting ways.

Unsure of a simple solution, since I think the right answer is to slot the OLED messages into the DMA buffer and that's not something I've got any sort of clue about. Certainly shared use of the bus is possible since you can stack two audio boards but that's using the same library to manage the sharing.
 
SOLVED!
This is a AUDIO LIBRARY bug i think!

If you don’t use the first input of the audio object (delay, mixer or everything) the other i2c devices don’t work… i don’t know why but now all works fine!
 
Any chance you could post the code to reproduce this problem? Without the code, it will probably never be investigated and fixed.
 
Status
Not open for further replies.
Back
Top