#avr Logs

Oct 24 2020

#avr Calendar

12:11 AM rue_shop1: damnit damnit damnit
12:18 AM rue_shop1: these encoders suck
12:18 AM rue_shop1: edamnit
12:18 AM rue_shop1: damnit
12:18 AM rue_shop1: why did I not make a modular filter
12:30 AM rue_shop1: ok I got it aprat without the protoboard coming apart
12:32 AM day_ is now known as day
03:25 AM flip214: Hi. Using .macro .endm I get an error during compilation. Can I get the .macro-expanded output of my assembler sources, like -E does for the preprocessor?
03:27 AM flip214: and another question, my macro gets arguments that are used as opcodes in the body; but preprocessor macros (#define XXX) are not replaced in these parameters. Can I force this expansion as well=
03:27 AM flip214: ?
03:27 AM flip214: .macro xx o1=nop ; \o1 ; .endm xx o1="ldi r20, CONSTANT" << CONSTANT isn't replaced by the preprocessor
06:05 PM rue_shop1: ttp://www.engbedded.com/fusecalc/
06:07 PM rue_shop1: aparently already at 8Mhz
07:55 PM rue_mohr: anyone ever written macros to build the init values for a timer?
08:01 PM LeoNerd: I usually have some HAL functions for that
08:01 PM LeoNerd: The compiler turns them into efficient one-line assigments
08:01 PM rue_mohr: yea there is no need to have the processor put time into it
08:01 PM rue_mohr: a macro that just builds a value is great
08:02 PM rue_mohr: I dont usually do on-the-fly changes
08:02 PM rue_mohr: er ever?
08:02 PM rue_mohr: meh
08:02 PM rue_mohr: I find myself working out values a lot
08:04 PM rue_mohr: :) it actually looks like I'v never used the overflow interrupt on a timer for the atmega8 yet
08:05 PM LeoNerd: This isn't an expensive function. The compiler literally turns it into a static assigmment into the register
08:05 PM LeoNerd: In source it looks like a HAL function. In assembly it looks like a register assignment
08:05 PM rue_mohr: should do :)
08:05 PM rue_mohr: k
08:08 PM rue_mohr: ok, that should toggle a pin at 2kHz
09:02 PM rue_shop1: https://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
09:17 PM rue_shop1: yay, after fighting with the timer I have 2khz