Interrupt triggering

Feature requested and implemented
Post Reply
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 267 times

Interrupt triggering

Post by Fernando Perez »

Would it be possible to extend the interrupt control system so that you can choose between triggering by falling edge, rising edge or logic level change on the pin?
BeanieBots
Posts: 344
Joined: Tue Jun 21, 2022 2:17 pm
Location: South coast UK
Has thanked: 182 times
Been thanked: 112 times

Re: Interrupt triggering

Post by BeanieBots »

I too think that would be a useful addition.
User avatar
cicciocb
Site Admin
Posts: 2041
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 436 times
Been thanked: 1340 times
Contact:

Re: Interrupt triggering

Post by cicciocb »

It can be done but is not so easy to implement, at least rapidly.
User avatar
Electroguard
Posts: 857
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 273 times
Been thanked: 321 times

Re: Interrupt triggering

Post by Electroguard »

pininterrupt:
pause debounce

if pin(number)=1 then return 'uncomment this line for Active LO or On-Change
'if pin(number)=0 then return 'uncomment this line for Active HI or On-Change
'turn interrupts Off
wlog "do something"
'turn interrupts On again
return

Interrupts can easily be handled just by un-commenting a line,
but there is no quick way to Enable or Disable all interrupts, they all need to be individually specified.
User avatar
cicciocb
Site Admin
Posts: 2041
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 436 times
Been thanked: 1340 times
Contact:

Re: Interrupt triggering

Post by cicciocb »

Implemented in version 1.50.7
Post Reply