Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LTSPICE square wave

3,455 views
Skip to first unread message

bitrex

unread,
Jan 18, 2016, 1:12:32 PM1/18/16
to

Is there a way to make a square wave using the LTSPICE ac voltage
source which doesnt have a DC offset, i.e. alternates between -5
and +5, say? I can't seem to figure it out. Thanks.

--


----Android NewsGroup Reader----
http://usenet.sinaapp.com/

Przemek Klosowski

unread,
Jan 18, 2016, 1:23:06 PM1/18/16
to
On Mon, 18 Jan 2016 13:12:02 -0500, bitrex wrote:

> Is there a way to make a square wave using the LTSPICE ac voltage
> source which doesnt have a DC offset, i.e. alternates between -5 and
> +5, say? I can't seem to figure it out. Thanks.

two voltage sources in series, one doing PULSE() and the other with
negative Von/2

Jim Thompson

unread,
Jan 18, 2016, 1:37:20 PM1/18/16
to
On Mon, 18 Jan 2016 13:12:02 -0500 (EST), bitrex
<bit...@de.lete.earthlink.net> wrote:

>
>Is there a way to make a square wave using the LTSPICE ac voltage
> source which doesnt have a DC offset, i.e. alternates between -5
> and +5, say? I can't seem to figure it out. Thanks.

You don't use an _AC_ source to make a square wave, you use a Vpulse
source.

The notation is:

Vx PosNode NegNode PULSE -5V 5V {TD} {TR} {TF} {PW} {PER}

The timings should be obvious. However there is a trickiness...

Pulse-width {PW} is set to be true desired pulse width minus {TR}

I have created a true pulse source which has smooth TANH rise and fall
(natch ;-), and {PW} is the real-deal, no scratching of head required.
I haven't ported it to LTspice yet.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

Tim Wescott

unread,
Jan 18, 2016, 2:01:20 PM1/18/16
to
Jim Thompson <To-Email-Use-Th...@On-My-Web-Site.com>
Wrote in message:
And you DO want to have some real rise and fall time in there: Tha
solver can get cranky if you don't.
--
www.wescottdesign.com

Phil Hobbs

unread,
Jan 18, 2016, 2:05:26 PM1/18/16
to
Sure.

Voff = -5
Von = 5

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

John Larkin

unread,
Jan 18, 2016, 2:15:20 PM1/18/16
to
On Mon, 18 Jan 2016 13:12:02 -0500 (EST), bitrex
<bit...@de.lete.earthlink.net> wrote:

>
>Is there a way to make a square wave using the LTSPICE ac voltage
> source which doesnt have a DC offset, i.e. alternates between -5
> and +5, say? I can't seem to figure it out. Thanks.

One handy gadget is BV, the behavioral voltage source. It allows you
to type an equation to make a voltage from something else. You can
square up a sine wave like this:

Version 4
SHEET 1 880 680
WIRE 96 96 48 96
WIRE 128 96 96 96
WIRE 320 96 272 96
WIRE 352 96 320 96
WIRE 48 144 48 96
WIRE 272 144 272 96
WIRE 48 256 48 224
WIRE 272 256 272 224
FLAG 48 256 0
FLAG 272 256 0
FLAG 96 96 VX
FLAG 320 96 OUT
SYMBOL voltage 48 128 R0
WINDOW 0 55 73 Left 2
WINDOW 3 27 110 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value SINE(0 1 1)
SYMBOL bv 272 128 R0
WINDOW 0 63 61 Left 2
WINDOW 3 29 106 Left 2
SYMATTR InstName B1
SYMATTR Value V=5*sgn(V(VX))
TEXT -144 224 Left 2 !.tran 5
TEXT -200 112 Left 2 ;Sine to Square
TEXT -176 152 Left 2 ;JL Jan 2016

That lets you specify the frequency in Hz, as opposed to the pulse
source which makes you work in pulse width and period.




--

John Larkin Highland Technology, Inc
picosecond timing precision measurement

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com

Tim Williams

unread,
Jan 18, 2016, 2:20:59 PM1/18/16
to
"Tim Wescott" wrote in message
news:D9GdnbquM77lqwDL...@giganews.com...
>
> And you DO want to have some real rise and fall time in there: Tha
> solver can get cranky if you don't.


