Post Created date
char counter in for() loop
For this particular case it would have to be int8_t and not unint8_t since the check "offset >= 0" would always be true for an unsigned number. And that might explain why char...
Monday, 1 May 2017 - 16:40
How many "powerful" instructions?
The first computer that I used on a professional basis was a RAD-8, which had a pdp8 at its core.
Monday, 6 March 2017 - 17:37
trouble using interrupt in atmega328p INT0
You never floating a MCU Pin. If he has a pulse generator attached to the pin, then the pin is not floating.
Tuesday, 18 October 2016 - 15:47
ATMEGA8A multiple A/D reading problem
// Delay needed for the stabilization of the ADC input voltage No it is not. Delay is needed when the reference is changed, not the input. ADMUX=(FIRST_ADC_INPUT | ADC_VREF_TYPE...
Wednesday, 11 May 2016 - 15:56
AVR C++ static variables - Problem under Studio 7
I think that AVR Studio is simply reporting the incorrect addresses of the static variables. c1 and c2 are instances of the classes, whereas the static variables are members of...
Thursday, 21 April 2016 - 19:56
Input Capture on Atmega8 to read servo signal
the Atmega8 doesn't seem to have an interrupt vector for the ICP pin And yet your code is using that very vector (TIMER1_CAPT_vect). TCNT1=0;You don't normally want to zero the...
Wednesday, 20 April 2016 - 15:58
More than 1 else-if => code doesn't work
To me it would be easier to put all 4 values into 4 bits of one variable, then just do a switch statement.
Friday, 4 March 2016 - 16:42
inc and dec not affecting carry flag. Why is it done so?
For DEC, the Z flag would always be "one off" of the C flag. So if you start the value of the register at one more than the actual value, the Z flag could be effectively used as a...
Thursday, 3 March 2016 - 17:58
inc and dec not affecting carry flag. Why is it done so?
When adding two numbers, the result is only 0 if both numbers were zero to begin with. When adding two non-zero numbers, you need to pay attention to the overflow flag, not the...
Wednesday, 2 March 2016 - 06:51
some lessons from C++ on AVRs
hmmm I must be missing something here. I agree. The point of using C++ is to hide all that, not to expose it. But then again, in reading through your code, I see nothing that...
Monday, 29 February 2016 - 17:43
Question about #Defines
Bet you that the second resolves to And I bet that it doesn't. To do so it would violate the order of precedence rules of C.   In addition to showing us how MYUBRR is used,...
Monday, 29 February 2016 - 17:35
In palliative care: Using two ADC channels on the Atmega16
Free running mode and multiple channels do not mix well. By the time you set the channel, the next conversion has already started.
Tuesday, 2 February 2016 - 16:57

Pages