[SOLVED] Atmega32, int0, c, avrgcc

Status
Not open for further replies.
I don't see any ininterrupt variable in the attached code of post #1 , do you mean the article in the link?

- - - Updated - - -

oh, ok , you meant post #4

- - - Updated - - -

When a variable is shared in interrupts and the main code then it should always be declared as volatile so that the compiled is forced to read the variable value from the source rather than a cached copy from a register then may be no longer valid.
 
OK, now I see that.
Since I am unexperienced in AVR programming it takes me several days to get this simple example working and nobody say this before.

Now problem is fixed and I can go forward.
Thanks for help again.

nime.
 


Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…