--- In LTspice@..., "Tony Casey" <tony@...> wrote:
--- In LTspice@..., "Apparajan" <dg1@> wrote:
How do you measure frequency of an oscillator accurately in LTspice..( I probably need this for .disto to work well)
cheers
AG
Hello AG
.meas TRAN Trise find time when V(out)=0 rise=3
.meas TRAN Trise2 find time when V(out)=0 rise=4
.meas TRAN Tfall find time when V(out)=0 fall=3
.meas TRAN Ton param Tfall-Trise
.meas TRAN Period param Trise2-Trise
.meas TRAN Frequency param 1/(Trise2-Trise)
.meas TRAN DutyCycle param Ton/Period*100
... should cover most of your needs.
Regards,
Tony
Hi,
If there is a section in LTwiki to show examples for specific calculations, this would be a good example to be added under the title "Frequency and duty cycle".
I admit that for most of us this example is rather obvious but not for scared/confused users running a simulator for the first time :)
For the more complicated situations, I used to archive every solution I found adequate under an appropriate title that I can find easily by searching anytime later.
Kerim