Indeed, there is no such thing as an "ideal square wave"; a real, physical
signal must be continuous (including derivatives blah blah), and therefore
must have a nonzero rise/fall time.

The solver "getting cranky" is a subtle hint that you're trying to model
something that cannot exist. :)

Tim

--
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Contract Design
Website: http://seventransistorlabs.com


John Fields

unread,
Jan 18, 2016, 3:11:38 PM1/18/16
to
On Mon, 18 Jan 2016 13:12:02 -0500 (EST), bitrex
<bit...@de.lete.earthlink.net> wrote:

>
>Is there a way to make a square wave using the LTSPICE ac voltage
> source which doesnt have a DC offset, i.e. alternates between -5
> and +5, say? I can't seem to figure it out. Thanks.

---
There is, but why would you want to when you could use a pulse source
with a V initial of -5 volts and a Von 0f 5 volts?

John Fields

bitrex

unread,
Jan 18, 2016, 3:39:01 PM1/18/16
to
Phil Hobbs <pcdhSpamM...@electrooptical.net> Wrote in message:
There doesn't appear to be any option for that with the v pulse
source, just "v_initial" and "v_on"

Joerg

unread,
Jan 18, 2016, 3:42:48 PM1/18/16
to
On 2016-01-18 12:38, bitrex wrote:
> Phil Hobbs <pcdhSpamM...@electrooptical.net> Wrote in message:
>> On 01/18/2016 01:20 PM, Przemek Klosowski wrote:
>>> On Mon, 18 Jan 2016 13:12:02 -0500, bitrex wrote:
>>>
>>>> Is there a way to make a square wave using the LTSPICE ac voltage
>>>> source which doesnt have a DC offset, i.e. alternates between -5 and
>>>> +5, say? I can't seem to figure it out. Thanks.
>>>
>>> two voltage sources in series, one doing PULSE() and the other with
>>> negative Von/2
>>>
>>
>> Sure.
>>
>> Voff = -5
>> Von = 5
>>

That solution is too simple! :-)


>> Cheers
>>
>> Phil Hobbs
>>
>> --
>> Dr Philip C D Hobbs
>> Principal Consultant
>> ElectroOptical Innovations LLC
>> Optics, Electro-optics, Photonics, Analog Electronics
>>
>> 160 North State Road #203
>> Briarcliff Manor NY 10510
>>
>> hobbs at electrooptical dot net
>> http://electrooptical.net
>>
>
> There doesn't appear to be any option for that with the v pulse
> source, just "v_initial" and "v_on"
>

It's the same thing. Give it a try.

--
Regards, Joerg

http://www.analogconsultants.com/

bitrex

unread,
Jan 18, 2016, 3:44:50 PM1/18/16
to
John Fields <jfi...@austininstruments.com> Wrote in message:
Setting V_initial at -5 doesnt seem to do anything.

Joerg

unread,
Jan 18, 2016, 3:49:11 PM1/18/16
to
You can make almost any part behavioral, like a resistor whose value
depends on the local rain forecast. As long as one does keep in mind
when LTSpice becomes a princess on the pea, such as when resistor values
drp to zero or get too close to it.

Joerg

unread,
Jan 18, 2016, 3:52:31 PM1/18/16
to
On 2016-01-18 12:44, bitrex wrote:
> John Fields <jfi...@austininstruments.com> Wrote in message:
>> On Mon, 18 Jan 2016 13:12:02 -0500 (EST), bitrex
>> <bit...@de.lete.earthlink.net> wrote:
>>
>>>
>>> Is there a way to make a square wave using the LTSPICE ac voltage
>>> source which doesnt have a DC offset, i.e. alternates between -5
>>> and +5, say? I can't seem to figure it out. Thanks.
>>
>> ---
>> There is, but why would you want to when you could use a pulse source
>> with a V initial of -5 volts and a Von 0f 5 volts?
>>
>> John Fields
>>
>>
>
> Setting V_initial at -5 doesnt seem to do anything.
>

It does in all my schematics where I needed that. Can you post yours
here as an ASCII list?

John Larkin

unread,
Jan 18, 2016, 4:01:07 PM1/18/16
to
On Mon, 18 Jan 2016 12:49:09 -0800, Joerg <ne...@analogconsultants.com>
wrote:
Can a resistor value track some node voltage in real time?

John Larkin

