Page 1 of 1

Monitoring Port A and B at the same time

Posted: Mon Feb 28, 2011 6:38 am
by alb10811
Hi I'm relatively new to pic programming and flowcode, having said that I have a project in which I would like to monitor an input from both Port A and B at the same time as the input may come on either port, so I'm just wondering is there any way to do this?

Thanks for any help

Re: Monitoring Port A and B at the same time

Posted: Mon Feb 28, 2011 9:08 am
by Benj
Hello,

All you have to do is create a loop and then poll each of the ports by reading them into variables and then testing the variables to see if the input you require has been detected. The chip runs at a speed that should allow you to sample both ports for incoming data without missing any pulses.