Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4930

AT89S52 Software Generated Interrupt

$
0
0
I am trying to generate an interrupt via software in an Atmel AT89S52. It's my understanding that I can set TCON.1 to generate a software interrupt but, for some reason, after I set it, it's not branching to the ISR. It works fine when I do a hardware interrupt. Here is some basic code I wrote to test it. Am I missing something?

org 0
SJMP RESET
org 3
LJMP ISERV

RESET: MOV IE,#81H ;ENABLE INTERRUPT
SETB TCON.1 ;GENERATE AN INTERRUPT

HERE: SJMP HERE...

AT89S52 Software Generated Interrupt

Viewing all articles
Browse latest Browse all 4930