Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Re: [AVR-Chat] Studio simulator-tiny45- TC1 - SOLVED

2006-04-27 by Don AE5K

praveen gudi wrote:
> Hi,
> I think u should select a proper prescaler for timer1.
> If the pprescaler is zero, means timer will not run.
> Check the data sheet again about prescaler.
> bye.
> 
> */Don AE5K <don@ae5k.us>/* wrote:
> 
>     I'm not sure if I am missing something or if the simulator of the AVR
>     Studio 4.12 with service pack 2 (or SP1 too) is broken, but in
>     simulation I cannot seem to get Timer/counter 1 counting in my
>     tiny45 code.
> 
>     I have TCCR1 = 0x41, and OCR1C = 0xF4, all the remaining registers are
>     at their default 0 value.  In addition, PRR=0x00, PLLCSR=0x00 and
>     CLKPR=0x00.
> 
>     Is there some other bit somewhere I must set to get this counter
>     working?  TCNT1 remains at 0 when simulator is run.  Haven't gotten any
>     further to see if the counter is counting in real life.
> 
>     Hints?  Experience?
> 
>     Thanks,
>     Don
>     --------
> Praveen Gudi,
> Embedded Software Engineer,
> Invictus Technologies,
> Bangalore- 560 044

Thanks for the hint Praveen, but as shown above the prescaler (the lower
nibble of TCCR1) is 1 and not zero. (and in fact when I first tried it,
the prescaler nibble value was hex F, divide by 16384)...

BUT, I have done more digging in the documentation of Studio/Simulator,
and buried under the known problems for the tiny25/45/85 is NO SUPPORT
for TC1  ! ! !   If one is to believe the documentation, then that is
apparently my problem -- the simulator just won't do timer/counter #1 in
the tiny45.  Bummer.    I had submitted a tech help request to Atmel
support before I found that tidbit of information, so we'll also see
what their reply is.

Thanks everyone!

Don

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.