Yes, I would have thought that setting FOCn _should_ initiate everything an output compare would do. But the docs definitely say it will not make an interrupt. I guess it will just do whatever is programmed for the OCn pin. I tried setting the OCF1C bit but an interrupt did not occur. I tried the same with OCIE1C set (this enables the output compare match interrupt. And I still did not seem to get it to work. I would have thought I covered all the operating conditions.... -Tony --- In AVR-Chat@yahoogroups.com, "Don Kinzer" <dkinzer@e...> wrote: > > --- In AVR-Chat@yahoogroups.com, "arhodes19044" <spamiam@c...> wrote: > > The ATmega docs say that I just need to raise the OCF1C in ETIFR > > and then the interrupt will be executed (on the next clock tick, I > > suppose). > > As I read it, OCF1C is a flag that is set when the timer meets certain > conditions and if the corresponding interrupt is enabled, the interrupt > will occur. You can reset the flag by writing a 1 to it, just like > (most of) the other such flags. > > You can force an output compare (FOC1C) but I think that that does not > generate an interrupt. The docs say that that doing so does not assert > OCF1C. > > Don
Message
Re: How to manually trigger a counter interrupt
2005-04-18 by arhodes19044
Attachments
- No local attachments were found for this message.