You are here

2 distinct buttons affecting the same output (Newbie problems) | Cypress Semiconductor

2 distinct buttons affecting the same output (Newbie problems)

Summary: 4 Replies, Latest post by papaxiclas on 12 Oct 2012 03:52 AM PDT
Verified Answers: 2
Last post
Log in to post new comments.
papaxiclas's picture
2 posts


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?



user_14586677's picture
7646 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.

user_14586677's picture
7646 posts

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

so post should be in PSOC 1 Forum.


Regards, Dana.

user_1377889's picture
9256 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 .

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


Happy coding


papaxiclas's picture
2 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.

Log in to post new comments.