internal DAC mode output has 1.7V DC offset #451
-
I mean, when i upload the code below to ESP32 board, the DAC output (pin 25) is around 1.7 Volts, instead of 0 Volt
#include "BluetoothA2DPSink.h"
BluetoothA2DPSink a2dp_sink;
void setup() {
static const i2s_config_t i2s_config = {
.mode = (i2s_mode_t) (I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN),
.sample_rate = 44100, // corrected by info from bluetooth
.bits_per_sample = (i2s_bits_per_sample_t) 16, /* the DAC module will only take the 8bits from MSB */
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
.communication_format = (i2s_comm_format_t)I2S_COMM_FORMAT_STAND_MSB,
.intr_alloc_flags = 0, // default interrupt priority
.dma_buf_count = 8,
.dma_buf_len = 64,
.use_apll = false
};
a2dp_sink.set_i2s_config(i2s_config);
a2dp_sink.start("MyMusic");
}
void loop() {
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The voltage of the analogy output pin oscillates between 0 and 3.1V. So if you get 1.7 for the neutral position this seems to be about right. You can bring down the voltage by switching off the I2S interface. In the default implementation this is done with the help of the connection status. Or you can generate a stereo signal that contently sends -32768 audio values. |
Beta Was this translation helpful? Give feedback.
The voltage of the analogy output pin oscillates between 0 and 3.1V. So if you get 1.7 for the neutral position this seems to be about right.
You can bring down the voltage by switching off the I2S interface. In the default implementation this is done with the help of the connection status. Or you can generate a stereo signal that contently sends -32768 audio values.