Help With Interrupt On Port B...

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times
Contact:

Help With Interrupt On Port B...

Postby Sparkoids » Mon Mar 25, 2019 2:35 pm

OK here is one.

I have managed to *nearly* sort out my quadrature encoder project but have run into yet another issue.

Using an Interrupt when I read the change on Port B using the EB-073 encoder in Ben's example 1 it jumps to a Macro which is great blah blah but because the encoder is still being turned therefore Port B is still changing and the Interrupt keeps getting triggered and jumping back to that macro SO the question is as follows.

Can I go to a Macro on the Port B Interrupt (which in Ben's example is to check for changes) and turn off the Interrupt at the beginning of the Macro then turn it back on again as I leave the jumped to Macro?

At the moment Flowcode isn't compiling to the chip because it detects an error on the Interrupt being already set at the beginning of Main.

The timings are going bananas because of the speed I am turning the encoder but that is what I need. Turn clockwise - do one thing until I either stop turning or reverse to anti-clockwise and do something else.

Anyone please?


James :-}

User avatar
LeighM
Matrix Staff
Posts: 1870
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 438 times
Been thanked: 625 times
Contact:

Re: Help With Interrupt On Port B...

Postby LeighM » Tue Mar 26, 2019 10:17 am

Could you post your latest program?