Claude Sylvain <[EMAIL PROTECTED]> wrote: > I am new to the AVR MCU, and I was thinking that Z register is a > byte pointer, instead of a word pointer.
To add to the confusion: partially, it is. The AVR isn't sure about itself whether it wants to address the ROM in 16-bit words or in 8-bit words: for all instruction fetch cycles, addressing is in 16-bit words, but when accessing the ROM for data fetch cycles (LPM/ELPM), addressing is performed in 8-bit words. Thus, devices with more than 64 KiB of ROM need ELPM + RAMPZ to be able to read data from the entire ROM, but only devices with more than 128 KiB of ROM need EIND for instruction reading. That's the major reason why porting AVR-GCC to the ATmega256x architecture has been such a comparatively difficult job. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
