- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSOC Newbie trying to use the PWM as a 1 shot pulse under software control on the CY8CKIT-059. It works once in a while! Have tried putting in sync blocks with no success, among many other things to get this to work. Couldn't find any working examples for PWM in this configuration. Red scope trace is trigger, blue scope trace is PWM output. Project is attached.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You are setting the period of PWM_1 to 65535 = 6.554 sec,
so it takes more than 6 seconds for the one-shot pulse to appear after the trigger.
So I changed it to 50ms
And I also shorten the delay to 100 ms in the main loop
===================
int main(void)
{
PWM_1_Start();
for(;;)
{
Control_Reg_Trigger_Write(1); //send trigger to start pulse
CyDelay(100);
}
}
===================
Now I can see the pulse after every trigger, as far as the interval of the trigger is longer than 50ms.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You are setting the period of PWM_1 to 65535 = 6.554 sec,
so it takes more than 6 seconds for the one-shot pulse to appear after the trigger.
So I changed it to 50ms
And I also shorten the delay to 100 ms in the main loop
===================
int main(void)
{
PWM_1_Start();
for(;;)
{
Control_Reg_Trigger_Write(1); //send trigger to start pulse
CyDelay(100);
}
}
===================
Now I can see the pulse after every trigger, as far as the interval of the trigger is longer than 50ms.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, that makes sense, so in summary the PWM one shot with multi trigger can not be re-triggered until the full period of the one shot if finished.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> Thanks, that makes sense, so in summary the PWM one shot with multi trigger can not be re-triggered until the full period of the one shot if finished.
I think so.
Otherwise you should not have seen any pulse(s) in the original waveform.
moto