cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

anko_3968661
New Contributor

i want to give variable input to AND gate in cysch so that i can change that input according to my conditions programatically. how to do that?

for example:

i am using counter.

if compare gives high  output then and gate should take zero as a input else AND should take one as a input.

Best Regards

0 Likes
1 Solution
EvPa_264126
Valued Contributor II

Perhaps you can use the Control Register as such a variable.
and.png

View solution in original post

5 Replies
Ekta
Moderator
Moderator

Hello Anuja,

I have created a project in which input to AND gate is output of a counter. You can have a look at it. In this case the input to AND gate is variable.

Best Regards

Ekta

0 Likes
anko_3968661
New Contributor

Hello Ekta,

Thankyou for your reply. I didn't find any project file to see the example.

I dont want to give the output of counter directly to AND gate.

I want to add a condition if Compare output of counter is low then AND i/p must be High.and if comp goes high(Here Comp goes high when counter reaches to zero when we are down counting) then one of AND input should get zero.  and counter stops.

I need a variable which i can add as a input to AND gate. so by using API i can change its value.

Regards,

Anuja

0 Likes
EvPa_264126
Valued Contributor II

Perhaps you can use the Control Register as such a variable.
and.png

View solution in original post

anko_3968661
New Contributor

Hello Evgeniy Pavlov,

Thankyou so much for your reply. It helped me assigning a variable . Thankyou again.

0 Likes
Len_CONSULTRON
Honored Contributor II

Anuj,

You may want to credit Evgenij with a "Correct Answer".  Doing this will also close the discussion with a resolution.

Len

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