eugenelepekhin / LogicCircuit

LogicCircuit – is free, open source educational software for designing and simulating digital logic circuits.
https://logiccircuit.org/
62 stars 16 forks source link

Synchronous behavior of selector LED matrix #3

Closed yesasha closed 2 years ago

yesasha commented 2 years ago

The leds in the led matrix are not changing their state immediately, like a single LED. It seems like it behaves synchronously depending on the frequency. This is in "selector" type. The "individual" type seems working as expected.

eugenelepekhin commented 2 years ago

It is probably an artificially elongated lit of them to simulate work of the real one. Please see it in the help: https://www.logiccircuit.org/LedMatrix.html If you mean something different please let me know.

yesasha commented 2 years ago

I have explained it in the test circuit. led_matrix_problem.zip

eugenelepekhin commented 2 years ago

Thank you for sharing your circuit. The behavior you are observing is by design. The idea is usually such matrices are used to make a small display. Each display is controlled by a driver circuit. The driver is circulating rows of the matrix and turning on LEDs in required columns. If the driver cycles fast enough through the rows human eye will not see flickering but the picture. Now, in the logic circuit program it is usually not that easy to create a circuit that can cycle fast enough. So, the program is artificially slowing downturn of a lit LEDs. That is why you see the LED is lit to an extra cycle of a clock. If such behavior is on your way, please explain what you are trying to build. I can either try to think how to work around it or find a way to control it.

yesasha commented 2 years ago

I understand now. But it is not clear how much time the LED is staing on. It seems like unpredictable.

eugenelepekhin commented 2 years ago

It's staying on for one cycle of the clock.