1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

LTspice: 'AND' device oddity. Is this a bug?

Discussion in 'Circuit Simulation & PCB Design' started by alec_t, Jun 14, 2018.

  1. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,730
    Likes:
    1,277
    Location:
    Cardiff, Wales
    I've just noticed that the AND device in the 'Digital' folder behaves oddly. A '1' and a '0' as inputs should provide a '0' output, but do so only if some resistance is included in the '0' input !!??
    AND-oddity.PNG
    What's going on?
    Is this a bug or a 'feature', given that the 'A' devices are apparentlyproprietary?
     
  2. eTech

    eTech Active Member

    Joined:
    Apr 25, 2012
    Messages:
    636
    Likes:
    72
    ONLINE
    Hi Alex..

    Heh...yes...confusing...but not a bug. This one fools a lot of users.:) Including me when I first started using LTspice:D

    The AND gate is used for many different types of AND functions, like an NAND gate for example.
    When an input is connected directly to ground (like with an LTspice ground symbol), LTspice treats it as an unused pin and eliminates the pin from the circuit. So its basically ignored. Unused pins should be left unconnected. If you need in input to be active, pull it high, or low (with a resistor), or connect it to another component. The A devices aren't really intended to be used in their bare form, but to be encapsulated with other devices to form a complete logic function.

    Some of this is described in the LTspice Help.

    Hope that helps...

    eT
     
    • Informative Informative x 2
    • Thanks Thanks x 1
  3. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,730
    Likes:
    1,277
    Location:
    Cardiff, Wales
    Thanks for the helpful info. Now that you mention it I do recall reading about the 'ignore pin' feature. It may partly explain the CD4013 model not following the datasheet when both the Set and Reset pins are pulled high?
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. eTech

    eTech Active Member

    Joined:
    Apr 25, 2012
    Messages:
    636
    Likes:
    72
    ONLINE
    Hi

    No...I actually discovered and reported that CD4013B bug to the LTspice group a few years ago. They have since fixed it..so your probably using an old library.

    eT
     
  6. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,730
    Likes:
    1,277
    Location:
    Cardiff, Wales
    I also reported the 4013 problem a few years ago but got nowhere. The latest LTS update (a couple of weeks ago) seems to have 'un-fixed' the problem, as well as introducing arbitrary font size changes to some symbols :rolleyes:.

    Edit:
    I've just re-installed the latest CD4000 model files from the Yahoo group and all seems well. The CD4013 now behaves itself and font size is restored to normal :).
     
    Last edited: Jun 15, 2018
  7. eTech

    eTech Active Member

    Joined:
    Apr 25, 2012
    Messages:
    636
    Likes:
    72
    ONLINE
    Hi...I checked my library file...it was fixed about 9/13/2013...

    * Revision 0.64 09/13/2013 force Q=high if R AND S are high

    Yes...I noticed the default font size seems to have changed in LTspice recently. Mine is showing up 0.0625 :( argh!

    eT
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,730
    Likes:
    1,277
    Location:
    Cardiff, Wales
    Mine was doing that, though strangely for only some of the CD4000 symbols. I corrected a few but gave up.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice