Need help on Impulse measurement Time ON/OFF (Timer 16)

A catchall for PSoC Mixed-Signal Array (microcontroller) discussions not captured by the other forums.

Moderator: ericb

Need help on Impulse measurement Time ON/OFF (Timer 16)

Postby Kam » Mon Aug 19, 2013 11:59 am

Hi everyone,

I would like to know how i can measure the time OFF of an impulse with a timer 16.
I already know how to measure time ON.
I use this project:
http://www.element14.com/community/docs ... -in-psoc-1

thank you
Kamal Bouamran

Image
User avatar
Kam
Newbie
Newbie
 
Posts: 3
Joined: Fri May 17, 2013 6:55 am
Website: http://www.Oselainc.com
Location: Montreal

Re: Need help on Impulse measurement Time ON/OFF (Timer 16)

Postby danadak » Tue Aug 20, 2013 8:20 am

Questions -

1) Are you trying to measure pulse high and low time, or period ?

2)What is the resolution of the measurement you want and the range
of frequency of the signal ?

3) Lastly the accuracy needed ?

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
danadak
The Big Cheese
The Big Cheese
 
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Re: Need help on Impulse measurement Time ON/OFF (Timer 16)

Postby bobmarlowe » Tue Aug 20, 2013 9:08 am

Easiest would be to negate the input-signal to your working solution. When the frequency is not too high you can route and invert the signal through the PSoC1.

Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Re: Need help on Impulse measurement Time ON/OFF (Timer 16)

Postby Kam » Thu Aug 22, 2013 11:38 am

Hi Dana,

The frequency vary between 10Hz to 1000Hz. I want measure the pulse width and the deadband of a signal. The accurancy has to be 1ms.

Thank you,

beast regards,
Kamal Bouamran

Image
User avatar
Kam
Newbie
Newbie
 
Posts: 3
Joined: Fri May 17, 2013 6:55 am
Website: http://www.Oselainc.com
Location: Montreal

Re: Need help on Impulse measurement Time ON/OFF (Timer 16)

Postby bobmarlowe » Thu Aug 22, 2013 12:30 pm

Use a Timer16 , counting a fixed frequency of at least 1kHz. Use the frequency to measure to generate a capture (inverted at need) and generate an interrupt on capture.
Within the interrupt handler read-out the captured value and reset the counter for the next cycle.

Calculate from captured value and fixed frequency the time elapsed.


Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Re: Need help on Impulse measurement Time ON/OFF (Timer 16)

Postby fibonachi » Thu May 08, 2014 9:25 pm

I can not open link,

Can anyone help me, how to measure impulse time and count signals in unit of time?

Thank you...
fibonachi
Newbie
Newbie
 
Posts: 1
Joined: Thu May 08, 2014 9:04 pm


Return to “%s” PSoC1 General

Who is online

Users browsing this forum: Bing [Bot] and 8 guests