unread,
Jan 18, 2016, 4:02:59 PM1/18/16
to
Pulse sources are a minor nuisance to program, if what you care about
is frequency.

bitrex

unread,
Jan 18, 2016, 4:21:26 PM1/18/16
to
Joerg <ne...@analogconsultants.com> Wrote in message:
I found the problem! The voltage source was feeding a voltage
doubler and I had only put the ground on the other side of the
rectifiers. I forgot to add another ground symbol at the voltage
source. It worked but it didn't know where ground
was...

bitrex

unread,
Jan 18, 2016, 4:25:03 PM1/18/16
to
bitrex <bit...@de.lete.earthlink.net> Wrote in message:
Only problem is, now it doesn't double correctly as the diodes are
connected to ground and not AC. Hmmm...

Jeroen Belleman

unread,
Jan 18, 2016, 4:29:40 PM1/18/16
to
On 18/01/16 22:00, John Larkin wrote:
> On Mon, 18 Jan 2016 12:49:09 -0800, Joerg <ne...@analogconsultants.com>
> wrote:
>
[...]
>>
>> You can make almost any part behavioral, like a resistor whose value
>> depends on the local rain forecast. As long as one does keep in mind
>> when LTSpice becomes a princess on the pea, such as when resistor values
>> drp to zero or get too close to it.
>
> Can a resistor value track some node voltage in real time?
>
>

Sort of. You can use a behavioral current source like below.
This only works for transient analysis.

Jeroen Belleman

-------------------------
Version 4
SHEET 1 880 680
WIRE -16 112 -96 112
WIRE 48 112 -16 112
WIRE 240 112 192 112
WIRE 272 112 240 112
WIRE -96 144 -96 112
WIRE 48 144 48 112
WIRE 192 144 192 112
WIRE 272 144 272 112
WIRE -96 256 -96 224
WIRE 48 256 48 224
WIRE 192 256 192 224
WIRE 272 256 272 224
FLAG 272 256 0
FLAG 48 256 0
FLAG 192 256 0
FLAG 240 112 resistance
FLAG -96 256 0
FLAG -16 112 val
SYMBOL voltage 48 128 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value SINE(0 1 10)
SYMBOL voltage 272 128 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value PULSE(1 2 1 1 1 3)
SYMBOL res 176 128 R0
SYMATTR InstName R1
SYMATTR Value 1R
SYMBOL bi -96 144 R0
WINDOW 3 22 159 Left 2
SYMATTR InstName B1
SYMATTR Value I=v(val)/v(resistance)
TEXT 88 56 Left 2 !.tran 10

Joerg

unread,
Jan 18, 2016, 4:30:11 PM1/18/16
to
Yes. In the same way you did it you just enter an expression such as
R=((V(X))*1MEG) in place of the resistor value and then it'll follow
node X with whatever formula you drape around it. Quite handy for
simulating LDRs, strain gauges or potmeter actuation.

Joerg

unread,
Jan 18, 2016, 4:32:38 PM1/18/16
to
Not sure what you are trying to do but if you need a part of a circuit
to float where SPICE does not like it you can connect it via 100MEG or
some other high value that doesn't matter much. Just not too high so the
solver doesn't hit a ceiling.

Jeroen Belleman

unread,
Jan 18, 2016, 4:34:52 PM1/18/16
to
On 18/01/16 22:30, Joerg wrote:
> On 2016-01-18 13:00, John Larkin wrote:
>> On Mon, 18 Jan 2016 12:49:09 -0800, Joerg <ne...@analogconsultants.com>
>> wrote:
[...]
>>> You can make almost any part behavioral, like a resistor whose value
>>> depends on the local rain forecast. As long as one does keep in mind
>>> when LTSpice becomes a princess on the pea, such as when resistor values
>>> drp to zero or get too close to it.
>>
>> Can a resistor value track some node voltage in real time?
>>
>
> Yes. In the same way you did it you just enter an expression such as
> R=((V(X))*1MEG) in place of the resistor value and then it'll follow
> node X with whatever formula you drape around it. Quite handy for
> simulating LDRs, strain gauges or potmeter actuation.
>

Oh! That's even better. I wasn't aware of that! Thanks Joerg!

Jeroen Belleman


Phil Hobbs

unread,
Jan 18, 2016, 4:56:06 PM1/18/16
to
V_initial = -5
V_on = 5

