LTspice Problem with AND-Gate  - Page 1
Forum section: electronics / projects

author: Guy-from-Dresden
author_rank: Newbie
timestamp: July 02, 2024, 09:56:04 am
content: Hello everyone!Im simulating a small logic circuit with 4 Power-Good signals,if they are all in Ok state, i start my device.The problem is, simulation does what i expect but the Output of the4-AND Gate is only 1 Volt as High Level althogh the system voltage is 3,3 Volt.So i did some resaerch to the logic gates in LTspice, and I didnt have to provideSupply-voltage to the Logic Gates, so this is not the cause ..Maybe some Gentleman in this Forum got a idea whats the failure.Kind Regards, Guy

author: Guy-from-Dresden
author_rank: Newbie
timestamp: July 02, 2024, 10:01:30 am
content: Okay here is the Input/Output DiagramOne signal is 1,2Volt i switch it with a Komparator to 3,3 -- but in thesimulation i measured the 1,2 Level ...

author: Guy-from-Dresden
author_rank: Newbie
timestamp: July 02, 2024, 10:20:28 am
content: So here is my attempt to isolate the Problem.I just tested the Logic Gate ...

author: moffy
author_rank: Super Contributor
timestamp: July 02, 2024, 10:37:46 am
content: If you look at the LTSpice help file under "LTSpice/Circuit Elements/A. Special Functions' you will find a full description of the logic gates and how to modify their voltage and yes the default behaviour is 0V to 1V logic.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2024, 10:38:23 am
content: LTSpice logic gates are crude behavioral model that simply output the ideal logic operation. It does not simulate the actual logic gates.If you want it to behave a certain way you need to set up its internal parameter. For example Vhigh and Vlow to change the output logic voltages.

author: Ian.M
author_rank: Super Contributor
timestamp: July 02, 2024, 10:40:05 am
content: To elaborate on Moffy's the answer is in the help file reply!Goto 'LTspice Simulator' => 'Circuit Elements' => 'A. Special Functions', and read (just above the first table):Quote from: LTspice HelpThere are more (non-output) parameters detailed in the text after the table.At a minimum, you will need to setVhigh. You should also setTdandTriserealistically, and alsotripdtto less than Trise/2 to avoid the simulator ignoring Td and Trise. It can also be useful to setRout.It can be helpful in multi-gate complex logic to useRef. (orVtandVhfor Schmidt devices) to set the input threshold independently from the output levels to implement level translation. This lets you have a 'layer' of input gates or buffers with input characteristics comparable to the real logic you are simulating, that translate down to LTspice's native 1V logic levels where you only care aboutTdandtripdt, then for output signals, use gates or buffers withRefset to 0.5 and the desired output characteristics to translate back up to 'real' logic levels.These parameters need to be added as a space or comma separated list to the end of the component line of the SPICE netlist. To do so from the schematic editor, see Help:'Schematic Capture' => 'Editing Components' => 'Super Expert Mode'I usually put them on the 'Value' and/or 'Value2' attribute line, and at least initially, to avoid confusion set those lines as visible! You can also use the 'SpiceLine' or 'SpiceLine2' attributes as ArdWar showed. It matters not, as they all get concatenated with spaces between in the netlist. Don't add them to or before any attribute line that has something other thanparameter=valuepairs on it.I like to set parameters common to all logic in the schematic on one of the attribute lines and gate specific parameters on another so I can simply copy/paste the common parameters from one gate to the next.

author: Guy-from-Dresden
author_rank: Newbie
timestamp: July 02, 2024, 11:50:46 am
content: Ok thank You all

author: Guy-from-Dresden
author_rank: Newbie
timestamp: July 02, 2024, 12:13:59 pm
content: Yeah sometimes is reading the ducomatation a good idea :-DBut I have to say that the configuration options on DC-sources in LTspiceis much user friendly.Aniway - its free program