Version 4 SHEET 1 880 680 WIRE -320 208 -320 176 WIRE -320 320 -320 288 WIRE -64 512 -64 208 WIRE -16 384 -16 240 WIRE 0 176 -320 176 WIRE 16 208 -64 208 WIRE 16 240 -16 240 WIRE 32 288 32 272 WIRE 32 384 -16 384 WIRE 32 384 32 368 WIRE 32 416 32 384 WIRE 32 512 -64 512 WIRE 32 512 32 496 WIRE 32 528 32 512 WIRE 32 624 32 608 WIRE 64 272 32 272 WIRE 112 176 0 176 WIRE 112 208 16 208 WIRE 112 240 16 240 WIRE 112 272 64 272 WIRE 144 352 144 320 WIRE 176 128 176 80 WIRE 176 544 176 512 WIRE 176 624 176 608 WIRE 208 80 176 80 WIRE 208 512 176 512 WIRE 288 192 256 192 FLAG -320 320 0 FLAG 208 512 VCC FLAG 208 80 VCC FLAG 176 624 0 FLAG 288 192 OUT FLAG 32 624 0 FLAG 144 352 0 FLAG 0 176 IN FLAG 64 272 REF FLAG 16 208 REF1 FLAG 16 240 HYST SYMBOL Misc\\cell 176 544 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL voltage -320 192 R0 WINDOW 3 -63 169 Left 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR Value PULSE(0 2 0 1m 1m 1u 2m) SYMATTR InstName V2 SYMBOL MAX921 176 128 R0 SYMATTR InstName U1 SYMBOL res 16 272 R0 SYMATTR InstName R1 SYMATTR Value 47k SYMBOL res 16 512 R0 SYMATTR InstName R2 SYMATTR Value 1MEG SYMBOL res 16 400 R0 SYMATTR InstName R3 SYMATTR Value 120k TEXT -338 76 Left 0 !.tran 0 5m 0 TEXT -336 -408 Left 0 ;The MAX921 model required a change to get the hysteresis control feature!\nTotal hysteresis is 2*(V(REF-V(HYST)).\n \n* Next line added to repair the model for hysteresis \nBI51 51 0 I=(V(3)+V(4))*0.5e-6\n \nThere is still another issue with some amount of dependence of \nthe hysteresis from the voltage on the Vin- input pin.\n \nTry with the Alternate solver to see which solver is faster with your circuit.\nControl Panel -> SPICE Solver: Alternate\nPlot V(IN) and V(OUT).\n \nThe symbol points to the model file MAX921.FAM .\nKeep the symbol, model and schematic in one folder. TEXT -344 104 Left 0 !.options plotwinsize=0 TEXT -40 488 Left 0 ;1V