Interrupt triggering
- 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
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?
-
- Posts: 345
- Joined: Tue Jun 21, 2022 2:17 pm
- Location: South coast UK
- Has thanked: 183 times
- Been thanked: 112 times
- cicciocb
- Site Admin
- Posts: 2060
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 439 times
- Been thanked: 1360 times
- Contact:
- Electroguard
- Posts: 860
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 276 times
- Been thanked: 323 times
Re: Interrupt triggering
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.
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.
- cicciocb
- Site Admin
- Posts: 2060
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 439 times
- Been thanked: 1360 times
- Contact: