Post Created date
Program getting stuck after a function is called. Not sure why.
What do you mean by this exactly? What is cbi/sbi? When you change a pin you typically want to only change a single pin, preserving the state of the other pins on the same port....
Tuesday, 10 May 2022 - 07:36
Program getting stuck after a function is called. Not sure why.
Using a port is extremely easy and straightforward...what is all this worthless crap for? Partly my fault. I showed some example in another thread, and the pin struct was used....
Monday, 9 May 2022 - 19:26
Custom linker script
The additional options does not always do what you want it seems.   Under ld option categories, chose miscellaneous, the add your script option- -script=myscript.x The...
Sunday, 8 May 2022 - 21:07
Dealing with an -Wincompatible-pointer-types warning
An example I posted in one of your other threads-   https://godbolt.org/z/dYbo7v7GE   You make that union member an array since that is one of the ways you want to...
Sunday, 8 May 2022 - 06:19
[SOLVED] Help with trying to interface with a DHT22/AM2302 using a ATmega328P
Do not ignore warnings, even ones that may seem harmless. Just fix the code to make them go away. Also, there is never a need to use -O0 for an avr, ever, so step 1 in any...
Friday, 6 May 2022 - 06:46
[SOLVED] Help with trying to interface with a DHT22/AM2302 using a ATmega328P
unless I'm misunderstanding what you are suggesting The suggestion spells out using just the timer1 capture, not using pcint. The capture would record periods of a complete...
Thursday, 5 May 2022 - 02:50
[SOLVED] Help with trying to interface with a DHT22/AM2302 using a ATmega328P
it probably has something to do with the falling edge interrupt not triggering properly Note that PCINT triggers on any edge, so you may be dealing with a flag that is being set...
Wednesday, 4 May 2022 - 21:17
[SOLVED] Help with trying to interface with a DHT22/AM2302 using a ATmega328P
What happens if ICR1 == 45?  [typo corrected] To make the short version and long version code exactly equivalent, it should be |(ICR1>=45). The 45 is just a decision...
Wednesday, 4 May 2022 - 19:45
Can an interrupt pull a local variable of a function off of the stack?
Is this all really about getting very fast transfer from an ISR to mainline code and you don't want to use a global because of the LD/ST involved in accessing it?  This is...
Wednesday, 4 May 2022 - 10:03
[SOLVED] Help with trying to interface with a DHT22/AM2302 using a ATmega328P
What happens if ICR1 == 75? Then (ICR1>45) is 1 since the comparison result is a bool. If 1 line of code can replace 10, why not, if its readable.    ...
Wednesday, 4 May 2022 - 09:45
[SOLVED] Help with trying to interface with a DHT22/AM2302 using a ATmega328P
    if (ICR1 < 45)    // Is a 0     {         // Do nothing. Doing nothing is the same as writing a zero.     }...
Wednesday, 4 May 2022 - 04:22
Event system in ATtiny 0 series
An async user can handle any generator, a sync user can only use sync generators. There is a block diagram in the datasheet that shows sync generators also routed to asynch users...
Tuesday, 3 May 2022 - 22:16

Pages