Hi wolfrain,
you can insert this as a Spice Directive:
.MEAS TRAN t2 V(Out_Osc) WHEN V(Out_Osc) = {Vdd*3/5} rise=10
.MEAS TRAN t1 V(Out_Osc) WHEN V(Out_Osc) = {Vdd*3/5} rise=9
.MEAS TRAN freq1 PARAM 1/(t2-t1)
in this case Vdd is a parameter (Vdd=5.0). The measure will be done when the signal rises and reaches 3.0V.
After run is completed go to View/Spice Error Log, scroll down and you will see something like this:
t2: v(out_osc)=3 AT 4.96755e-007
t1: v(out_osc)=3 AT 4.49039e-007
freq1: 1/(t2-t1)=2.09573e+007
In this Case only one period was considered. You can also consider let's say 6 periods and make an average, like this:
.MEAS TRAN t4 V(Out_Osc) WHEN V(Out_Osc) = {Vdd*3/5} rise=10
.MEAS TRAN t3 V(Out_Osc) WHEN V(Out_Osc) = {Vdd*3/5} rise=4
.MEAS TRAN freq2 PARAM 6/(t4-t3)
the results will look like this:
t4: v(out_osc)=3 AT 4.96755e-007
t3: v(out_osc)=3 AT 2.10457e-007
freq2: 6/(t4-t3)=2.09572e+007
in both measurements the frequency is about 21MHz.
You can also place the cursors in the waveform viewer (cursor1 and cursor2) and you can read the frequency there directly.
Hope this helped!
Regards,