Using the quadrature encoder

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Carmelo
Posts: 123
http://meble-kuchenne.info.pl
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Flowcode v10 Using the quadrature encoder

Post 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?
Attachments
Encoder.fcfx
(40.27 KiB) Downloaded 95 times
Config1.png
Config1.png (66.38 KiB) Viewed 3712 times

chipfryer27
Valued Contributor
Posts: 1607
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: Using the quadrature encoder

Post 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

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Re: Using the quadrature encoder

Post by Carmelo »

Gracias por responder.
Ya lo corregi y he entendido su funcionamiento.

Post Reply