Switching Analog Mux input using sw1 PSOC 5LP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Naz99
Level 3
Level 3
10 likes given 25 sign-ins 5 questions asked

Hi, I am using CY8CKIT-059 prototyping kit and I tried to create a single differential circuit which connect multiple inputs on analog mux to a single op amp. I want to switch the chosen input on the analog mux using sw1 switch. Is this possible and how to do it? the attachment is my project. Thank you

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Naz99,

Attached is a modified version of your project with something close to what you're looking for.

 

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

A complex thing in easy words:

You need a variable that holds the actual selected channel number.

You need to check whether the switch is pressed, debounce the signal (do not use delays in interrupt handlers!!)

Increase that channel variable (or reset to 0) and connect the channel.

 

Happy coding

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Naz99,

Attached is a modified version of your project with something close to what you're looking for.

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes