avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Timer Interrupt Problem on ATmega 103L


From: 'Andrew McNabb'
Subject: Re: [avr-gcc-list] Timer Interrupt Problem on ATmega 103L
Date: Thu, 27 May 2004 08:54:26 -0600
User-agent: Mutt/1.5.6i

On Thu, May 27, 2004 at 09:01:59AM +0200, Peter Hierholzer wrote:
> I have checked your code in the AVRStudio Simulator and it is working fine.

It seems to be getting only more mysterious.

> With the statement ASSR = _BV(AS0); your are using a separate crystal as
> clock source for timer0. It looks like that this clock does not work.
> 
> Did you connect a 32 kHz crystal to TOSC1 and TOSC2?

I'm using an STK300 board with a 32kHz crystal preattached to TOSC1 and
TOSC2.

> Is it oscillating?
> Does it work if you outcomment the line ASSR = _BV(AS0);
> (Is outcomment proper english?)

I'm confident that the crystal works because I can look at TCNT0.  If I
just poll TCNT0 and don't worry about interrupts, I can make an LED
flash exactly once a second.  I can also just output TCNT0 to LEDs, and
it does just what it would be expected to do.

I'll try commenting out the ASSR line to see if interrupts work on the
other clock.  I'll do that this afternoon and get back to you.

-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868


reply via email to

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