John, > But DOES IT WORK? :-) The flash is in 2 byte lots (16 bit) that is the reason > you need to multiply by 2 to get to the address. yes, it works fine.. Thats why I don't understand it. I understand abotu things being stored as 'words' in the AVR, but I don't see why I only have to multiply the upper byte (ZH) not the lower byte (ZL). > What happens if the data is the 2nd byte of the array? It seems to me that > you need at least 1 multiplication and 2 16 bit additions to get it working > anywhere in flash. If the above works well I have to redo some of my > code that gets the data from a character set lookup table (224 rows, 7 > columns). I use a '.db 0xnn,0xnn' table for mine and as I say, in the simulator ir works and on the actual chip, it works. Paul
Message
Re: [AVR-Chat] Reading from flash in Assembly
2004-12-06 by Paul Maddox
Attachments
- No local attachments were found for this message.