Society of Robots - Robot Forum
Software => Software => Topic started by: benji on April 06, 2008, 09:50:42 AM
-
im doing some avr assembly coding for interfacing an optical mouse sensor
i chose assembly simply because i want to know whats going on every single cycle.
in the atmega8 datasheet it says you can use the R registers , R0 >>>> R32
while using R0>>R15 it doesnt recognize it, so im using R16 >>>R32
why is that?
also in the datasheet when examples are provided they are using R16 and not R0
there should be a reason for that? any idea?
another question about avr studio 4
when i press the build button it doesnt build it and it writes (error excuting)
i changed the code and still the same
then i wrote one operation in the code and the same happened :-\
help
-
Stupid check: When you start a project in AVR Studio, you have to tell it to use the Assembler and not the GNU compiler . . .
-
registers 0 to 15 have a few limitations to the operations that can be performed on them.
you can't use ldi for example
-
Stupid check: When you start a project in AVR Studio, you have to tell it to use the Assembler and not the GNU compiler . . .
,, im using the assembler ,,Stupid ;D
registers 0 to 15 have a few limitations to the operations that can be performed on them.
you can't use ldi for example
thanks for the info,, is this mentioned somewhere in the datasheet?
-
i'm not sure.
it's because of the instruction size, they had to crunch in many instructions, a tradeoff for parameter size
check out this tutorial for more info: http://www.avr-asm-tutorial.net/avr_en/beginner/REGISTER.html#Unterschied