Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Timer input capture in

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Timer input capture in
Moderator:
ANCY

Post Reply
Follow this topic



Timer input capture in

mins posted on 12 Jun 2012 7:25 AM PST
Top Contributor
39 Forum Posts

hi, i am using PSOC 5.2, using kit number CY8C29466-24SXI. i am trying to capture a time input pulse, i just want to know which timer will be great for that project to capture the time period between every rising or falling edge and if anyone has any examples that will be great

Thanks




Re: Timer input capture in

Bob Marlowe posted on 12 Jun 2012 10:25 AM PST
Top Contributor
1768 Forum Posts

First you must estimate the longest time between the two low-to-high transitions of your input you still want to measure.

Together with your wanted resolution you can calculate

1. Your needed input frequency (should be generated with a timer or PWM)

2. The width of your counter (8, 16 or 32bit)

 

Then you may use a timer with the capture-input connected to your signal to measure.

Have a look in the timer-datasheet for the example code.

 

Bob 



Re: Timer input capture in

mins posted on 12 Jun 2012 11:28 AM PST
Top Contributor
39 Forum Posts

i Used TachTimer16, i will use the function generator for now, to monitor the timer input and compare the output frequency=RPM.

i attached the file, i have the basic code and i get nothing in the output.



Re: Timer input capture in

danaaknight posted on 12 Jun 2012 12:44 PM PST
Top Contributor
1773 Forum Posts
This post is in wrong forum, should be PSOC 1 post. Take a look at this - http://www.cypress.com/?app=forum&rID=53419 and this http://www.khalus.com.ua/psoc/pdf/appnotes/an2103.pdf Regards, Dana.

Re: Timer input capture in

Bob Marlowe posted on 12 Jun 2012 12:52 PM PST
Top Contributor
1768 Forum Posts

I would recomend to use a timer to generate the clock for your tach-timer and not use 32k - frequency without a x-tal. It is easier to adapt the frequency to your needs during the development phase.

Changed a bit in your project-file, hope it works

Bob

 

 



Re: Timer input capture in

mins posted on 14 Jun 2012 05:52 AM PST
Top Contributor
39 Forum Posts

i still dont understand how i find the width of the period, between every rising edge!!?



Re: Timer input capture in

danaaknight posted on 14 Jun 2012 12:54 PM PST
Top Contributor
1773 Forum Posts

This may be a better reference -

http://www.cypress.com/?id=4&rID=58479

 

Or reqwuest the data at this link -

 

http://www.cypress.com/index.cfm?rID=38720

 

Regards, Dana.

 



Re: Timer input capture in

danaaknight posted on 14 Jun 2012 12:57 PM PST
Top Contributor
1773 Forum Posts

Although this is PSOC 1 also a good reference.

 

http://www.cypress.com/?rID=2671

 

Regards, Dana.



Re: Timer input capture in

danaaknight posted on 14 Jun 2012 01:01 PM PST
Top Contributor
1773 Forum Posts

You are using PSOC 1, just re-read the original post. So use this reference -

 

http://www.cypress.com/?rID=2671

 

Regards, Dana.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20