Interrupt Question

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:

Interrupt Question

Postby Sparkoids » Sat Jun 01, 2019 10:20 am

Two quick questions please on interrupts in Flowcode 5.

1. On the RB0 interrupt the rising or falling edge of that particular pin can be setup in properties but on a "Change in Port B" there are no properties. Is it possible to set this port for the falling edge or is it just a change in the port full stop?

2. On one of the descriptive videos on interrupts it says that the interrupt stays inactive until the macro it is directed to is completed. Is that correct please?

Thanks in advance...


James :-}

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8334
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: Interrupt Question

Postby medelec35 » Sat Jun 01, 2019 12:42 pm

Hi James,
Depending on the microcontroller, it will or will not have an internal interrupt on change register.
If It does then there will be an option to select which edge is used for triggering as properties will be enabled.
E.g an example is 16F(L)18xx range:
IOC1.png
IOC1.png (20.06 KiB) Viewed 492 times

Unfortunately, there are also thoses who do not, e.g older 16F7(L)xx.
On those devices, properties are greyed out:
IOC2.png
IOC2.png (7.78 KiB) Viewed 488 times

This means you can't select which edge to trigger on, therefore BOTH edges will be used for triggering.
If that is undesirable, then you must have means within interrupt so detect which edge was used for triggering, so wrong edge can be ignored.
These users thanked the author medelec35 for the post:
Sparkoids (Sat Jun 01, 2019 3:13 pm)
Rating: 5.56%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

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

Re: Interrupt Question

Postby Sparkoids » Sat Jun 01, 2019 3:13 pm

Makes sense - thanks for the speedy response. I am using an ECIO-28 - the Matrix thing for fast prototyping.