Browse Source

AudioOutputAnalog to default to 1.2V range

dds
PaulStoffregen 10 years ago
parent
commit
60e6ed2eee
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      output_dac.cpp

+ 2
- 1
output_dac.cpp View File

@@ -37,7 +37,8 @@ bool AudioOutputAnalog::update_responsibility = false;
void AudioOutputAnalog::begin(void)
{
SIM_SCGC2 |= SIM_SCGC2_DAC0;
DAC0_C0 = DAC_C0_DACEN | DAC_C0_DACRFS; // 3.3V VDDA is DACREF_2
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);

Loading…
Cancel
Save