Closed martinberlin closed 3 months ago
Thanks for reporting, investigating.
When running the simulation, I can see that the LEDs connected to pins 41 and 48 do turn on:
Note that the label of the pin comes below the pin (I do find it a bit confusing too, but this is how the actual S3 devkit is marked). You can also see the pin names when you move the mouse over the pin (in editing mode, while not simulating).
Do you get a different result?
It is hard to tell which pins can sometimes not be set as output, it seems to depend on other pins. With my tests, pin 3 is the one that is most likely that does not work.
With my tests, pin 3 is the one that is most likely that does not work.
Is there an example where I can see the issue?
My test was wrong.
I fell into the same trap, I was looking at the wrong pin numbers, sorry.
Changing the array for martinberlin to the actual pin numbers makes it work:
// Fast signals XCL,STV
int sigIO[5] = {5, 47, 48, 40, 41};
// 8 data out
int dataIO[8] = {6,7,15,16,17,18,8,3};
I agree this is confusing - I'll ask @AriellaE to look at how to make it less confusing.
Note that the label of the pin comes below the pin (I do find it a bit confusing too, but this is how the actual S3 devkit is marked)
Yes my bad that's 100% right. I will adapt the pins and update it, that is mostly the issue. Another thing that I find strange is that pins 41 & 47 seem to be high even without setting them (That's why I added a delay) But that is a normal thing is many micro-controllers. And is a good reason to double check and always make real tests before assigning pins that control mosfet's or other states, since they might toogle in the boot process. This happened to me controlling backlights and is always a bit of a struggle.
Now the updated wiring works 100% as expected: https://wokwi.com/projects/401153784260252673 sorry for the false alarm!
Board graphics updated to avoid future confusion about the pin numbers.
Describe the bug
I'm trying to make a simple array to set the referenced IOs as Output and at the same time turn them high. This seems to work for many GPIOs but others seem not to react, even after the array loop, trying to explicitly do it like this:
I'm not sure this is a bug but I can certainly turn all GPIOs high in a physical board.
To Reproduce
https://wokwi.com/projects/401153784260252673
Expected behavior
Leds being lit when the connected IO is set as output and turned on high.