Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simulator issues #344

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bins/core.fzb
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
</iconView>
</views>
</instance>
<instance moduleIdRef="d4d5af9700923b8a114f57961f29a8a0" modelIndex="24" path="led-rgb-4pin-cathode.fzp">
<instance moduleIdRef="d4d5af9700923b8a114f57961f29a8a0ColorLEDModuleID" modelIndex="24" path="led-rgb-4pin-cathode_v5.fzp">
<views>
<iconView layer="icon">
<geometry z="-1" x="-1" y="-1"/>
Expand Down
131 changes: 13 additions & 118 deletions bins/more/sim.fzb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
</iconView>
</views>
</instance>
<instance moduleIdRef="1001ABDC27" modelIndex="12" path="basic_fet_p.fzp">
<instance modelIndex="12" moduleIdRef="1001ABDC27" path="basic_fet_p.fzp">
<views>
<iconView layer="icon">
<geometry z="-1" x="-1" y="-1"/>
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
Expand Down Expand Up @@ -132,7 +132,6 @@
</iconView>
</views>
</instance>

<instance modelIndex="21" moduleIdRef="fc-51_85d98481ce3be6f2e9b641181c0f798b_1" path="fc-51-IR-Sensor.fzp">
<views>
<iconView layer="icon">
Expand All @@ -158,109 +157,33 @@
</instance>´


<!--
<instance moduleIdRef="d4d5af9700923b8a114f57961f29a8a0" modelIndex="24" path="led-rgb-4pin-cathode.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="AnodeLEDSuperfluxModuleID" modelIndex="24" path="led_flux_blue_anode.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="Prolight RGB 3 Watt Star" modelIndex="24" path="LED_Prolight_RGB.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="7segment10an" modelIndex="24" path="7segment_9,9_an.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="LED_Matrix_Kingbright_TA07-11" modelIndex="24" path="LED_Matrix_Kingbright_TA07-11.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance>-->
<instance modelIndex="26" moduleIdRef="1000FADF10011leg" path="dc_motor.fzp">


<instance modelIndex="24" moduleIdRef="d4d5af9700923b8a114f57961f29a8a0ColorLEDModuleID" path="led-rgb-4pin-cathode_v5.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/></iconView>
</views>
</instance>
<!--
<instance moduleIdRef="9f2b90fcf9c65c9bc09d570e3442069e" modelIndex="28" path="solenoid.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="1099ABDE24_ST_relay" modelIndex="29" path="basic-relay.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="71d4db74a3a0ec43d9303ddffee7361b" modelIndex="29" path="DIP_Relay_D31A.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance>-->
<instance modelIndex="3" moduleIdRef="__spacer__" path="ICs">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<!--
<instance modelIndex="33" moduleIdRef="a59353bd0db0225dc22770e292c622f3" path="lm358.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="34" moduleIdRef="1001AAAB555Timer" path="555timer.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="35" moduleIdRef="1001AAACOptocoupler" path="optocoupler.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="36" moduleIdRef="a4f38a10-dd92-11dd-a3e2-001f5b3a17a4" path="h-bridge.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="36" moduleIdRef="1a7828b6466fac9fd042221e931124c4" path="74HC595.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="36" moduleIdRef="HEF4094" path="HEF4094.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance moduleIdRef="RevEd_FRM050">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance moduleIdRef="RevEd_ULN2003A">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="38" moduleIdRef="CrystalModuleID" path="crystal.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="38" moduleIdRef="37asdf3c843a2127a0e499f8a0b3ef6aCrystalModuleID" path="resonator-3pin.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="38" moduleIdRef="4001_4_x_2_input_NOR_gate_single">
<!--<instance moduleIdRef="AnodeLEDSuperfluxModuleID" modelIndex="24" path="led_flux_blue_anode.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="Prolight RGB 3 Watt Star" modelIndex="24" path="LED_Prolight_RGB.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="7segment10an" modelIndex="24" path="7segment_9,9_an.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="LED_Matrix_Kingbright_TA07-11" modelIndex="24" path="LED_Matrix_Kingbright_TA07-11.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance>-->
KjellMorgenstern marked this conversation as resolved.
Show resolved Hide resolved
<instance modelIndex="26" moduleIdRef="1000FADF10011leg" path="dc_motor.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="38" moduleIdRef="4001_4_x_2_input_NOR_gate_multipart">
<!--
<instance moduleIdRef="9f2b90fcf9c65c9bc09d570e3442069e" modelIndex="28" path="solenoid.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="1099ABDE24_ST_relay" modelIndex="29" path="basic-relay.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance><instance moduleIdRef="71d4db74a3a0ec43d9303ddffee7361b" modelIndex="29" path="DIP_Relay_D31A.fzp"><views><iconView layer="icon"><geometry z="-1" x="-1" y="-1"/></iconView></views></instance>-->
<instance modelIndex="3" moduleIdRef="__spacer__" path="ICs">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
-->
<!--
<instance modelIndex="33" moduleIdRef="a59353bd0db0225dc22770e292c622f3" path="lm358.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="34" moduleIdRef="1001AAAB555Timer" path="555timer.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="35" moduleIdRef="1001AAACOptocoupler" path="optocoupler.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="36" moduleIdRef="a4f38a10-dd92-11dd-a3e2-001f5b3a17a4" path="h-bridge.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="36" moduleIdRef="1a7828b6466fac9fd042221e931124c4" path="74HC595.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="36" moduleIdRef="HEF4094" path="HEF4094.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance moduleIdRef="RevEd_FRM050"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance moduleIdRef="RevEd_ULN2003A"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="38" moduleIdRef="CrystalModuleID" path="crystal.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="38" moduleIdRef="37asdf3c843a2127a0e499f8a0b3ef6aCrystalModuleID" path="resonator-3pin.fzp"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="38" moduleIdRef="4001_4_x_2_input_NOR_gate_single"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="38" moduleIdRef="4001_4_x_2_input_NOR_gate_multipart"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance>-->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the line breaks intentionally removed? Since the section is commented out, maybe it can entirely be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My tool for auto-indent removes the line breaks for the commented lines. These lines are commented as these parts do not have SPICE fields currently, but they could be added more or less easily. It is a kind of TODO list for me, but we can remove them if you prefer it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, great. I am working with someone to add more SPICE fields right now. The it would make sense to start with those parts, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Stating with these ones makes sense. However, there are a few that will not be useful until we extend the simulator to work with transitory analysis, such as the 555, the HEF4094 or the 74HC595. Maybe they could be a second step.

