hello all, I am working with AT89C51CC01 which based on 8051. I had write one program of external interrupt. See the code as follows.
void ex0_isr (void) interrupt 0 { CCAP1H = 0x5A; // 35% Duty Cycle } void main (void) { //Configure INT0 (external interrupt 0) to generate an interrupt on the falling-edge of /INT0 (P3.2). //Enable the EX0 interrupt and then enable the global interrupt flag. CMOD = 0x02; // Setup PCA timer CL = 0x00; CH = 0x00; CCAP1H = 0x10; // 75% Duty Cycle CCAPM1 = 0x42; // Setup PCA module 1 in PWM mode. IT0 = 1; // falling edge on /INT0 (P3.2) EX0 = 1; // Enable EX0 Interrupt EA = 1; // Enable Global Interrupt Flag CR = 1; // Start PCA Timer. while (1) { } }
In this code without interrupt Duty cycle of PWM signal is 75% and when interrupt occur then Duty cycle is 35%. This program works perfectly.
Is there possible to after interrupt then after some time program run normally (Same like without interrupt). For example i want after interrupt after 5 min i come again into the same program routin. Please give ur suggestion related to this problem.
Thanks in advance