How to detect the rising edge of a PWM ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to detect the rising edge of a PWM ?

1,497 次查看
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
标签 (1)
0 项奖励
回复
2 回复数

1,460 次查看
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 项奖励
回复

1,460 次查看
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 项奖励
回复