??? 08/22/05 13:07 Modified: 08/22/05 13:10 Read: times |
#99815 - interrupt recoginsation |
hi all,
i have a problem regarding interrupt0,when an interrupt occur it is disabled inside interrupt service routine and enabled after two second now if an interrupt occur again within two second cpu recognise it after interrupt is enabled again although interrupt occured when it was disabled it should not recognise interrupt,below is the code,please tell me where is problem. port0 data 080h port1 data 090h port2 data 0a0h port3 data 0b0h sp data 081h ie data 0a8h tcon data 088h psw data 0d0h b data 0f0h acc data 0e0h dpl data 082h dph data 083h tmod data 89h tl1 data 8bh th1 data 8dh tl0 data 8ah th0 data 8ch scon data 98h sbuf data 99h status data 20h org 0000h ljmp program_start ;bypass interupt table org 0003h ljmp interrupt0 org 0030h program_start: clr status.1 setb tcon.0 mov ie,#10000011b here: jnb status.1,here lcall two_second_delay ;two second delay sjmp program_start interrupt0: clr ie.0 setb status.1 reti two_second_delay: push 07h push acc push b mov a,#0a3h mov b,#1eh two_second_delay_timer: mov r7,#0ffh two_second_delay_onemil: nop nop nop nop djnz r7,two_second_delay_onemil nop nop dec a cjne a,#0ffh,two_second_delay_noroll dec b two_second_delay_noroll: cjne a,#00h,two_second_delay_timer cjne a,b,two_second_delay_timer pop b pop acc pop 07h ret thanks |
Topic | Author | Date |
interrupt recoginsation | 01/01/70 00:00 | |
Bible time | 01/01/70 00:00 | |
from where to get bible | 01/01/70 00:00 | |
see forum rules | 01/01/70 00:00 | |
or, how about checking "links" | 01/01/70 00:00 | |
see original subj.![]() | 01/01/70 00:00 | |
little more explanation | 01/01/70 00:00 | |
RTFM | 01/01/70 00:00 | |
bible time | 01/01/70 00:00 |