Hi KlausSTHi,
I can´t find this information in my datasheet.
Please post a link.
Klaus
I guess I have the answer to this.2) From SBI r16,2 instruction, it means set bit 2 of r16. If r16 has original value of 0x01, setting bit 2 gives you 0x05 only. Bit 7 is NOT set. Why N is set?
X, Y and Z are considered to be 16 bit registers. But the SUBI instruction does only work for 8 bits.This instruction is
working on Register R16 to R31 and is very well suited for operations on the X, Y, and Z-pointers.
Thanks, I just started on this, what do I know.Hi,
I have no problem to say it's wrong.
Another person may say: it makes no sense,
the next: it's not correct.
The result is the same..
Klaus
Mainly "$". I tried to search on line. I know symbols changed since I worked with assemble language. In my days Hex is like 0FFH, 7AH. binary is 1010B etc. Now Hex is 0xFF, 0x7A etc. binary is 0b1010 etc.Hi,
Did you read the instructionset manual.
I can only repeat that it reads SRAM at location $xxxxx and writes the contents into according register.
1) is the address of the SRAM space
2) "$" in this case just tells that the following value is a HEX value.
It also states" This instruction is not available in all devices. Refer to the device specific instruction set summary."
Did you do?
So I wonder what exactly us unclear
Klaus
Thanks, I did not realize that. I only concentrate on ATmega328. It's a lot of new things for me, I am jumping back and fore between data sheet and codes. I find it's hard to get the feel just reading data sheet as it gives a lot of program examples also, so I decided to read the different instructions first.Hi,
7 bit "LDS" vs 16 bit LDS:
Here you are wrong. Only one type LDS exists on a microcontroller.
Thus they tell you to read the microcontroller datasheet for you to find out which type of LDS is available on your AVR.
In other words: There are different type of AVRs,
* some use the 7 bit LDS,
* some use the 16 bit LDS.
*****
Why they use "$" as well as "0x" ... I don't know.
If they have a reason for this, I'd expect them to explain this in the instruction set manual. Did not find anything.
Klaus
I read this again and again, 0x00 to 0x1F is 5BITS, to use in 16BIT address, it would be 0x0000 to 0x001F. That should not change at all. How does that become 0x0020 to 0x003F?Hi,
I don't know where your confusion is. (I already tried to explain this. And why. And example)
What's the hurdle to pass?
0x00 ... 0x1F (5 bits of address "AAAAA" in the opcode) of "lower 32 I/O register" which usually occupy the address space of 0x0020 .... 0x003F in the 16 bit address space.
Klaus
Read carefully.I thought the first 32 register
As you can see in post#33:I thought PORTB is in 0x05
example PortB:I have not read anything about ADDING 0x20
It is written in the "instruction set manual"Where does that say so in the data sheet?
As explained in post#34.to use in 16BIT address, it would be 0x0000 to 0x001F. That should not change at all. How does that become 0x0020 to 0x003F?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?