bitrex

unread,
Jan 18, 2016, 5:11:53 PM1/18/16
to
Ok will try

John Larkin

unread,
Jan 18, 2016, 6:47:00 PM1/18/16
to
On Mon, 18 Jan 2016 13:30:05 -0800, Joerg <ne...@analogconsultants.com>
wrote:

>>
>> Can a resistor value track some node voltage in real time?
>>
>
>Yes. In the same way you did it you just enter an expression such as
>R=((V(X))*1MEG) in place of the resistor value and then it'll follow
>node X with whatever formula you drape around it. Quite handy for
>simulating LDRs, strain gauges or potmeter actuation.


I can't get that to work.


Version 4
SHEET 1 880 680
WIRE 80 64 48 64
WIRE 112 64 80 64
WIRE 288 64 176 64
WIRE 448 64 288 64
WIRE 48 112 48 64
WIRE 448 112 448 64
WIRE 176 128 176 64
WIRE 288 128 288 64
WIRE 48 240 48 192
WIRE 176 240 176 192
WIRE 288 240 288 208
WIRE 448 240 448 192
FLAG 48 240 0
FLAG 176 240 0
FLAG 288 240 0
FLAG 448 240 0
FLAG 80 64 VX
SYMBOL ind 272 112 R0
WINDOW 0 49 30 Left 2
WINDOW 3 57 72 Left 2
SYMATTR InstName L1
SYMATTR Value 1
SYMBOL cap 160 128 R0
SYMATTR InstName C1
SYMATTR Value 1
SYMBOL voltage 48 96 R0
WINDOW 0 -79 76 Left 2
WINDOW 3 -214 117 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value PULSE(10 1 2 20)
SYMBOL current 448 112 R0
WINDOW 0 44 56 Left 2
WINDOW 3 9 94 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName I1
SYMATTR Value PULSE(1 0 1)
TEXT -128 113 Left 2 !.tran 25


I tried setting the value of C1 to

{v(vx)}

and

v(vx)

and Spice complains. What am I doing wrong? Does it work for resistors
and not caps?

My old DOS simulator, ECA, would let you do anything.

Joerg

unread,
Jan 18, 2016, 7:10:52 PM1/18/16
to
Caps need the charge specified, not C. But I had trouble getting that to
work myself and we had a discussion about it here. Cranking up the time
machine ... ah, here it is ... I believe you answered your own question
early last year :-)

https://dl.dropboxusercontent.com/u/53724080/Circuits/Caps/Modulated_Cap_1.asc

legg

unread,
Jan 18, 2016, 7:21:42 PM1/18/16
to
On Mon, 18 Jan 2016 13:12:02 -0500 (EST), bitrex
<bit...@de.lete.earthlink.net> wrote:

>
>Is there a way to make a square wave using the LTSPICE ac voltage
> source which doesnt have a DC offset, i.e. alternates between -5
> and +5, say? I can't seem to figure it out. Thanks.

add component - voltage

right click - advanced

functions - pulse

describe one full cycle and leave Ncycles blank.


All repetative AC waveforms in simulation will have an effective DC
offset that is determined by the polarity of the first 180 degrees.
The longer the simulation, the less this has influence.
Settling time can be halved, strangely, by starting a waveform at
~90degrees, despite the non-intuitive start at a non-zero value.

RL

John Larkin

unread,
Jan 18, 2016, 8:21:02 PM1/18/16
to
On Mon, 18 Jan 2016 16:10:46 -0800, Joerg <ne...@analogconsultants.com>
wrote:
The q=x*expression is a special case hack for capacitors, not a
general case. The only input voltage available is 'x', the voltage
across the cap itself, not some other node voltage.

I tried making a resistor value depend on a voltage and Spice wouldn't
let me do that. A behavioral current source could be forced to pretend
to be a programmed resistor, but that's not as nice as saying that r
equals (Vnn)

I can see that changing the value of a cap in real time has charge and
COE issues, but a resistor doesn't.

Joerg

unread,
Jan 19, 2016, 10:30:40 AM1/19/16
to
In your example you have Q=X*V(ZZ) so the capacitance is dependent on
the external node voltage ZZ.


> I tried making a resistor value depend on a voltage and Spice wouldn't
> let me do that. A behavioral current source could be forced to pretend
> to be a programmed resistor, but that's not as nice as saying that r
> equals (Vnn)
>

