Hello,
I just registered to this forum because I need some Help while using the ESP32 with the Arduino IDE.. I have already gained some experience and am already addressing the registers directly to not use any Arduino functions (e.g. digitalWrite).
But now I need your help to solve a somewhat complicated problem.
I have a LED strip which is divided into 7 sections. I want to fill these sections with information one after the other. So I don't need 7 SPI channels, I just want to switch one channel between several GPIOs.
I thought about it as follows:
- The first segment is filled with the data
- SPI output is put on next pin
- The second segment is filled with the data
...
I need only 1xCLK, because all LEDs are controlled one after the other, so I shouldn't get any problems with the number of pins.
I have already found a few sources about the GPIO matrix, but I haven't found any example code that shows me how to use it.
I hope you can help me a little bit, if there is still some information missing, please send me a short message.
Best regards!
Re-Map SPI-OUTPUT-GPIOS
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: Re-Map SPI-OUTPUT-GPIOS
SPI devices are usually multiplexed using multiple /CS lines; does your LED strip have those, or only a clock and data input?
-
- Posts: 5
- Joined: Fri Sep 10, 2021 7:10 am
Re: Re-Map SPI-OUTPUT-GPIOS
Hello,
many thanks for your response. It is just an Led stripe with DATA and Clock no CS Line.
many thanks for your response. It is just an Led stripe with DATA and Clock no CS Line.
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: Re-Map SPI-OUTPUT-GPIOS
Hm, yeah, then you want to look for something in the direction of the GPIO matrix... not sure if Arduino has dedicated calls for that, but given it's built on ESP-IDF, you may be able to use the esp_rom_gpio_connect_out_signal() call for this.
-
- Posts: 5
- Joined: Fri Sep 10, 2021 7:10 am
Re: Re-Map SPI-OUTPUT-GPIOS
Hello,
many thanks for your input. Could you explain it a bit more? I did not use the ESP32-IDF.. Or could you send me a short example how to star the Transmission and how to change the GPIO after the data is successfully transmitted. Or did you have an other Idea how to solve this problem?
Many Thanks!
many thanks for your input. Could you explain it a bit more? I did not use the ESP32-IDF.. Or could you send me a short example how to star the Transmission and how to change the GPIO after the data is successfully transmitted. Or did you have an other Idea how to solve this problem?
Many Thanks!
Who is online
Users browsing this forum: No registered users and 145 guests