Probably you are using Creator 2.2 and a PSoC3.
Set the trigger in the "Advanced" configuration tab to "multi-trigger" . While the PWM is waiting for a trigger pulse you may set the pulse-width with the API WriteCompare() to any value within the given limit.
The multiple trigger is not quite giving me what I want, but I have more basic question.
How does the 3 of these interact?
With the multitrigger setup you suggested, I'm finally able to vary the distance between pulses by setting the period value, but get many of them. I suspect there are knob setting to just get one, but I'm still tinkering to find the right combination.
What I'm after is simply to vary the width of the pulse, one time.
The pulsewidth is set with PWM_WriteCompare(). Bob
- WritePeriod() sets the length of the complete PWM period (the maximum counter value - with normal PWM, it therefore sets the PWM frequency)
- WriteCompare() sets the counter value when the PWM output changes from high to low (so it sets the duty cycle)
- WriteCounter() sets the current counter value, so it influences when the next compare event happens (by going either forward or backward in the PWM timespace)
When using the multi-trigger mode, the next trigger event will only be start a new cycle after a complete PWM period has been completed (in the component data sheet, look at page 32ff).
This is what I ended up with (just the schematic loaded).
No image to see here...
If you are trying to post an image, post as .BMP, and make it the last
thing you paste in the thread. I have found Firefox most of the time will
do this, whereas IE rarely.