Don't use a current source, use the plain resistor.


> I can see that changing the value of a cap in real time has charge and
> COE issues, but a resistor doesn't.
>

Here is a resistor value depending in a voltage:

Version 4
SHEET 1 1036 680
WIRE 800 48 672 48
WIRE 800 64 800 48
WIRE -16 80 -16 32
WIRE 672 80 672 48
WIRE -16 192 -16 160
WIRE 672 192 672 160
WIRE 800 192 800 144
FLAG 800 192 0
FLAG -16 192 0
FLAG -16 32 X
FLAG 672 192 0
SYMBOL voltage -16 64 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value PULSE(0.01 1 0 100m 100m 400m 1)
SYMBOL res 784 48 R0
SYMATTR InstName R1
SYMATTR Value R=(V(X))
SYMBOL current 672 80 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName I1
SYMATTR Value 1
TEXT -42 280 Left 2 !.tran 3

John Larkin

unread,
Jan 19, 2016, 11:43:59 AM1/19/16
to
On Tue, 19 Jan 2016 07:30:34 -0800, Joerg <ne...@analogconsultants.com>
Well, I do too much to remember it all.
Oh, what I kept trying was to set the value of R to V(x) or to {v(x)},
but the proper syntax is R=(v(x)).

LT Spice is vague about syntax. "Help" on R doesn't mention making it
depend on something else.

That syntax doesn't work for capacitors or inductors or, as far as I
can tell, anything but resistors.






--

John Larkin Highland Technology, Inc

lunatic fringe electronics

Joerg

unread,
Jan 19, 2016, 12:01:26 PM1/19/16
to
Same here. Sometimes it takes me a long time to find something back
where I am sure I simulated something similar in the last five years or
so. Maybe it was stored in the brain cells that Anchor Steam wiped :-)

My most recent favorite but from tap during a long bike ride:

http://www.ratebeer.com/beer/uinta-hop-nosh-ipa/154471/
Those are the not well documented traits of LTSpice. But very useful,
also when modeling non-electrical phenomena.


> That syntax doesn't work for capacitors or inductors or, as far as I
> can tell, anything but resistors.
>

It does but you have to formulate if for charge, not capacitance.

John Larkin

unread,
Jan 19, 2016, 12:31:55 PM1/19/16
to
On Tue, 19 Jan 2016 09:01:21 -0800, Joerg <ne...@analogconsultants.com>
Computers are good for remembering things. If I do five things per day
for 50 years, I can't remember it all myself. Some people have total
recall, and it's reported to be terrible.


>
>My most recent favorite but from tap during a long bike ride:
>
>http://www.ratebeer.com/beer/uinta-hop-nosh-ipa/154471/


Most serious beer fand like hops. We don't.

Have you tried the Guinness Blonde? Tasty but not hoppy.
The two cases, R and C (or rather q) are specials.

I can always hack BV and BI to do most anything, it's just more work.

John Fields

unread,
Jan 19, 2016, 3:07:15 PM1/19/16
to
On Tue, 19 Jan 2016 08:43:56 -0800, John Larkin
<jjla...@highlandtechnology.com> wrote:

>On Tue, 19 Jan 2016 07:30:34 -0800, Joerg <ne...@analogconsultants.com>
>wrote:

---
As Jeorg pointed out in his excellent example and since you didn't
want to incur debt by thanking him for teaching you something, you
parrot his help as if it was your own discovery, cheater.
---

>LT Spice is vague about syntax. "Help" on R doesn't mention making it
>depend on something else.

---
"Geez, it wasn't my fault I couldn't figure it out, it's LTC's for not
walking me through it in baby steps."
---

>That syntax doesn't work for capacitors or inductors or, as far as I
>can tell, anything but resistors.

---
If what you're interested in is resistors, why cast aspersions where
syntax is irrelevant?

We both know the answer to that one, don't we?

John Fields


John Larkin

unread,
Jan 19, 2016, 3:46:49 PM1/19/16
to
He owes me at least two beers.


--

John Larkin Highland Technology, Inc

Joerg

unread,
Jan 19, 2016, 4:22:30 PM1/19/16
to
It was actually the other way around. John taught me about ten months
ago how to do this with capacitors.


> He owes me at least two beers.
>

