How about changing the code: mov r30, step ldi r31, high(array) add r31, num lpm r18, z out portd, r18 -----Original Message----- From: Paul Maddox [mailto:P.Maddox@signal.qinetiq.com] Sent: Thursday, December 02, 2004 6:02 AM To: AVR-Chat@yahoogroups.com Subject: Re: [AVR-Chat] Reading from flash in Assembly Paul/Anyone in this code, > MOV r30,step //this one 0-255? > MOV r31,num //this one 0-15? > SUBI r31,HIGH(-array) > LPM r18,Z > OUT PORTD,r18 whilst running the simulator, r31 and r30 don't seem to pick up the correct address (0x0200) even though I have at the end of my code (only very short) .ORG 0200 .EQU array=0x00,0x01,0x02, etc ,etc (yeah, I know they're lame values but its good for a test) Any thoughts as to what I'm doing wrong? Paul Yahoo! Groups Links
Message
RE: [AVR-Chat] Reading from flash in Assembly
2004-12-02 by Larry Barello
Attachments
- No local attachments were found for this message.