--- In [email protected], Csaba Zvekan <czve...@...> wrote: > > Here is my little sub routine in C: > > static void encoderRead(void) > { > if (IOPIN &(1<<RENC1A)){ // true if button released (active low) > Csaba
Hi Csaba - I'm interested in your definition of IOPIN. Is it memory mapped eg. #define IOPIN (*(unsigned char *)0x1234) Because in C it can help to use the volatile keyword to prevent the compiler optimising out successive reads of IOPIN, which it would otherwise assume to return the same value: #define IOPIN (*(volatile unsigned char *)0x1234 John
