Thank you so much John.
Using the LDS instruction my problem was solved.
Absolutely the operand was out of range because in the ATmega169P
the address is higher than 63 for the timer1 counter registers wish is not supported by the "IN" instruction.
Reference:Page 79, AVR instruction set.
John Samperi <samperi@ampertronics.com.au> escribió: At 06:21 AM 22/11/2007, you wrote:
>operand 2 out of range and gives me the address of the counter registers
>
>in r6,TCNT1L
>in r7,TCNT1H
Depending on which processor you are using, TCNT1 could be
memory mapped and therefore you need to use LDS and STS
instead of IN/OUT.
You can also use a macro from AVR001 LOAD and STORE and it
will automatically switch in the correct instruction.
Regards
John Samperi
********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495 Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************
---------------------------------
¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:
http://correo.yahoo.com.mx/
[Non-text portions of this message have been removed]Message
Re: [AVR-Chat] Timer1 error
2007-11-27 by Pedro Ayala Muñoz
Attachments
- No local attachments were found for this message.