Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > How to set the pin function using software method?

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



How to set the pin function using software method?
Moderator:
ANCY

Post Reply
Follow this topic



How to set the pin function using software method?

jacktan posted on 11 Mar 2012 6:35 PM PST
Top Contributor
26 Forum Posts

Hello everybody:

I want to use pins status to monitor my process' running status,not in debugging.

By using software program to set pin's logic status(high or low), I want to watch my program's running status!

The attached file describes the details!

 




Re: How to set the pin function using software method?

Bob Marlowe posted on 12 Mar 2012 12:12 AM PST
Top Contributor
1768 Forum Posts

I suppose it is "CyPins_SetPin(Pin_1);" to set your monitor-output.

 

Bob



Re: How to set the pin function using software method?

pvkv posted on 13 Mar 2012 12:23 AM PST
Cypress Employee
15 Forum Posts

 Hi,

Open the file Pin_1_aliases.h. You will see the macro for pin configuration register. It will be as below.

 #define Pin_1_0 Pin_1__0__PC

Therfore use API as below to set this pin high. 

CyPins_SetPin(Pin_1_0).

 

OR

 

You can use your method without using any macros and use original register names as mentioned in cydevice_trm.h. 

CyPins_SetPin(CYREG_PRT1_PC5).

Note that you used "PC0" which means port 1 and pin 0 but your pin is placed at P1[5], therfore you should use PC5.

 

Thank you,

Pavan



Re: How to set the pin function using software method?

jacktan posted on 13 Mar 2012 03:36 AM PST
Top Contributor
26 Forum Posts

Thanks for your friendly reply! and i can solve my problem as soon as possible!






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