Hi All
Is it possible to create a QSPICE LED component using either C++ or Verilog that would change color to indicate ON or OFF?
Regards
ike
Hi All
Is it possible to create a QSPICE LED component using either C++ or Verilog that would change color to indicate ON or OFF?
Regards
ike
Hi, ike.
I thought about doing that a while ago but decided that it wasn’t useful. Simulations don’t run at real time speed. How would you use it?
I also thought about being able to pop up a clickable button(s) or other GDI object for user interaction. Pause the simulation and wait for the user to click and then do something different. But, again, it didn’t seem that useful.
Anyway, if you can give me a persuasive use case, I might give it a go.
–robert
Hi Robert
The LED feature can be very useful in demonstrating circuit functionality to a larger audience where looking at traces and their transitions from lets say low to high and vice versa would be cumbersome and would be especially true if we are observing more than a few signals.
Regards
ike
Hi, ike.
OK, I’m still lost about how you think this would work. If I was trying to demonstrate something with a blinking LED using a simulation, I would run the simulation and then show a waveform where the LED current switches on/off. How would you use the proposed component that interacts/displays in simulation-time?
–robert
Hi, ike. Adding to prior response…
Maybe you want something where you run a simulation, record results, and then play it back in real-time?
–robert
Hi Robert
The usage could actually be two ways one as you described and the other to indicate logic states in a circuit e.g. a lit LED indicating a logic high and this is what I eluded to earlier.
Regards
ike
Hi, ike. I’m still lost…
Let’s say that we have a circuit and a component. The component will display an LED and, when an input changes state, the component redraws the LED in a different color. Assume that the circuit changes that input state at 1Hz suggesting that the LED will turn on/off once per second.
Now, we run the simulation for a 10-second simulation (“.tran 10”). QSpice is fast. Let’s say that the simulation runs and completes in, say, 1 second of clock time. The displayed LED is flashing at simulation speed so it has flashed 10 times in the 1 second of clock time. That doesn’t seem useful to me.
Anyway, maybe I’m not understanding. Please describe in more detail what you are asking for.
–robert
Hi Robert
Lets say we have the following comparator circuit with initial conditions as specified:
VIN is ramped up to exceed VREF. When this happens the output of the comparator switches low allowing the LED current to flow. When this happens I want the LED to change its displayed color.
Regards
ike
Hi, ike.
OK, what I think you’re asking for is a component that redraws it’s schematic symbol based on state. If so, no, a C-Block component has no connection back into the QSpice GUI. That would need to be a QSpice feature request. Sorry.
–robert
Got it. Thank you.
Regards
ike
There are simulators that can exhibit the behavior you described. I recall a software program called “Electronic Workbench” from many years ago, which later as Multisim by National Instruments. However, in advanced SPICE simulations, this feature may not be seen, as most users are interested in exact waveforms and numerical results. Real-time visual simulation is beneficial for educational purposes, but in engineering work, people generally do not need that. However, this is just my perspective on the matter.
National Instruments or Matlab Simulink are slightly different as they have to provide an interface for real-time control purposes. Therefore, graphical interaction is typically present in software that focuses on aspects related to real-time control, or education.
Hi ike,
If this is for demonstrating to a larger audience then have a look a VoltSim. It is a very good Android app. It is a circuit simulator with many components including LEDs. It is possible to edit their properties so many colours are available.
The online and offline Falstad.com simulator should also serve your purpose.
Good luck
Rod