2 distinct buttons affecting the same output (Newbie problems) | Cypress Semiconductor
2 distinct buttons affecting the same output (Newbie problems)
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?