Pulse Width Calculation with CN Pin of dsPIC 30F3011

Status
Not open for further replies.

faysal_002299

New Member
Hello all,
I am using the input capture pins for calculating the pulse width of square waves. I need to do the same thing with CN5 pin. I am using dsPIC30F3011.

Please tell me how can I calculate the time information of the pulse width of a square wave using the ChangeNotification pin ? I have no timer left

(I have to do it with CN anyhow as the circuit is already designed by other people- no alternative)


with Thanks,
 
Please let me know what else you want to know?

In brief I want to measure the dutycycle of PWM using CN pin of dsPIC 30F3011 just like we can do with the IC pins.
 
  • Enable Interrupt for CN5
  • Create a cycle to increment a 16 or 32 bit file
  • Wait for interrupt, when CN5 change state stop increment
  • Multiply the value with the time
  • Get result


 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…