summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/examples/turkey_shoot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/examples/turkey_shoot.cpp')
-rw-r--r--src/lib/netlist/examples/turkey_shoot.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/lib/netlist/examples/turkey_shoot.cpp b/src/lib/netlist/examples/turkey_shoot.cpp
index 4921f866c6e..e5b7f26c72e 100644
--- a/src/lib/netlist/examples/turkey_shoot.cpp
+++ b/src/lib/netlist/examples/turkey_shoot.cpp
@@ -2,31 +2,31 @@
// copyright-holders:Couriersud
/*
- * This example illustrates how to use netlist to derive RGB output
+ * This example illustrates how to use netlist to derive RGB output
* levels from complex output circuits.
- *
+ *
* Create x.cpp:
- #include <cstdio>
-
- int main()
- {
- // Change IC86 output every micro second starting at 1ms
- for (std::size_t i=0;i<256;i++)
- printf("%.9f,IC86.D.IN,%d\n", (double) i / 1.0e6 + 1.0e-3, (int)i);
- }
-
- * Run these commands:
- *
+ #include <cstdio>
+
+ int main()
+ {
+ // Change IC86 output every micro second starting at 1ms
+ for (std::size_t i=0;i<256;i++)
+ printf("%.9f,IC86.D.IN,%d\n", (double) i / 1.0e6 + 1.0e-3, (int)i);
+ }
+
+ * Run these commands:
+ *
* c++ x.cpp
* ./a.out > src/lib/netlist/examples/turkey_shoot.csv
* ./nltool -c run -t 0.0013 -f src/lib/netlist/examples/turkey_shoot.cpp -i src/lib/netlist/examples/turkey_shoot.csv -l BLUE
* ./nlwav -f tab -o x.tab -s 0.0010005 -i 0.000001 -n 256 log_BLUE.log
- *
+ *
* x.tab now contains 256 values representing the different output levels:
* low 4 bits: color value
* high 4 bits: attenuation value
- *
+ *
*/
@@ -90,7 +90,7 @@ NETLIST_START(turkey_shoot_vga)
LOCAL_SOURCE(SHIM74LS374_DIP)
LOCAL_LIB_ENTRY(SHIM74LS374_DIP)
-
+
INCLUDE(turkey_shoot_schematics)
NETLIST_END()
@@ -101,9 +101,9 @@ NETLIST_START(turkey_shoot_schematics)
ANALOG_INPUT(I_V5, 5)
TTL_INPUT(BLANK, 0)
-
+
IND(L1, 0.0000047)
-
+
CAP(C60, CAP_U(0.1))
CAP(C54, CAP_P(47))
CAP(C57, CAP_P(47))
@@ -119,7 +119,7 @@ NETLIST_START(turkey_shoot_schematics)
RES(R11, RES_K(3.9))
RES(R12, RES_K(2))
RES(R13, RES_K(1))
-
+
RES(R35, RES_K(2.2))
RES(R36, RES_K(2.7))
RES(R31, 270)
@@ -138,13 +138,13 @@ NETLIST_START(turkey_shoot_schematics)
DIODE(D7, "1N4148")
DIODE(D8, "1N4148")
DIODE(D17, "1N4148")
-
+
QBJT_EB(Q3, "2N3904")
QBJT_EB(Q4, "2N3904")
QBJT_EB(Q5, "2N3904")
SHIM74LS374_DIP(IC86)
-
+
NET_C(D8.K, IC86.19)
NET_C(D7.K, IC86.16)
NET_C(D6.K, IC86.15)
@@ -173,20 +173,20 @@ NETLIST_START(turkey_shoot_schematics)
NET_C(I_V12, L1.1)
NET_C(Q4.E, R30.1, R29.1, R28.1, R31.1)
-
+
NET_C(GND, R31.2, R29.2, R28.2)
NET_C(R6.2, R7.2, R8.2, R9.2, R30.2, Q3.B)
NET_C(I_V5, Q3.C)
- NET_C(GND, C54.2, R22.2)
+ NET_C(GND, C54.2, R22.2)
NET_C(Q3.E, D17.A)
NET_C(D17.K, R22.1, R23.1)
NET_C(R23.2, C54.1)
-
+
NET_C(I_V5, IC86.20, BLANK.VCC)
NET_C(GND, IC86.10, BLANK.GND)
-
+
ALIAS(BLUE, C54.1)
-
+
NETLIST_END()