I'm playing around with the PulseOut command in preparation for trying to convert a robot platform from a Stamp2 platform over to the Zbasic platform. . .and I'm just totally stumped here.
The Zbasic system library says this:
"The pulse width may be specified by a Single value with units of seconds and a resolution of approximately 1.085μs (however, due to processing overhead, the shortest pulse that can be generated is slightly less than 2us)."
I've tried a single value in there, and integer values, but I just can't understand the results. For example, I would think that code like this:
Code: Select all
Sub Main()
Call PutPin(5, zxoutputlow)
Dim PulseWidth as Single = 0.25
Do
Call Pulseout(5, PulseWidth, 0)
Call PulseOut(0, PulseWidth, 1)
Loop
End Sub
What the heck am I missing here? I can't fathom how to control the pulse width here. Help!
-Jeff