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

CC1_CC8IC interrupt

Hello
can someone tell me why my interrupt does not respond, with the debugger, I always get z = 0

double z;

main {
.
.
.
.
.
.

while(1)
 {
CC1_M2      =  0x0001;//  001=>capture on posirtive Flanke
CC1_T01CON  =  0x0047;
CC1_CC8IC   =  0x00C0; // Interrupt enable und
z = Periode ;
 }//end of while
 }// end of main


 void Drehzahl_messung(void) interrupt(0x18)
  {

Periode = 100;
  }


or what I have since forgotten
Thanks

Parents
  • First, thank you for this honest response
    I have already read c programming. but sometimes I do not really understand the meaning of things.
    but I am now convinced. with what you have written me. the two sentences were convincingly

    
    An important difference for you to learn:
    - A program that is correct will produce correct results.
    - A program that produces correct results need not be correct. You might just have failed to find the combination where it will produce incorrect results.
    
    

    I will write now my code with volatile

    many thanks

Reply
  • First, thank you for this honest response
    I have already read c programming. but sometimes I do not really understand the meaning of things.
    but I am now convinced. with what you have written me. the two sentences were convincingly

    
    An important difference for you to learn:
    - A program that is correct will produce correct results.
    - A program that produces correct results need not be correct. You might just have failed to find the combination where it will produce incorrect results.
    
    

    I will write now my code with volatile

    many thanks

Children
No data