EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Page 96

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
-
- 80 -
LJMP INT2ISR
ORG 005BH
LJMP INT3ISR
ORG 0083H
LJMP INT4ISR
ORG 0100H
INT0ISR:
CPL P1.0 ;Test port
RETI
INT1ISR:
CPL P1.0 ;Test port
RETI
INT2ISR:
CPL P1.0 ;Test port
RETI
INT3ISR:
CPL P1.0 ;Test port
RETI
INT4ISR:
CPL P1.0 ;Test port
RETI
MAIN:
MOV SP, #5FH
MOV P0M0, #00H
MOV P0M1, #00H
MOV P1M0, #00H
MOV P1M1, #00H
MOV P2M0, #00H
MOV P2M1, #00H
MOV P3M0, #00H
MOV P3M1, #00H
MOV P4M0, #00H
MOV P4M1, #00H
MOV P5M0, #00H
MOV P5M1, #00H
CLR IT0 ;Enable INT0 rising edge and falling edge interrupts
; SETB IT0 ;Enable INT0 falling edge interrupt
SETB EX0 ;Enable INT0 interrupt
CLR IT1 ;Enable INT1 rising edge and falling edge interrupts
; SETB IT1 ;Enable INT1 falling edge interrupt
SETB EX1 ;Enable INT1 interrupt
MOV INTCLKO,#EX2 ;Enable INT2 falling edge interrupt
ORL INTCLKO,#EX3 ;Enable INT3 falling edge interrupt
ORL INTCLKO,#EX4 ;Enable INT4 falling edge interrupt
SETB EA
MOV PCON,#02H ;MCU enters power-down mode
NOP ;Enter interrupt service routine immediately after wake-up from power
mode
NOP
NOP
NOP
LOOP:
CPL P1.1
JMP LOOP

Table of Contents

Related product manuals