How to detect the rising edge of a PWM ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to detect the rising edge of a PWM ?

769 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by AkshayHV on Thu Jul 25 21:56:39 MST 2013
Hello

I am working on PWM in LPC1768 and generating a PWM signal of 2Mhz.Now i want to know how to detect when exactly is my PWM rising edge is getting.because i Want to make one of my GPIO pin high exactly at the time of my PWM high condition.



Regards
Akshay H V
Labels (1)
0 Kudos
2 Replies

732 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by madD7 on Thu Aug 08 21:09:06 MST 2013
Do you want the rising edge to be detected by the controller??
In that case you can connect the signal to any of the port 0 or port 2 pins as these pins work as interrupts and can detect and generate an interrupt during rising/falling/both edges.

The other way is if you are generating the PWM using the controller, enable the pwm interrupt and in the ISR, process the GPIO line as required.
0 Kudos

732 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by -0o- on Tue Aug 06 10:11:01 MST 2013

stick it to an oscilloscope ??
0 Kudos