Yahoo Groups archive

AVR-Chat

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

Message

RE: [AVR-Chat] Reading from flash in Assembly

2004-12-03 by Larry Barello

Which chip are you using?  lpm Rx, Z is only supported on newer mega chips.

If the right address is in Z and the chip supports the instruction, then if
you are only getting 0xFF is because there is no data at that location.

Cheers!

-----Original Message-----
From: Paul Maddox

Larry,

Ok,

Made some changes, I wondered if I should be use .db instead of .EQU=, tried
that, same thing.

I've been stepping through it, boring or what...
But all seems well, except for this line ;-

lpm r18, z

At this point r18, only contains 0xFF and never changes (though Z does
change).
Perhaps its a limitation of the Simulator thing?
Anyway, I'll try it tonight on an AVR :-)

Pa

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.