Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > setting and resetting a single pin

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



setting and resetting a single pin
Moderator:
ANCY

Post Reply
Follow this topic



setting and resetting a single pin

mahmoud posted on 13 Apr 2013 10:19 AM PST
Top Contributor
67 Forum Posts

what is the best software controlled method to set and reset a single pin of the psoc5?? best meaning it will take the lowest cycle count available.




Re: setting and resetting a single pin

danaaknight posted on 13 Apr 2013 02:06 PM PST
Top Contributor
1773 Forum Posts

Page 10  of -

 

www.cypress.com/

 

Regards, Dana.



Re: setting and resetting a single pin

danaaknight posted on 13 Apr 2013 02:08 PM PST
Top Contributor
1773 Forum Posts

And this -

 

www.cypress.com/

 

Regards, Dana.

 

 



Re: setting and resetting a single pin

PSoC73 posted on 13 Apr 2013 05:00 PM PST
Top Contributor
176 Forum Posts
Hi Dana-san, I found a questionable action in a "PSoC1" pin. When use shadow register or LED user module(also use shadow register). Turn on/off timing was slip off with each pins or other port. I don't know why and I have not interest in already. Thank you.

Re: setting and resetting a single pin

mahmoud posted on 14 Apr 2013 11:39 PM PST
Top Contributor
67 Forum Posts

 thank u 



Re: setting and resetting a single pin

Bob Marlowe posted on 14 Apr 2013 01:46 AM PST
Top Contributor
1768 Forum Posts

Let me have my two cents on this thread, too:

The time needed to toggle a pin with software is mostly dependent on CPU-type (MC8, ARM...) and execution speed.

But here, so I feel, we should think more "PSoC":

1st: Nothing can switch faster than hardware

2nd: PSoC contains Hardware

 

So to archieve a fast software-controlled pin toggle the best solution would be to use a combination of both. Imagine on a PSoC 5 LP to use a clocked control register connected to a pin which will deliver one pulse. Need more than one? Build the same with a LUT and an implemented counter, need a programmable number of pulses? Store the Number in a ControlRegister and compare that with the value of a counter. More specific behaveour? Siliconize your needs with verilog and you can easily toggle pins with 24MHz leaving a gap between the third and fourth pulse and double the length of the 7th pulse... THAT'S PSoC THINKING!

 

Bob



Re: setting and resetting a single pin

danaaknight posted on 14 Apr 2013 03:13 AM PST
Top Contributor
1773 Forum Posts

HW GPIO limitations, might be a challenge to insert controlled clocked intergap delays

at 24 Mhz,

 



Re: setting and resetting a single pin

Bob Marlowe posted on 14 Apr 2013 03:37 AM PST
Top Contributor
1768 Forum Posts

GPIO can handle up to 33MHz, VeriLog logic UDB accepts 33MHz max at well (chained 16-bit timer example), so I think 24 MHz is within the green and not in faiway.

 

Bob



Re: setting and resetting a single pin

Bob Marlowe posted on 14 Apr 2013 03:38 AM PST
Top Contributor
1768 Forum Posts

Sh**! Here's the missing "r", should read "fairway", but I'm not a golfer...

Bob



Re: setting and resetting a single pin

PSoC73 posted on 14 Apr 2013 04:27 AM PST
Top Contributor
176 Forum Posts
It is sorry to talk around PSoC1 here. I said "slip off" it's not ns order. It's takes quite big time. Might be a cause of timing miss control. however, I shouldn't say more. for now, I doesn't use shadow things. I have to do another things. Thank you.

Re: setting and resetting a single pin

Bob Marlowe posted on 14 Apr 2013 06:12 AM PST
Top Contributor
1768 Forum Posts

Mea culpa, Dana. I see my mistake: I have to divide the input frequency at least by two to switch something from off to on (and back again). this would result in about 16MHz.

Bob



Re: setting and resetting a single pin

mahmoud posted on 15 Apr 2013 02:11 PM PST
Top Contributor
67 Forum Posts

thanks everyone this way I have alot of methods to learn and then I will choose the optimal solution.

but what I liked most is Bob's "Mea Culpa"  it is always fun to learn new latin phrases.






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