Skip to content

Commit

Permalink
Manage button by interrupt INT0 for On/Off
Browse files Browse the repository at this point in the history
  • Loading branch information
MPETREMANN11 authored May 29, 2020
1 parent 714ce8d commit 0e2e9f9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions buttonOnOffInterrupt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,13 @@ flash

\ EXTERNAL_INTERRUPT
$69 constant EICRA \ External Interrupt Control Register A
$3c constant EIFR \ External Interrupt Flag Register
\ $3c constant EIFR \ External Interrupt Flag Register
$3d constant EIMSK \ External Interrupt Mask Register

eeprom
$0002 constant INT0Addr \ interrupt addr for INT0
flash


\ ATTENTION: spécifique Mega 2560
eeprom
10 constant PCINT0 \ vecteur number interrupt 4 for PCINT0
107 constant PCMSK0 \ Pin Change Mask Register 0
104 constant PCICR \ Pin Change Interrupt Control Register $68
flash

: init.interrupt ( ---)
%00000011 EICRA mset \ interrupt on rising edge
%00000001 EIMSK mset \ activate INT0
Expand Down

0 comments on commit 0e2e9f9

Please sign in to comment.