setintflags and setint can or can't be used at same time?

hugoxp1

Member
Hi,

I was searching for this two commands (setintflags and setint) to understand the diferences between them (I will use a 20X2), and then I've found this two links:

link1 http://www.picaxeforum.co.uk/showthread.php?t=7506&highlight=setint+setintflags

link2 http://www.picaxeforum.co.uk/showthread.php?t=14705&highlight=setint+setintflags

In the first link we can read that we can not have this two commands (setintflags and setint) configured at same time, but in the link2 we have the two commands in the same procedure (init: ).

Q1- So... I'm confused can anyone explain me what I'm "missing here"?

Q2- I'm going to need that Picaxe 20X2 do an interrupt every time that an external IC generates a 1ms 3V positive pulse... will setint command react such a short pulse (1ms)?

thank you
 
Last edited:

hippy

Ex-Staff (retired)
My understanding is that only the latest SETINT or SETINTFLAGS encountered will become effective. In the second link I'd say the SETINT was erroneous as the interrupt deals with flags relating to SETINTFLAGS, then re-enables interrupts with SETINTFLAGS. It may just be fortuitous that the code worked without the issue revealing itself.

The 20X2 would be able detect 1ms pulses using SETINT in many circumstances, and certainly in all circumstances when using the HINTx hardware interrupt pins and SETINTFLAGS.
 
Top