We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
can i check the bit IE0 to decide whether an int0 interrupt is coming?
jnb ie0,$ clr ie0 ;interrupt service here
can i check the bit IE0 to decide whether an int0 interrupt is coming? You can poll the bit (provided you disabled the actual IE0 interrupt), but then it certainly isn't an interrupt ! The whole point of having interrupts is that it is not necessary to poll any bits - once the interrupt condition occurs and the interrupt is enable, the MCU vectors to the appropriate interrupt service routine.
thank you for your help. but are you sure for your answer? when i simulate in protues it seems wrong.
Check it for yourself: the operation of the 8051 is described in the following documents - commonly referred to as "the bible" for the 8051: Chapter 1 - 80C51 Family Architecture: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf Chapter 3 - 80C51 Family Hardware Description: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf
"when i simulate in protues it seems wrong." Have you tried simulating it in the Keil simulator? For questions about Proteus, you will need to go to a Proteus forum, or call their support...