diff options
Diffstat (limited to 'src/lib/netlist/examples/7400_astable.c')
-rw-r--r-- | src/lib/netlist/examples/7400_astable.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/netlist/examples/7400_astable.c b/src/lib/netlist/examples/7400_astable.c new file mode 100644 index 00000000000..207444568ea --- /dev/null +++ b/src/lib/netlist/examples/7400_astable.c @@ -0,0 +1,36 @@ +// license:CC0-1.0 +// copyright-holders:Couriersud +/* + * 7400_astable.c + * + */ + +#include "netlist/devices/net_lib.h" + +NETLIST_START(7400_astable) +{ + + /* + * Astable multivibrator using two 7400 gates (or inverters) + * + */ + + /* Standard stuff */ + + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-5) + + // astable NAND Multivibrator ==> f ~ 1.0 / (3 * R * C) + RES(R1, 4700) + CAP(C1, 0.22e-6) + TTL_7400_NAND(n1,R1.1,R1.1) + TTL_7400_NAND(n2,R1.2,R1.2) + NET_C(n1.Q, R1.2) + NET_C(n2.Q, C1.1) + NET_C(C1.2, R1.1) + + LOG(logC12, C1.2) + LOG(logn1Q, n1.Q) + LOG(logn2Q, n2.Q) + +} |