I'm using select and pinsneq to synchronize with a bit on a 4bit port. The problem is that another bit on that port at a much higher frequency is causing jitter, as the code needs to check to see if it was our intended bit that caused the event.
Is there a way to mask off the offending bit, so it won't cause an event? Or maybe there is a better way, other than a hardware change?
Here is some code showing what I am doing.
for (;;){
select {
case p_synch when pinsneq(state_old) :> state_new:
if (state_new & 2)
return; // we are synchronized
break;
}
}
masking a bit in select statement
-
- Experienced Member
- Posts: 94
- Joined: Sun Feb 10, 2013 4:47 am