summaryrefslogtreecommitdiffstatshomepage
path: root/nl_examples
diff options
context:
space:
mode:
author Couriersud <couriersud@users.noreply.github.com>2014-03-02 20:23:53 +0000
committer Couriersud <couriersud@users.noreply.github.com>2014-03-02 20:23:53 +0000
commit4fcf7b5bcf34d4b618ad24ee640fae78866e142b (patch)
tree9b4da561122d1ee0939f8fe6c79ac00a3b8706e6 /nl_examples
parent3e4d318b7956b4eca8dd72b67d9b6b5f7e065aaa (diff)
Implemented CD4066 device - Quad Bilateral Switch. [Couriersud]
Diffstat (limited to 'nl_examples')
-rw-r--r--nl_examples/cd4066.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/nl_examples/cd4066.c b/nl_examples/cd4066.c
new file mode 100644
index 00000000000..1db59b670ed
--- /dev/null
+++ b/nl_examples/cd4066.c
@@ -0,0 +1,44 @@
+/*
+ * bjt.c
+ *
+ */
+
+
+#include "netlist/devices/net_lib.h"
+
+NETLIST_START(cd4066)
+ /* Standard stuff */
+
+ CLOCK(clk, 1000) // 1000 Hz
+ SOLVER(Solver, 48000)
+
+ ANALOG_INPUT(V5, 5)
+
+ CD_4066_DIP(SW)
+ RES(R1, 1000)
+
+ NET_C(SW.7, GND)
+ NET_C(SW.14, V5)
+
+ NET_C(SW.13, clk)
+ NET_C(SW.1, V5)
+
+ NET_C(SW.2, R1.1)
+ NET_C(R1.2, GND)
+
+ // ground anything else
+
+ NET_C(SW.3, GND)
+ NET_C(SW.4, GND)
+ NET_C(SW.5, GND)
+ NET_C(SW.6, GND)
+ NET_C(SW.8, GND)
+ NET_C(SW.9, GND)
+ NET_C(SW.10, GND)
+ NET_C(SW.11, GND)
+ NET_C(SW.12, GND)
+
+ LOG(logB, clk)
+ LOG(logC, R1.1)
+
+NETLIST_END()