Yes, I sure do. And I still have that wooden beer token if San
Franciscan inflation hasn't eaten its value yet.

John Fields

unread,
Jan 19, 2016, 4:23:52 PM1/19/16
to
On Tue, 19 Jan 2016 12:46:35 -0800, John Larkin
---
A cheap momentary diversion as opposed to a lifelong breadbasket
offered in return.

John Fields

John Larkin

unread,
Jan 19, 2016, 5:51:19 PM1/19/16
to
On Tue, 19 Jan 2016 13:22:23 -0800, Joerg <ne...@analogconsultants.com>
wrote:
It's like those Forever Stamps, a good long-term investment.

I feared that the beer craze was a fad, but it seems to have legs.

JF should drink more beer. It might cheer him up. Unless he's a mean
drunk.

John Larkin

unread,
Jan 19, 2016, 6:07:35 PM1/19/16
to
On Tue, 19 Jan 2016 15:23:44 -0600, John Fields
Sometimes I can help him, sometimes he can help me. We have fun, we
don't keep score, and nobody has to order engraved thank-you cards.

Next time you're in SF, have a beer with us and we'll show you how
it's done.

http://www.zeitgeistsf.com/

https://dl.dropboxusercontent.com/u/53724080/Truckee/Skull.jpg

John Fields

unread,
Jan 20, 2016, 3:18:43 PM1/20/16
to
On Tue, 19 Jan 2016 14:51:05 -0800, John Larkin
<jjla...@highlandtechnology.com> wrote:


>JF should drink more beer. It might cheer him up. Unless he's a mean
>drunk.

---
More edicts from the peanut gallery?

What a surprise...

Beer just bloats me when, using it, I've achieved my desired level of
intoxication, which certainly doesn't cheer me up. I find a better
head in a nice bottle of wine and, occasionally, in either Grappa or
in a tasty Brandy.

Your mileage seems to have been spent on a different road.

John Fields

John Fields

unread,
Jan 20, 2016, 3:30:18 PM1/20/16
to
On Tue, 19 Jan 2016 15:07:20 -0800, John Larkin
---
Wow, so you and Joerg are in cahoots?

John Fields

John Larkin

unread,
Jan 20, 2016, 4:22:20 PM1/20/16
to
On Wed, 20 Jan 2016 14:30:12 -0600, John Fields
I am in "cahoots" with some decent fraction of the people on this
planet. Helpful, cheerful, generous, productive people are always
welcome allies.

J and I have met, had beer, had fun. Zeitgeist, with its picnic tables
under the freeway overpass, has real ambiance. Sometimes drawings
stick to the tables, but that can be managed.

I've met several sed folks, and swapped private emails and parts and
stuff with many more.

Generosity is its own reward. No need to demand thanks, or to keep
score. I think most engineers at heart really enjoy making things
work. Re the joke about the three guys on the guillotine.

John Fields

unread,
Jan 21, 2016, 11:39:37 AM1/21/16
to
On Mon, 18 Jan 2016 13:02:42 -0800, John Larkin
<jjla...@highlandtechnology.com> wrote:

>On Mon, 18 Jan 2016 14:11:29 -0600, John Fields
><jfi...@austininstruments.com> wrote:
>
>>On Mon, 18 Jan 2016 13:12:02 -0500 (EST), bitrex
>><bit...@de.lete.earthlink.net> wrote:
>>
>>>
>>>Is there a way to make a square wave using the LTSPICE ac voltage
>>> source which doesnt have a DC offset, i.e. alternates between -5
>>> and +5, say? I can't seem to figure it out. Thanks.
>>
>>---
>>There is, but why would you want to when you could use a pulse source
>>with a V initial of -5 volts and a Von 0f 5 volts?
>>
>>John Fields
>
>Pulse sources are a minor nuisance to program, if what you care about
>is frequency.

---
Since the OP didn't specify a bandwidth, that minor nuisance fades
into insignificance.

John Fields.

Jim Thompson

unread,
Jan 21, 2016, 12:01:03 PM1/21/16
to
On Mon, 18 Jan 2016 11:37:13 -0700, Jim Thompson
<To-Email-Use-Th...@On-My-Web-Site.com> wrote:

