|
Re: Ultrasonic sensors on digital ports 3-6 problems
I think you are not using the interrupt register properly. INTCONbits.RBIE enables the interrupts if equal to 1. It looks like you have that backwards in some places. To see if the interrupt occurred (in your ISR) check INTCONbits.RBIF, this will be 1 if an interrupt occurred and should be cleared before exiting the ISR. I do not see where you access RBIF at all.
Kevin's encoder source is an excellent resource. Examine the functions where he enables the encoders and his ISR.
HTH
|