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

I need help with some interrupts

HI i have to make a project for my school. So i decided to do a black board cleaning mashine. For that i use a Infineon 80C535 microcontroler. I wanted to use 4 interrupts.
Port 1^0 ; 1^4, 3^2; 3^3. The interrupt on the ports 3^2 and 3^3 work but not under the interrupt that is told in the users manual. The other interrupts dont work and after using them the programm crashs. I dont know what i did wrong. But im not very experienced with such programms. I dont know what i should do now and we ve got holidays now so i cant ask my teacher. Plz help me. I dont know wich informations u need to help.
But plz help me!

  • Before worrying about these details, has your project built successfully with no errors or warnings?

    Are you sure that your hardware is all correct & working properly?

    "The interrupt on the ports 3^2 and 3^3 work but not under the interrupt that is told in the users manual."

    Please explain what you mean by this.

    "The other interrupts dont work and after using them the programm crashs."

    Have you tried running this in the simulator?
    Set the appropriate interrupt flag, then single-step and see what happens...

    What tools are you using?

  • Before worrying about these details, has your project built successfully with no errors or warnings? Yes there are no warnings or errors.
    Are you sure that your hardware is all correct & working properly? Hm yes i think it should work. My Board works like the ones i used in school and my 2nd board works also.

    If i set both interrupts from high to low my main program stops and the interrupt program starts but imo with port 3^2 int0 should be used. But when i tested ist int2 was used. ( hm its difficult to explain but i hope you can understand it)

    No i didnt used the simulator! I ll do it tomorrow.

    Hm what do you mean with tools?

    Thx for this first reply.

  • "what do you mean with tools?"

    Compiler, Assembler, Linker, etc, etc

  • According to the data book at http://www.keil.com/dd/chip/2972.htm, /INT0 is on P3.2, /INT1 is on P3.3, /INT2 is on 1.4, /INT3 is on P1.0, /INT4 is on P1.1, /INT5 is on P1.2, and /INT6 on P1.3.

    The interrupt vectors are:

    /INT0 = 0
    /INT1 = 2
    /INT2 = 10
    /INT3 = 11
    /INT4 = 12
    /INT5 = 13
    /INT6 = 14

    At least, that's my interpretation. Does this help?

    Jon

  • Thanks that was my first problem! I tested it in the simulator and it worked. But now i got problems with my controler. If i change the Debug mode from the simulator to the debugmonitor the first interrupts are missing (0003h and 0013h) in the peripheral dialogue.
    Which addresses should I set in the off-chip code memory and in the off-chip xdata memory?

    Or should i change something in my startup.A51 file? (IDATALEN?;XDATALEN?;PDATALEN? )

    I use the C51 compiler and the Keil Monitor 51 Driver.