Let's Make Robots!

Checking bit in ISR

Hello,

curiousity question what is more efficient. i have a hardware interrupt and inside the ISR i want to check another bit state(declare win).

is it better to test the if with a volatile uint8_t variable or do a checkbit macro directly?

in terms of efficiency and speed which is best.

 

thank you

 

Oleg

**USART Help**

I have been on this for past 4 hours and tried all possble combination on initilization in order to send one character to the UDR through USART. I need help or i will lose it here !

i am using avrstudio5 with usbusart and i also tried debugging through the simulator. i would check all bits are set accordingly but never would the UDR be set and after three iteration it hangs around the while (!(UCSRA &(1<<UDRE))); i also tried the printf() and ofcourse not even a sign of life except at somet points it asked me for the stdlio.c files