This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to add to the Interrupt Dialog in Keil for the Mentor M8051EW?

I am using the AGSI in order to create other timers and define the IR for the extended interrupts.

The dialog for the interrupts already have the 8 extended interrupts but it doesn't have flags defined for the interrupts. http://keil.com/dd/vtr/3227/4547.htm. I want to define those flags and add the flag as a check box to the dialog of the corresponding interrupt like the other timers/interrupts in order to send interrupts through the dialog.

How can I overwrite the dialog that already has the 8 extended interrupts in it but no check boxs for the flags?

Parents
  • "This is the bit that is set high when the ISR should be called"

    This is the interrupt request flag. Since the Mentor 8051EW chip specification does not specify a external interrupt request register, uVision simulates these flags at address d:0x86 (bit 0 for INT6, bit1 for INT7...). You can see this bit in the column 'Req' (see the interrupt dialog with the link above). If you select the interrupt in this dialog (e.g. Extended 6) you will see a checkbox 'INT6' and 'EI6' at the bottom of the interrupt dialog. 'INT6' is the interrupt request flag. If the enable bits are set ('EA' and 'EI6') and the 'INT6' checkbox is set as well, the program counter will jump to address 0x33 after the next single step.
    The normal way to activate an external interrupt is by writing to the virtual register INTPINS. By setting INTPINS = 0x01 in the command line of the uVision simulator, the external interrupt 6 is requested. I tried all this and it works.

    "It is only high until the hardware changes the PC to the appropriate ISR"
    My 8051EW specification does not saw that external interrupt request flags are cleared by hardware when the interrupt is serviced. This is how uVision currently simulates it. You must deactivate the external interrupt by resetting the corresponding bit in the INTPINS register before the interrupt service routine is completed.

Reply
  • "This is the bit that is set high when the ISR should be called"

    This is the interrupt request flag. Since the Mentor 8051EW chip specification does not specify a external interrupt request register, uVision simulates these flags at address d:0x86 (bit 0 for INT6, bit1 for INT7...). You can see this bit in the column 'Req' (see the interrupt dialog with the link above). If you select the interrupt in this dialog (e.g. Extended 6) you will see a checkbox 'INT6' and 'EI6' at the bottom of the interrupt dialog. 'INT6' is the interrupt request flag. If the enable bits are set ('EA' and 'EI6') and the 'INT6' checkbox is set as well, the program counter will jump to address 0x33 after the next single step.
    The normal way to activate an external interrupt is by writing to the virtual register INTPINS. By setting INTPINS = 0x01 in the command line of the uVision simulator, the external interrupt 6 is requested. I tried all this and it works.

    "It is only high until the hardware changes the PC to the appropriate ISR"
    My 8051EW specification does not saw that external interrupt request flags are cleared by hardware when the interrupt is serviced. This is how uVision currently simulates it. You must deactivate the external interrupt by resetting the corresponding bit in the INTPINS register before the interrupt service routine is completed.

Children
  • You have been very helpful and I am grateful for your responses.

    What you are explaining to me (about the EA, INT6 and IE6) is exactly what I would like. When I look at the dialog, the only check boxes that are there is the EA and IE6 check boxes. I don't have the INT6. Since I didn't have it I thought that I had to create it and that is what I was trying to do. But from what you are telling me, you have it and it already works. I wonder why I don't have that checkbox. Do you have your device set to the Mentor M8051EW or is it another device that uses the extended interrupts? Did you have to do any other configuration at startup for this?

    Again, thank you for your responses.

  • You must have an older version than I have. Please download the latest C51 version 8.04 and select the microcontoller in your project again, so that all settings are updated from the device database. Then you should see the following settings:
    Dialog 'Options for Target'-'Debug'-'Dialog DLL' = 'DCore51.DLL' with parameter '-pM8051EW'.

    In the Dialog 'Help' - 'About uVision' you should see: DCore51.DLL = 2.47k

  • I have C51 v8.02 and Dialog DCore51 DLL v2.47

    The dialog is being used as you say in the Debug tab of the Options menu with the same parameter.

    All of this is the same. A fellow worker and I both get the same thing. We are unable to get the INTx check boxes.

    Currently, I have created another DLL that creates the same Interrupts with the same vectors and with a INTx check box, but now we have two of every extended interrupt in the dialog (one with an INTx and one without). Is this going to be an ok work around or is it going to cause problems? I really would like to have it just have that INTx check boxes. That would be best.

    Thanks again for all of your help.

  • This problem seems to be solved in version 8.04. Is there any reason not to use it
    (e.g. support period has expired)?

    If your additional external interrupt also uses the VTR INTPINS as interrupt source, the double defined interrupts may interfere with each other.

  • You were right. The problem was fixed in v8.04.

    Thank you so much for your help. It works great now.

    Regards,

    John