skimask is right.
If your LEDs are referenced to V+ and your scope is referenced to Vcommon
the scope will show a logic high when the LEDs are off.
If you “invert” a channel on your scope it should show you what the LED is doing...
I have not tried it but this code should work:
‘ with both LEDs referenced to V+
high GPIO.0 ' OFF INITIAL CONDITIONS
high GPIO.1 ' OFF INITIAL CONDITIONS
START:
PAUSEUS 2074 ' before pulse
LOW GPIO.1 ‘ON = pulse
PAUSEUS 4168 ' ON TIME - GPIO.1 only
HIGH GPIO.1 ‘both pins OFF
PAUSEUS 2074 ' after pulse
PAUSEUS 20 ' anti-overlap time
‘should add to 8.336 milliseconds
PAUSEUS 2074 ' before pulse
LOW GPIO.0 ‘ON = pulse
PAUSEUS 4168 ' ON TIME - GPIO.0 only
HIGH GPIO.0 ‘both pins OFF
PAUSEUS 2074 ' after pulse
PAUSEUS 20 ' anti-overlap time
‘should add to 8.336 milliseconds
GOTO START '60 HZ FREQUENCY
END
I agree with Malcolm on all three points he made.
The idea about slowing the duty cycle down to visible speeds to test LEDs is good....
But, because, your board is made:
You should be able to use a single (LED) supply resistor in this circuit because you NEVER want the LEDs to be on at the same time.
You can leave the LEDs referenced to V+ as long as you remember any Vcommon referenced measurements are inverted to the LEDs.
Also:
Do you have your optocouplers on the board? If so:
You can temporarily feed them with +/-12V (instead of the 150V) and a series resistor in each leg to protect them (in case both on)...
Measure the output referenced to common.
Aside:
The programmable guard time (anti-overlap time) between polarity switching is handy, I know you have done that in your analog work with deliberate propagation delays. Keeps the smoke to a minimum.
The programmable “before / after pulse” time would help “push” the wave shape to what you want.
-Adam-
Bookmarks