Page 1 of 1

Disable DAC Pins on Pin 25 and 26

Posted: Fri Jul 09, 2021 1:20 pm
by pravi.khm@gmail.com
Hi,

I have made a custom ESP32 4MB board and everything is working perfectly. However, there are two pins GPIO25 and GPIO26 which are connected to external interrupts. They are not working. Later I removed all connections and found that these two pins are DAC pins and by default they output ~2v. I am using Arduino environment.

Can someone please suggest how to disable DAC and convert them to GPIO? Below is a simple blink LED sketch. However, the output on the pins is always 1.9v whether the pin status is set to high or low.

Code: Select all

#define PIN1 26
#define PIN2 25

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(PIN1, OUTPUT);
  pinMode(PIN2, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(PIN1, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(PIN2, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(3000);                       // wait for a second
  digitalWrite(PIN1, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(PIN2, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(3000);                       // wait for a second
}

Re: Disable DAC Pins on Pin 25 and 26

Posted: Sun Jul 11, 2021 4:43 pm
by felmue
Hello @pravi.khm@gmail.com

are you sure those two pins are no longer connected to anything?

According to this viewtopic.php?t=9123#p38159 they are regular GPIOs unless I2S is being used (which is not the case in your simple blink sketch).

I compiled and ran your simple blink sketch just fine, albeit only testing GPIO26 as GPIO25 is connected to something already on my board. GPIO26 is blinking happily as it should.

Thanks
Felix