library[mosmodels]; library[stdfunctions]; circuit[Lambda_ 2.5, Temp_ 25]= { Vdd: node; ! ThymeBasics.thy ! NMos4.0u25.thy powerSupply: voltage[Vdd, Gnd]= 5.0; Vb, PreC, Reset: node; V2: Voltage[Vb, Gnd] = 1.1; V3: OneShot[PreC|tRise_10ns, tFall_10ns, width_500ns]; Cc5: Capacitor[Reset, Gnd] = 0.1E-12; t6: DTran[Reset, Vdd, Reset| L_16, W_2]; C1a, C2a, C3a, C4a, Outa, VPreCa: node; C1, C2, C3, C4, Out, VPreC: node; t1: ETran[Vb, C2, C1| L_2, W_8]; t2: ETran[PreC, Vdd, C1| L_2, W_8]; t3: DTran[C3, Vdd, C3| L_16, W_2]; t4: ETran[C1, C3, Gnd| L_2, W_4]; t5: ETran[C3a, C3, Gnd| L_2, W_4]; t7: ETran[C3, Reset, Gnd| L_2, W_8]; t8: DTran[Out, Vdd, Out| L_4, W_2]; t9: ETran[C3, Out, Gnd| L_2, W_4]; t10: ETran[PreC, C1, C4|L_4, W_2]; t11: ETran[VPreC, C4, Gnd|L_4, W_2]; Cc1: Capacitor[C1, Gnd] = 0.11E-12; Cc2: Capacitor[C2, Gnd] = 6.4E-12; Cc3: Capacitor[C3, Gnd] = 0.78E-12; Cc4: Capacitor[Out, Gnd] = 0.1E-12; V1: Current[C2, Gnd] = 0.5E-06; V4: Voltage[VPreC, Gnd] = 3.5; t1a: ETran[Vb, C2a, C1a| L_2, W_8]; t2a: ETran[PreC, Vdd, C1a| L_2, W_8]; t3a: DTran[C3a, Vdd, C3a| L_16, W_2]; t4a: ETran[C1a, C3a, Gnd| L_2, W_4]; t5a: ETran[C3, C3a, Gnd| L_2, W_4]; t7a: ETran[C3a, Reset, Gnd| L_2, W_8]; t8a: DTran[Outa, Vdd, Outa| L_4, W_2]; t9a: ETran[C3a, Outa, Gnd| L_2, W_4]; t10a: ETran[PreC, C1a, C4a|L_4, W_2]; t11a: ETran[VPreCa, C4a, Gnd|L_4, W_2]; Cc1a: Capacitor[C1a, Gnd] = 0.11E-12; Cc2a: Capacitor[C2a, Gnd] = 6.4E-12; Cc3a: Capacitor[C3a, Gnd] = 0.78E-12; Cc4a: Capacitor[Outa, Gnd] = 0.1E-12; V1a: Current[C2a, Gnd] = 0.5E-06; V4a: Voltage[VPreCa, Gnd] = 0; }; ic[C2_0.28, C2a_0.28]; print[:100ns, C2, C1]; plot["Optical Mouse", :1000ns, 0, 5, Out, C3, C2, C1, Outa, C3a, C2a, C1a]; run[tMax _ 2500ns];