>On Mon, 18 Jan 2016 13:12:02 -0500 (EST), bitrex
><bit...@de.lete.earthlink.net> wrote:
>
>>
>>Is there a way to make a square wave using the LTSPICE ac voltage
>> source which doesnt have a DC offset, i.e. alternates between -5
>> and +5, say? I can't seem to figure it out. Thanks.
>
>You don't use an _AC_ source to make a square wave, you use a Vpulse
>source.
>
>The notation is:
>
>Vx PosNode NegNode PULSE -5V 5V {TD} {TR} {TF} {PW} {PER}
>
>The timings should be obvious. However there is a trickiness...
>
>Pulse-width {PW} is set to be true desired pulse width minus {TR}
>
>I have created a true pulse source which has smooth TANH rise and fall
>(natch ;-), and {PW} is the real-deal, no scratching of head required.
>I haven't ported it to LTspice yet.
>
> ...Jim Thompson

See RealPulse.pdf on the Simulation Tools & Macros Page of my website.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

John Fields

unread,
Jan 21, 2016, 1:02:57 PM1/21/16
to
On Wed, 20 Jan 2016 13:22:06 -0800, John Larkin
<jjla...@highlandtechnology.com> wrote:


>I am in "cahoots" with some decent fraction of the people on this
>planet. Helpful, cheerful, generous, productive people are always
>welcome allies.

---
Sure, as long as they're helpful to you, don't kill your buzz with
generous criticism to which you can relate, and contribute to your
well-being, then they're on your side.
For a while...


I remember a long time ago when I teamed up with you because of
genuine affection I felt for you when you mentioned that the Jewish
state of mind, at that time, was neurotic because of the near
obliteration of the people, or their persecution, or something like
that.

My mistake.

John Larkin

unread,
Jan 21, 2016, 1:20:55 PM1/21/16
to
On Thu, 21 Jan 2016 12:02:43 -0600, John Fields
<jfi...@austininstruments.com> wrote:

>On Wed, 20 Jan 2016 13:22:06 -0800, John Larkin
><jjla...@highlandtechnology.com> wrote:
>
>
>>I am in "cahoots" with some decent fraction of the people on this
>>planet. Helpful, cheerful, generous, productive people are always
>>welcome allies.
>
>---
>Sure, as long as they're helpful to you, don't kill your buzz with
>generous criticism to which you can relate, and contribute to your
>well-being, then they're on your side.
>For a while...
>
>
>I remember a long time ago when I teamed up with you because of
>genuine affection I felt for you when you mentioned that the Jewish
>state of mind, at that time, was neurotic because of the near
>obliteration of the people, or their persecution, or something like
>that.
>
>My mistake.
>

Continuous neurotic whining is your real mistake.

John Fields

unread,
Jan 21, 2016, 8:40:29 PM1/21/16
to
On Thu, 21 Jan 2016 10:20:39 -0800, John Larkin
<jjla...@highlandtechnology.com> wrote:

>On Thu, 21 Jan 2016 12:02:43 -0600, John Fields
><jfi...@austininstruments.com> wrote:
>
>>On Wed, 20 Jan 2016 13:22:06 -0800, John Larkin
>><jjla...@highlandtechnology.com> wrote:
>>
>>
>>>I am in "cahoots" with some decent fraction of the people on this
>>>planet. Helpful, cheerful, generous, productive people are always
>>>welcome allies.
>>
>>---
>>Sure, as long as they're helpful to you, don't kill your buzz with
>>generous criticism to which you can relate, and contribute to your
>>well-being, then they're on your side.
>>For a while...
>>
>>
>>I remember a long time ago when I teamed up with you because of
>>genuine affection I felt for you when you mentioned that the Jewish
>>state of mind, at that time, was neurotic because of the near
>>obliteration of the people, or their persecution, or something like
>>that.
>>
>>My mistake.
>>
>
>Continuous neurotic whining is your real mistake.

Well, John, let's take a look at that...

Continuous? Take a look at the amount of drivel you post and the
amount of fire it draws from me, and a neutral party would surely come
to the conclusion that my criticism is, at best, sporadic.

"Neurotic" seems to be coming from your corner, as an insult, since
you seem able to neither accept criticism gracefully nor to
objectively slough it off but choose, rather, to mount an active
campaign to kill the messenger.

And "whining"? We've been through this before, more than once, and it
seems that you want to trivialize criticism a la: "We had to bomb
Pearl Harbor because..."


John Fields.




0 new messages