Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > Suggestion for a digital function:

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



Suggestion for a digital function:
Moderator:
JFMD

Post Reply
Follow this topic



Suggestion for a digital function:

Rocketmagnet posted on 10 May 2011 4:15 PM PST
Top Contributor
91 Forum Posts

Hi guys,

Something which I have wished for a couple of times is a logic function which converts an edge into a pulse.

 

This block could be very simple, taking one input (the edges) and one clock, which defines the length of the output pulse.

When the block sees an edge (can be configured to detect rising, falling or either), it outputs a pulse which lasts as long as one clock cycle.

 

Many thanks

Hugo Elias

 




Re: Suggestion for a digital function:

hli posted on 12 May 2011 11:35 AM PST
Top Contributor
675 Forum Posts

I think you could do this with a timer. Just set it to single shot, 1 cycle, and start it with your signal.



Re: Suggestion for a digital function:

Rocketmagnet posted on 14 May 2011 07:40 AM PST
Top Contributor
91 Forum Posts

What will happen on the next edge? Wouldn't the timer need resetting?



Re: Suggestion for a digital function:

Gautam Das posted on 18 May 2011 10:26 PM PST
Cypress Employee
742 Forum Posts

Hi Hugo Elias,

 

What should be the duration of the pulse you need on every clock edge?

 

Regards,

dasg



Re: Suggestion for a digital function:

Gautam Das posted on 18 May 2011 12:33 AM PST
Cypress Employee
742 Forum Posts

Hi Hugo,

 

This requirement can be easily met with the use of a Timer Component available in PSoC3/5.

An example project is created which gives a pulse of 1ms upon falling egde on Trigger.

 

1) Timer Component is chosen with Resolution of 8-bit which is implemented in UDB. The period is set to 1ms with 1 PWM output.

 

 

 

2) The Run Mode is set to "One Shot with Multi Trigger" and the "Trigger Mode" is set to "Falling Edge". One shot with Multi Trigger will result in a pulse output on every falling edge on the trigger input. This is similar to a Monostable Multivibrator.

 

 

 

 

3) Pin is connected to the Trigger terminal of the Timer. Clock of 100KHz is used. The PWM output is connected to an output pin.

 

 

 

4) In this case, since the trigger is on Falling Edge, the Trigger_in is set to resistive Pull-Up.

 

Re: Suggestion for a digital function:

Gautam Das posted on 18 May 2011 12:37 AM PST
Cypress Employee
742 Forum Posts

 

 

4) The Trigger_in pin is set to Resistive Pull-up mode as the trigger is Falling edge.

 



Re: Suggestion for a digital function:

Gautam Das posted on 18 May 2011 02:48 AM PST
Cypress Employee
742 Forum Posts

An oscilloscope snap-shot is as shown below:

 

Re: Suggestion for a digital function:

Gautam Das posted on 18 May 2011 10:51 AM PST
Cypress Employee
742 Forum Posts




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: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20