PSIM program debugging
2004-11-29 by Andrew Scheidler
Hey fellow PSIMonauts,
For those of us who don't have a 'scope to figure out what's going on
inside your PSIM as a program runs, here's something I did last night...
STARTSTEP:
TCOUNT = 0
WAITFORHIGH:
TCOUNT = TCOUNT + 1
GOSUB SCANDAC
IF ADC2V < 3 THEN WAITFORHIGH
DAC3V = TCOUNT
etc
Then while the program was running, I measured CV OUT 3 with a
voltmeter. At 120bpm the output was 1.01 volts, so multiply by 384 and
that's a TCOUNT value of about 388.
Of course the Heisenberg principle comes into play, since my "TCOUNT =
TCOUNT + 1" line takes up time itself, but it was a neat little way to
get an idea of what kind of time the PSIM was spending waiting for the
GATE ON voltage...
I stayed up until 3:30 Saturday night (morning) playing with my PSIM :)
Andrew