Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
  • :)


The input change notification module provides the
dsPIC30F devices the ability to generate interrupt
requests to the processor in response to a Change-Of-
State (COS) on selected input pins. This module is
capable of detecting input Change-Of-States, even in
Sleep mode, when the clocks are disabled. There are
10 external signals (CN0 through CN7, CN17 and
CN18) that may be selected (enabled) for generating
an interrupt request on a Change-Of-State.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top