Hello, I am using a ATtiny12 which has no
RAM. I am not having any difficulties except in
experimenting with the indirect 'LD' instruction.
The tiny12 manual list the LD as a supported instruction as
LD Rd,Z (per the manual)
Example used:(using the simulator version 2)
.cseg .org 0x00 main: ldi ZH,0x01 ldi ZL, 0x00 ld r20,Z ;R0 doesn't work either inc ZL ld r21,Z .cseg .org 0x100 Myflash: .db 0xee .....
Trying to use R0 instead of R20 as in the code shown, I still get nothing or 00.
Using the simulator , the setting of the ZH/ZL seems ok. But attempting to use LD or LDI does not get the expected value.
And, yes I know the Tiny12 is a older device, but I did not understand this part of using the no ram chip.
Can anyone explain or offer a small snippet such
as entered above.
Thanks for any clarification.