sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.29k stars 633 forks source link

Problem creating a new subcircuit based on a previous subcircuit #581

Closed jhkhouri62 closed 3 years ago

jhkhouri62 commented 3 years ago

I have created a 4bit Adder subcircuit. Then I tried to create a new subcircuit for a BCD adder using the 4bit Adder. No error so far. When inserting a new instance of this BCD adder in a new circuit a Matrix Error message pops-up.

May I have any help?

pfalstad commented 3 years ago

Hi could you post all the circuits involved? Use File->Export As Link

jhkhouri62 commented 3 years ago

4 BIT ADDER SUBCIRCUIT: https://tinyurl.com/yztuoccf BIN TO BCD SUBCIRCUIT: https://tinyurl.com/yz9f789a

pfalstad commented 3 years ago

The simulator is confused because the Cin pin is left unconnected. If you ground that it works:

https://tinyurl.com/yexzrlbh

It's supposed to detect that the pin is unconnected and take care of it. But for some reason it doesn't detect that when enclosed in a subcircuit.

jhkhouri62 commented 3 years ago

Thank you!! It seems it is solved!! It is a great simulator. I am using with my students.

pfalstad commented 3 years ago

fixed by giving an error when pins are unconnected