Post Created date
Self-programming the flash on mega 0-series
memset((void*) 0x6000, 0, 256);You also have to limit yourself to a single page, which for a mega3208 is 128 bytes. In this case overwriting 0 with 0 results in 0, so the...
Tuesday, 31 May 2022 - 04:45
Polled timer inside a timer interrupt
In any case, it gets me down to 4us which is better than the PIC solution but not quite what I had hoped for You have another compare you can use from the same timer, or other...
Sunday, 29 May 2022 - 03:24
Polled timer inside a timer interrupt
but my question has still not been answered Did you read post #5?
Saturday, 28 May 2022 - 22:38
Polled timer inside a timer interrupt
See my previous edited post for your timer flag problem.    I need to be able to vary the delay at runtime. How many values will you end up with? You can still use...
Saturday, 28 May 2022 - 19:23
Initializing a struct with some padding in C
Perhaps he should have mentioned that it was a GCC only extension. I did-  or use gcc designated initializers if you want 0xFF values-   Why test mcu/avr code...
Saturday, 28 May 2022 - 18:30
Polled timer inside a timer interrupt
Simply use _delay_us(n) since you are already in an interrupt. Its simple, accurate, and leaves a timer free for other things. No downsides.   The only advantage to the...
Saturday, 28 May 2022 - 05:22
Initializing a struct with some padding in C
Why do you need to init unused data to 0xFF? Will it matter if unused? (no one will know/care)     or use gcc designated...
Saturday, 28 May 2022 - 02:15
SIMPLEST serial RX solution for Atmega32/32x?
You could also treat those numbers as integers *1000 (looks like you are using 0-999.999 so would be 0-999999).   Assuming the numbers are coming in 3.3 with leading 0's-...
Wednesday, 25 May 2022 - 04:51
ATtiny1616 Temperature measurement on ADC1
Did you read the TEMPSENSE description and not see it, or not read it at all?   I didn't think I needed to spell it out because it was so obvious, but to save time- the...
Tuesday, 24 May 2022 - 09:41
ATtiny1616 Temperature measurement on ADC1
Read the MUXPOS register description in the datasheet, specifically the TEMPSENSE description.
Tuesday, 24 May 2022 - 06:46
AVR128Dx TWI as I2C Sniffer...
I setup a tiny416 xplained nano to do the master/slave to itself, and a mega4809 curiosity nano to do the sniffing (slave only).   The two attached screenshots are- master...
Thursday, 19 May 2022 - 23:59
Generate a signal with 8 fixed-width pulses with a varying interval
Adjust/tweak times as needed, don't even need the table-   You will have to account for the pin set/clr instruction also. Start with...
Thursday, 19 May 2022 - 07:13