2013-12-31 16:35:08 +01:00
|
|
|
/*
|
|
|
|
* ne555_astable.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "netlist/devices/net_lib.h"
|
|
|
|
|
|
|
|
NETLIST_START(ne555_astable)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Astable ne555
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Standard stuff */
|
|
|
|
|
2014-01-19 16:51:25 +01:00
|
|
|
SOLVER(Solver)
|
|
|
|
PARAM(Solver.FREQ, 48000)
|
2013-12-31 16:35:08 +01:00
|
|
|
|
2014-01-19 16:51:25 +01:00
|
|
|
ANALOG_INPUT(V5, 5) // 5V
|
2013-12-31 16:35:08 +01:00
|
|
|
|
|
|
|
/* Wiring up the ne555 */
|
|
|
|
|
|
|
|
// astable NE555, 1.13 ms period
|
|
|
|
|
2014-01-19 16:51:25 +01:00
|
|
|
RES(RA, 5000)
|
|
|
|
RES(RB, 3000)
|
|
|
|
CAP(C, 0.15e-6)
|
|
|
|
NE555(555)
|
2013-12-31 16:35:08 +01:00
|
|
|
|
|
|
|
NET_C(GND, 555.GND)
|
|
|
|
NET_C(V5, 555.VCC)
|
|
|
|
NET_C(V5, 555.RESET)
|
|
|
|
|
|
|
|
NET_C(RA.1, 555.VCC)
|
|
|
|
NET_C(RA.2, 555.DISCH)
|
|
|
|
|
|
|
|
NET_C(RB.1, 555.DISCH)
|
|
|
|
NET_C(RB.2, 555.TRIG)
|
|
|
|
|
|
|
|
NET_C(RB.2, 555.THRESH)
|
|
|
|
|
|
|
|
NET_C(555.TRIG, C.1)
|
|
|
|
NET_C(C.2, GND)
|
|
|
|
|
2014-01-19 16:51:25 +01:00
|
|
|
LOG(log2, C.1)
|
|
|
|
LOG(log3, 555.OUT)
|
2013-12-31 16:35:08 +01:00
|
|
|
|
|
|
|
NETLIST_END()
|