I have a functional example of an NAND gate, but I would like to add some LEDs at the input and output to show the signals. But my model does not handle well the LEDs (the NAND gate cannot drive the LEDs). Maybe I could send it to you and the person can use it as a starting point.

<instance modelIndex="38" moduleIdRef="4011_4_x_2_input_NAND_gate_multipart">
<views>
<iconView layer="icon">
Expand All @@ -269,35 +192,7 @@
</views>
</instance>
<!--
<instance modelIndex="38" moduleIdRef="4070_4_x_2_input_XOR_gate_multipart">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="38" moduleIdRef="4071_4_x_2_input_OR_gate_multipart">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="38" moduleIdRef="4077_4_x_2_input_XNOR_gate_multipart">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="38" moduleIdRef="4081_4_x_2_input_AND_gate_multipart">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
-->
<instance modelIndex="38" moduleIdRef="4070_4_x_2_input_XOR_gate_multipart"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="38" moduleIdRef="4071_4_x_2_input_OR_gate_multipart"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="38" moduleIdRef="4077_4_x_2_input_XNOR_gate_multipart"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance><instance modelIndex="38" moduleIdRef="4081_4_x_2_input_AND_gate_multipart"><views><iconView layer="icon"><geometry x="-1" y="-1" z="-1"/></iconView></views></instance>-->
KjellMorgenstern marked this conversation as resolved.
Show resolved Hide resolved
<instance modelIndex="3" moduleIdRef="__spacer__" path="Power">
<views>
<iconView layer="icon">
Expand Down
2 changes: 1 addition & 1 deletion core/LED-generic-3mm.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<property name="package">3 mm [THT]</property>
<property name="family">LED</property>
<property name="color" showInLabel="yes">Red (633nm)</property>
<property name="current" showInLabel="yes">0.030</property>
<property name="current">0.030A</property>
<property name="leg" >yes</property>
</properties>
<description>A generic red LED (~1.8V)</description>
Expand Down
2 changes: 1 addition & 1 deletion core/LED-generic-5mm.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<property name="package">5 mm [THT]</property>
<property name="family">LED</property>
<property name="color" showInLabel="yes">Red (633nm)</property>
<property name="current" showInLabel="yes">0.030</property>
<property name="current">0.030A</property>
<property name="leg" >yes</property>
</properties>
<description>A generic red LED (~1.8V)</description>
Expand Down
2 changes: 1 addition & 1 deletion core/SMD_LED_generic_0603.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<property name="package">0603 [SMD]</property>
<property name="family">LED</property>
<property name="color" showInLabel="yes">Red (633nm)</property>
<property name="current" showInLabel="yes"/>
<property name="current"/>
</properties>
<description>A generic blue LED (~1.8V)</description>
<spice>
Expand Down
2 changes: 1 addition & 1 deletion core/SMD_LED_generic_0805.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<property name="package">0805 [SMD]</property>
<property name="family">LED</property>
<property name="color" showInLabel="yes">Red (633nm)</property>
<property name="current" showInLabel="yes"/>
<property name="current"/>
</properties>
<description>A generic blue LED (~1.8V)</description>
<spice>
Expand Down
2 changes: 1 addition & 1 deletion core/SMD_LED_generic_1206.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<property name="package">1206 [SMD]</property>
<property name="family">LED</property>
<property name="color" showInLabel="yes">Red (633nm)</property>
<property name="current" showInLabel="yes"/>
<property name="current"/>
</properties>
<description>A generic blue LED (~1.8V)</description>
<spice>
Expand Down
117 changes: 117 additions & 0 deletions core/led-rgb-4pin-anode_rbg_v5.fzp
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<module fritzingVersion="0.5.4b.05.18.4914" moduleId="0d35715c371dab9d8b52b3c09444f755ColorLEDModuleID">
<version>5</version>
<author>stefanhermann</author>
<title>RGB LED (com. anode, rbg)</title>
<label>LED</label>
<date>2009-06-22</date>
<tags>
<tag>RGB LED</tag>
<tag>full color</tag>
<tag>indicator</tag>
</tags>
<properties>
<property name="package">5 mm [THT]</property>
<property name="family">LED</property>
<property name="pin order">rbg</property>
<property name="polarity">common anode</property>
<property name="current">0.030A</property>
<property name="rgb">RGB</property>
<property name="part number"></property>
</properties>
<description>A 5mm tri-color LED with red, green and blue inside.
Pin order: red - com. anode - blue - green</description>
<spice>
<model>*Typ RED,GREEN,YELLOW,AMBER GaAs LED: Vf=2.1V Vr=4V If=40mA trr=3uS</model>
<model>.MODEL LED_GENERIC D (IS=93.1P RS=42M N=4.61 BV=9 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U)</model>
<line>D{instanceTitle}R {net connector1} {net connector0} LED_GENERIC</line>
<line>D{instanceTitle}G {net connector1} {net connector3} LED_GENERIC</line>
<line>D{instanceTitle}B {net connector1} {net connector2} LED_GENERIC</line>
</spice>
<views>
<iconView>
<layers image="icon/led-rgb-4pin-anode.svg">
<layer layerId="icon"/>
</layers>
</iconView>
<breadboardView>
<layers image="breadboard/led-rgb-4pin-anode-leg.svg">
<layer layerId="breadboard"/>
</layers>
</breadboardView>
<schematicView>
<layers image="schematic/led-rbg-4pin-anode.svg">
<layer layerId="schematic"/>
</layers>
</schematicView>
<pcbView>
<layers image="pcb/LED-TRICOLOR-THROUGHHOLE_SparkFun.svg">
<layer layerId="copper0"/>
<layer layerId="copper1"/>
<layer layerId="silkscreen"/>
</layers>
</pcbView>
</views>
<connectors>
<connector id="connector0" type="male" name="red cathode">
<description>cathode pin for red LED</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector0pin" legId="connector0leg"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector0pin" terminalId="connector0terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector0pad"/>
<p layer="copper0" svgId="connector0pad"/>
</pcbView>
</views>
</connector>
<connector id="connector1" type="male" name="common anode">
<description>anode pin for every color, supply +voltage</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector1pin" legId="connector1leg"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector1pin" terminalId="connector1terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector1pad"/>
<p layer="copper0" svgId="connector1pad"/>
</pcbView>
</views>
</connector>
<connector id="connector2" type="male" name="blue cathode">
<description>cathode pin for blue LED</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector2pin" legId="connector2leg"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector3pin" terminalId="connector3terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector2pad"/>
<p layer="copper0" svgId="connector2pad"/>
</pcbView>
</views>
</connector>
<connector id="connector3" type="male" name="green cathode">
<description>cathode pin for green LED</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector3pin" legId="connector3leg"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector2pin" terminalId="connector2terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector3pad"/>
<p layer="copper0" svgId="connector3pad"/>
</pcbView>
</views>
</connector>
</connectors>
</module>
Loading