Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] ldi instruction failing

2007-10-02 by David VanHorn

On 10/2/07, Thomas Keller <tjkeller1@alltel.net> wrote:
>
> Why would the following instruciton yield an "parameter out of range"
> error in AVR-ASM?
>
> ldi   R25,   256040

R25 is an 8 bit register!

(as are ALL the registers..)

You need to load this in bytes.
A 16 bit value can be loaded like this:
ldi  R15,high(value)
ldi R16,low(value)

But I don't think there's any mechanism to directly deal with a 32 bit
value in the assembler.

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.