write values ​​directly to ports

simo1592
Posts: 2
Joined: Tue Apr 25, 2023 5:42 pm

write values ​​directly to ports

Postby simo1592 » Thu Apr 27, 2023 1:45 pm

Hi everyone,
I'm doing my first project with ESP32 using the Arduino IDE.
I'm trying with ESP32 to see if I can get a better result than the arduino boards.
I connected some parallel DACs to the board and I have a series of int values ​​to execute in sequence, with arduino I used the registers of the gates by directly writing the value in it, obtaining the consequent binary decoding on the pins, can you tell me what are the instructions to execute the same command with ESP32? I haven't found much online.
Thank you
Simone.

MicroController
Posts: 1702
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: write values ​​directly to ports

Postby MicroController » Fri May 05, 2023 7:52 pm

You should be able to write to the GPIO_OUT_REG and/or GPIO_OUT1_REG registers directly (after configuring the GPIOs as needed).
You can look at the code of e.g. gpio_ll_set_level(...). Notice how some registers need special treatment for reads or writes to work.

Who is online

Users browsing this forum: Bing [Bot] and 43 guests