??? 06/12/05 15:25 Modified: 06/12/05 15:32 Read: times |
#94726 - interrupt problem |
i am facing an interrupt problem while interchanging interrupting signals,i have two sqaure pulses having phase difference of 2milli seconds,one is fed to interrupt0 and other to interrupt1,port2.0 is set in interrupt0 and cleared in interrupt1,expected time for which port2.0 shuld remain high is 2ms and it is,but when i interchange interrupt sources means suare wave of interrupt1 is fed to interrupt0 and vice versa know expected high time of port2.0 is 18ms as total period of square pulses is 20ms,but it is not, there is very small time around one microsecond i am unable to find where is problem here is code please look and let me out.
org 0000h ljmp program_start ;bypass interupt table org 0003h ljmp interrupt0 org 0013h ljmp interrupt1 org 0030h program_start: mov port0,#0ffh mov port3,#0ffh mov port1,#0ffh mov port2,#0ffh mov th1,#00h mov tl1,#00h mov tmod,#11h mov ie,#10000001b setb tcon.0 setb tcon.2 isr_timer1: reti interrupt0: setb port2.0 setb tcon.6 setb ie.2 reti interrupt1: clr port2.0 clr tcon.6 clr ie.2 reti |
Topic | Author | Date |
interrupt problem | 01/01/70 00:00 | |
The code doesn't seem to do much | 01/01/70 00:00 | |
Reti? | 01/01/70 00:00 | |
are you ok | 01/01/70 00:00 | |
RETI & CALL | 01/01/70 00:00 | |
The CPU performs an implicit call | 01/01/70 00:00 | |
SORRY! i was wrong. | 01/01/70 00:00 | |
No loop or no jump around isr_timer1 | 01/01/70 00:00 | |
Is it need to set P3.2 if v use ext,intr | 01/01/70 00:00 | |
read all about it | 01/01/70 00:00 | |
No "main loop" | 01/01/70 00:00 | |
re:code | 01/01/70 00:00 | |
re: code | 01/01/70 00:00 | |
Yes, and what have we gained? | 01/01/70 00:00 | |
Superman![]() | 01/01/70 00:00 |