Hi Vasili,

Follow up of my previous message ...

On 03/10/2021 10.32, vsurducan wrote:

On the other hand, if you set only the detection of the rising edge ( IOCAP_IOCAP0 = high, IOCAN_IOCAN0 = low),  RDY_OUT stayed indefinitely on high even on RDY_IN a positive edge occured, which seems wrong.

With only rising edge interrupts this is a possibility:


procedure IOC() is
    pragma interrupt
    if INTCON_IOCIF & IOCAF_IOCAF0 then -- edge interrupt on RDY_IN
        IOCAF = IOCAF & 0xFE            -- clear IOCAF0
        pin_RDY_OUT = high              -- RDY_OUT high
    end if
end procedure

forever loop
    if pin_RDY_OUT then
        delay_1ms(20)
        pin_RDY_OUT = low
    end if
end loop



--
*Rob H*amerling, Vianen, NL

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/76b8a82d-2e79-89b6-47b1-98169e4c0aae%40gmail.com.

Reply via email to