How to get a LM311 comparator into LTspice?

Flyback

Well-Known Member
Hi,
I have made the symbol, with correct numbering as per subckt file.
I then pasted the subckt file into the LTspice schem.
I then right clicked the symbol and made "prefix" be "x" and "value" be "LM311".

However, it still doesnt work , as attached.

I got the subckt file from ti.com

 

Attachments

  • LM311.asc
    12.9 KB · Views: 7
...Aaah...maybe i have gone outside the common mode range for inputs...just tried square wave 2v to 3v and its working. Sorry.
Even so, wow, i didnt realise LM311 was that useless as not to be able to accept a 0v,5v square wave input when its given a 5V single supply?
 

Attachments

  • LM311.asy
    515 bytes · Views: 5
Last edited:
i didnt realise LM311 was that useless as not to be able to accept a 0v,5v square wave input when its given a 5V single supply?
You just have to (gasp) follow the data sheet limits, which is 0.5V above the lower supply voltage (ground here). and 2V below the upper supply voltage (below).

The LM339 comparator has -1.5V upper limit, but the input can go down to zero when powered from a single 5V supply.

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…