瀏覽代碼

AudioOutputAnalog ramp up without changing AREF setting

dds
PaulStoffregen 10 年之前
父節點
當前提交
879258025a
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      output_dac.cpp

+ 3
- 3
output_dac.cpp 查看文件

@@ -40,9 +40,9 @@ void AudioOutputAnalog::begin(void)
DAC0_C0 = DAC_C0_DACEN; // 1.2V VDDA is DACREF_2
//DAC0_C0 = DAC_C0_DACEN | DAC_C0_DACRFS; // 3.3V VDDA is DACREF_2
// slowly ramp up to DC voltage, approx 1/4 second
for (int16_t i=0; i<128; i++) {
analogWrite(A14, i);
delay(2);
for (int16_t i=0; i<2048; i+=8) {
*(int16_t *)&(DAC0_DAT0L) = i;
delay(1);
}

// set the programmable delay block to trigger DMA requests

Loading…
取消
儲存