atuline / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP32 over WiFi.
GNU General Public License v3.0
864 stars 132 forks source link

PCM1802 FSYNC #264

Open pr8x opened 1 year ago

pr8x commented 1 year ago

I am trying to make the PCM1802 work with WLED-SR, but I am not sure what to do with the FSYNC pin. According to the datasheet:

FSYNC enables the BCK signal, and the device can shift out the converted data while FSYNC is HIGH

Does the "Generic I2S with MCLK" driver support this somehow? If not, it seems to quite easy to implement.

softhack007 commented 1 year ago

Actually the espressif I2S driver that we use has no support for an additional "fsync" pin, so no idea how that could be easily implemented.

A user on discord has reported that he connected a PCM1808 with success, maybe you find some helpful information in this message: https://discord.com/channels/700041398778331156/853969074311659570/1037034721101750334


Join our Discord to discuss sound reactive WLED, and get help and support from the community:

Screenshot_20230115-234948_Discord

softhack007 commented 1 year ago

Hi again, I just stumbled over this website: https://www.pjrc.com/pcm1802-breakout-board-needs-hack/

It seems that "FSYNC" is only relevant in TDM mode (an extension of I2S for multiple microphones). So maybe you just need to connect FSY to 3.3V.

The FSY pin (connected to FSYNC) is also a bit unusual.  PCM1802 expects it to be logic high while you transmit data, so just connect to 3.3V.  In the other modes, it sends a signal on this pin which is high during data bits and low during the zero padding bits.  But it does not require that signal as input.  FSYNC just connects to 3.3V to use PCM1802 with Teensy.

pr8x commented 1 year ago

@softhack007 I ended up just using the PCM1808.