krenzlin / esp8266-synth

sample drum machine on the ESP8266
6 stars 0 forks source link
arduino drum-machine esp8266 i2s synthesizer

Connecting the DAC via I2S

I2S needs 3 lines:

The ESP8266 and Wemos D1 mini board pins are

I2S ESP8266 Wemos D1 Mini
BCK 15 D8
WS 2 D4
SD 3 RX

This has two major impacts. 1) Don't do anything (setMode, digitalWrite) with the LED as it is connect to pin 2. 2) RX0 is used as SD line and cannot be used to receive UART. Together with the fact that the second UART can only transmit, you cannot receive UART data. At least not via the hardware UARTs. TODO Maybe software uart works

PCM510x (purple shield)

See this excellent stackoverflow answer

I2S lines are labeled as:

I2S PCM510x
BCK BCK
WS LCK
SD DIN

Furthermore you need to connect GND to ground and VIN to 3.3 V (maybe 5V work to). And, important, connect the master clock (labeled SCK but not the serial clock mentioned earlier) to ground before powering the DAC. This signals the PCM510x that it needs to generate its own master clock.

Connection overview

PCM510x ESP8266
SCK GND
BCK D8
DIN RX
LCK D4
GND GND
VIN 3.3V