hello sir, i have coded a program in which after enabling the interrupt the control is not going to the ISR.Can you please correct my error. REPLY AS SOON AS POSSIBLE. URGENT.
#include<ADUC842.H> #include<stdio.h>
sbit intr=P0^2; void timer(); sbit wave=P2^0;
void timer0(void)interrupt 1 { TR0=0; wave=~wave; TL0=0XC2; TH0=0XF2;
TR0=1; } void timer() { P2=1; PLLCON=0x00; TMOD=0x01; TL0=0XC2; TH0=0XF2; TR0=1; IE=0x82;
while(1) {} } void EX0_isr(void)interrupt 0
{
timer();
}
void main()
IT0 = 1; // Configure interrupt 0 for falling edge on /INT0 (P3.2) EX0 = 1; // Enable EX0 Interrupt EA=1; // Enable Global Interrupt Flag