avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] SUMMARY: Interrupt handling and timer/counter


From: pboenzli
Subject: [avr-libc-dev] SUMMARY: Interrupt handling and timer/counter
Date: Mon, 3 Mar 2003 21:36:55 +0100
User-agent: Internet Messaging Program (IMP) 3.1


Thanks for your help Joerg and Volkmar, in terms of programming style and 
functionality.

I made my program work. here is the code snippet, nice and short:

  TCNT0 = 0;
  OCR0 = 0x21c8;
  TCCR0 = _BV(COM0)|_BV(COM1)|_BV(CS0)|_BV(CS1)|_BV(CS2)|_BV(WGM1);
  TIMSK |= _BV(OCIE0);


The interrupt signal, as I found out while programming, for compare event is 
not SIG_OVERFLOW0 (thats called when the TCNT overflows) but its 
SIG_OUTPUT_COMPARE0.

thanks to you brave men!
greetings
Patrick (ah, finally i will get some sleep ;)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]