mame/nl_examples/cdelay.c
Couriersud f3cf3a8e78 Preliminary support for LTE dynamic time-stepping based on Local truncation error. This enables the possibility to connect a capacitor between ground and a TTL output and get a e.g. 100 ns delay with a 1nF capacitor.
Added an example circuit (cdelay.c)
Changed the log device to support nano-second granularity.
LTE is not yet enabled due to it's ugly test-state.
2014-05-15 22:50:40 +00:00

31 lines
443 B
C

/*
* cdelay.c
*
*/
#include "netlist/devices/net_lib.h"
NETLIST_START(7400_astable)
/*
* delay circuit
*
*/
/* Standard stuff */
SOLVER(Solver, 48000)
PARAM(Solver.ACCURACY, 1e-20)
CLOCK(clk, 5000)
TTL_7400_NAND(n1,clk,clk)
CAP(C, 1e-9)
NET_C(n1.Q, C.2)
NET_C(GND, C.1)
TTL_7400_NAND(n2,n1.Q, n1.Q)
LOG(logclk, clk)
LOG(logn1Q, C.2)
LOG(logn2Q, n2.Q)
NETLIST_END()