Hi!
I'm simulating some C code on AVR Studio 4 (still on the PWM phaser stuff). I noticed every variable is residing in a SRAM address, no matter if it is local, global or static. Is there a way I can indicate to the compiler to put a variable into a register instead of RAM? I think that should make the program a lot faster.
Also, is there an equivalent to HIGH() and LOW() functions on this C? Like, to extract the high or low byte of a word, without using the >> and << operators?
I'm running out of juice on the Attiny13 and I still havent implemented the Tap tempo I wanted! 1K memory is just too small!
Regards!
Miguel
There's a post on AVRFreaks (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&theme=print&p=349045) that mentions the "register" keyword in the GCC compiler. Apparently it's not foolproof.
I'm an assembler guy, so I'm just Googling. :icon_confused:
Thanks for the link Dave!
It seems I managed to reduce my code a 50%, so there's no need to optimize (still :icon_cool:), or going the ASM way
Regards
Miguel