open drain output

eowesi
Posts: 11
Joined: Sat Jun 09, 2018 8:55 am

open drain output

Postby eowesi » Wed Nov 06, 2019 11:13 am

My first question is: Does all digital pins support open drain?
Second is: I'm trying to set the fourth pin as open drain.The arduino code below didn't work. Where am I making a mistake?(Is code OK?)

Code: Select all

void setup()
{
  REG_WRITE(GPIO_PIN4_REG, GPIO_PIN4_PAD_DRIVER);
}

void loop()
{
  REG_WRITE(GPIO_OUT_W1TS_REG, BIT4); //Close output
        delay(250);
  REG_WRITE(GPIO_OUT_W1TC_REG, BIT4); //Set pin to ground
        delay(250);
}


idahowalker
Posts: 131
Joined: Wed Aug 01, 2018 12:06 pm

Re: open drain output

Postby idahowalker » Thu Nov 07, 2019 12:04 am

https://docs.espressif.com/projects/esp ... /gpio.html look for gpio pull down and pull up disable.

Edje11
Posts: 18
Joined: Thu May 17, 2018 10:33 am
Contact:

Re: open drain output

Postby Edje11 » Fri Nov 08, 2019 3:38 pm

eowesi wrote:
Wed Nov 06, 2019 11:13 am
My first question is: Does all digital pins support open drain?
No.
It's all in the datasheet described.

Who is online

Users browsing this forum: No registered users and 16 guests