Page 1 of 1

Using the quadrature encoder

Posted: Wed Nov 13, 2024 10:36 am
by Carmelo
I want to use the quadrature encoder component, configuring the port B pins, but it won't let me select them.
I have downloaded the example from the wiki and they appear configured there.
Attached is a screenshot of the problem and the example that I want to implement.

Right now I just want to see the interrupt configuration to know if I'm doing it right.
The rest of the project is unrealized.

Am I doing something wrong?

Re: Using the quadrature encoder

Posted: Wed Nov 13, 2024 11:16 am
by chipfryer27
Hi

Looking at your chart you have no ISR to call (Interrupt Service Routine) should an interrupt occur. I'm not too familiar with your chip but on some PICs, IOC on Port B, although having configurable inputs (e.g. B6 or B7, leading edge etc) will interrupt on any applicable change and in your ISR you will need to test to see which pin triggered (i.e. the ISR will trigger on any IOC, you need to establish the cause).

In your example it may be that any change on any pin B4 - B7 will trigger the interrupt and you will then need to establish which pin was the cause.

Regards

Re: Using the quadrature encoder

Posted: Wed Nov 13, 2024 7:17 pm
by Carmelo
Gracias por responder.
Ya lo corregi y he entendido su funcionamiento.