Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > 2 distinct buttons affecting the same output (Newbie problems)

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



2 distinct buttons affecting the same output (Newbie problems)
Moderator:
ANCY

Post Reply
Follow this topic



2 distinct buttons affecting the same output (Newbie problems)

papaxiclas posted on 11 Oct 2012 3:24 PM PST
Member
2 Forum Posts

 Hello!

In my first tryes with PSoC designer I wanted to create 2 capsense buttons that will actuate over 2 output led's.

I have created a new project and added the 2 buttons and led's.

For the first led I have defined one Transfer function (priority encoder) with the folowing code:

if (UP_Status==UP_Status__Rising_Edge)&&(UPled==UPled__OFF) then UPled = 1

else if (UP_Status==UP_Status__Rising_Edge)&&(UPled==UPled__ON) then UPled = 0

 In simulation this worked great but when I tried to add the second button a weird thing happens.

If I change the state of the UP button the state of the 2 led's changes and the same happens if I change the state of the other button.

I am doing something wrong trying to add 2 separated circuits???

Where can I find a CLEAR tutorial explaining how to create this scheme I am trying?

 

Thanks




Re: 2 distinct buttons affecting the same output (Newbie problems)

danaaknight posted on 11 Oct 2012 04:01 PM PST
Top Contributor
1773 Forum Posts

Unfortunately PSOC Express has been obsolete for several years.

 

That being said, you can look at the actual code generated output to

find out what actually was interpreted from your design, hence deduce

what is missing.

 

Or post the project here, zip file of entire project, and someone may

take a look at it.

 

Regards, Dana.



Re: 2 distinct buttons affecting the same output (Newbie problems)

danaaknight posted on 11 Oct 2012 04:03 PM PST
Top Contributor
1773 Forum Posts

As an aside PSOC Express only applied to PSOC 1, not 3/5,

so post should be in PSOC 1 Forum.

 

Regards, Dana.



Re: 2 distinct buttons affecting the same output (Newbie problems)

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

Since PSoC Designer 5 the PSoC Express branch was no longer supported. To be honest, it had some errors that could not be corrected and obviously was not used by many customers.

 

Since then the chip-design process for PSoC1 is as follows:

1st. Selecting the required components from the "User Module" list and configuring their properties in the "Parameters" window.

2nd. Routing / interconnecting the components and the required I/O pins

3rd. Writing a C-program that serves / initializesz the components and reacts on the inputs, controlling the outputs.

 

For a newbee the last point can turn out to be the most difficult part when writing programs in C is not often practised. To help you there are example-programs and reasonably good documentations for every user module.

I suggest you to learn C programming (Not C++ yet), you'll find docs about this theme in the internet. Here is a link to my favoured C-manual http://publications.gbdirect.co.uk/c_book/ .

The "classic" manual is "The C Programming Language" by Kernighan and Ritchie, Prentence Hall which has been translated to many different languages. 

 

Happy coding

Bob



Re: 2 distinct buttons affecting the same output (Newbie problems)

papaxiclas posted on 12 Oct 2012 01:52 AM PST
Member
2 Forum Posts
Thank you for your help. I have bought a demo kit and with it came the PSoC designer 5 and that is what I was using (not realy know why an obsolete IDE is distributed with the last version of the PSoC designer). Also the instructions on the kit use the Express interface and that is missleading since it can't be used relyably. The C is no problem, I have writen many AVR projects in C in the last few years. Again thank you for pointing me in the right direction.




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