At 11:59 AM 23/03/2008, you wrote:
> lds R22, Z+
>......
> What am I doing wrong, please?
Apart from what Don said, you need to use LPM to get
stuff from code space NOT LDS which is from ram.
Also the address need to be multiplied by 2 as data is sored
in bytes but the program space address is in words (16 bits)
So:
ldi zl,low(LABEL*2)
ldi zh,high(LABEL*2)
lpm temp,z+ ;read char
And finally all data bytes that are not in even boundaries will
have a 0x00 added to it.
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
********************************************************Message
Re: [AVR-Chat] problems
2008-03-23 by John Samperi
Attachments
- No local attachments were found for this message.