Time step too small

Thread Starter

hisotaso

Joined May 21, 2013
1
Before I begin I would like to say I have spent about 5 hours today reading about others with this problem, none of the standard steps have worked.

I am working on a term-long project to design a VCO. The project is broken up in bi-weekly labs, each lab focusing on another aspect. One of the labs was to design a circuit capable of reading the frequency of an input signal up to ~10 MHz with accuracy >= 0.01%. My frequency measurement block meets the specifications up to 12 MHz. The frequency measurement block was tested using a provided VCO block.

I should add that the components I used to create my frequency measurement block were created by a recently retired professor, using as far as I can tell, undocumented LTSpice functions. This professor was known as the "hard-ass that never gives an A. Ever." The components consist of an edge counter, a cross detect, a first cross detect, and a behavioral source.

Now, I hook up my VCO to the frequency measurement block and I receive the error "Analysis: Timestep too small; initial timepoint: trouble with node "U5:shi". U5 is the edge counter referred to above, and shi corresponds to one of the nodes defined in the library file as "SAMPLEHOLD" as far as I can tell. This is the text corresponding to the component from the library file:

* edge_count
.subckt edge_count in out ref
.params td=10n vtrig=0 ic=0 tripdt=10p tripdv=10u tholdoff=1u
A1 shi 0 clk 0 0 0 out 0 SAMPLEHOLD vhigh=10g tripdt={tripdt} ic={ic}
B1 shi 0 V= int(1.5 + delay(v(out) - v(ref), {td})) tripdt={tripdt}
B2 clk 0 V=if(time < {tholdoff}, 1k, v(in) - v(ref) - {vtrig} + 0.5) tripdt={tripdt} tripdv={tripdv}
.ends edge_count

I have included the netlist, please let me know what else I need to provide. Thanks in advance.

JC

EDIT: I wanted to add that there is no wild oscillation at the output of the VCO, by measuring the period with the cursors I can see the frequency is about 915 kHz, so the measurement block should have no trouble with this. I'm thinking this has something to do with the hysteresis.
 

Attachments

Last edited:
Top