Hi,
I'm struggling to collate the info in the 2313
datasheet and the include files for winavr
distribution of GCC.
I want to learn to use the timers & interrupts. I
started off with a polled timer test (writing code
from memory so may not be precise) to add interruopt
driven later:
TCNT0=0;// set timer counter
TCCR0=1<<CS02|1<<CS00;// set to /1024
do {} while (~(TIFR & TOVR0)) // wait for overflow
This appeared to hang in loop for ever - I'd expected
it to pass straight through after a miniscule pause.
Any ideas what's wrong?
As regards interrupts, I looked at docs avr/signal.h
and couldn't decide if an sei was required or not.
Is there a URL with GCC code fragment to show proper
usage of INTERRUPT macro etc?
TIA,
Adrian
=====
-
*********************************************
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.htmlMessage
WinAVR GCC timers and interrupts
2004-01-19 by Adrian
Attachments
- No local attachments were found for this message.