This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi,
customer has a 307KHz (50% duty cycle) signal on his PCB and has to delay it for 200ns. My idea is to generate 307KHz PWM signal with the timer which can be syncronized with the customer 307KHz signal through GPIO. A 2nd PWM with 307KHz and phase delay of 200ns (to the 1st PWM) can then be generated and output. Would that work?
Regards, Holger
Hi Holger,
I'm not quite sure. I'll need some more information about the application for the reason for the delay. What is the delay relative to? A periodic signal, some other timing in the MSP, etc.?
It is hard to coordinate separate timers like that. I would just trigger an interrupt on the edge, and in the interrupt routine, wait 200 ns before turning on/off the GPIO.
Or use a monostable multivibrator to trigger a latch.
www.electronics-tutorials.ws/.../monostable.html
Or about 300 feet of coax. 8^)
I don't think you you can do it in SW or per interrupt. The sys clock is 24MHz -> 42ns (200ns = 5 clocks). I think when you trigger a GP input interrupt and then set/reset a GP output the internal delay will be longer then 200ns.
Hi Holger,
I'm still thinking what might work as a solution. Can you describe how the the 200ns delay is used, ie., is there some event in the system that triggers the start of the PWM and from this event there must be a 200 ns delay?
Hi Dennis,
there are two 307KHz signals to control 2 power supplies. The one signal is delay today and therefore produce inefficiency. The two PWM signals should be as syncron as possible. The delay should be around 200ns.
My idea is to use the comparator and output the signal to an GPIO pin. May be the comp filter could be configured to be ~200ns.
The other idea is to use the phase shift of the timers and syncronize with an input GPIO.
Regards, Holger