Post Created date
Multi threading and timers in ATmega128
gcc 4.7.4 gives me a warning: $ cat undefined-behavior.c extern int s; void foo() { s = s++; } $ gcc -c -Wall undefined-behavior.c undefined-behavior.c: In function ‘foo’:...
Tuesday, 14 April 2015 - 18:55
Cannot compile a plain simple union under AS6.2.1153
What does it matter that a non-standard header like avr/io.h includes a standard header like stdint.h? As far as I know, it's not disallowed by any relevant standard. Including...
Tuesday, 14 April 2015 - 16:54
Compiler bug!
Nobody said you are stupid.   Again, what value does k have on the STM32, and what value do you expect k to have?
Tuesday, 14 April 2015 - 16:43
Multi threading and timers in ATmega128
No, it's undefined behavior because you are modifying the same object twice in the same statement. You cannot do that.   Here's one valid interpretation of that statement (...
Tuesday, 14 April 2015 - 16:25
Multi threading and timers in ATmega128
This statement has undefined behavior: s=s++;   "Undefined behavior" means that the implementation (the compiler et al) is free to do anything as a result. It might "work"...
Tuesday, 14 April 2015 - 16:06
Compiler bug!
What value did you expect k to have? What value does k have on the STM32? I would expect k to be 119 after that assignment.
Tuesday, 14 April 2015 - 15:49
Multi threading and timers in ATmega128
Your main function has an automatic variable named "thread". That's a different variable than any global variable that you named "thread".
Tuesday, 14 April 2015 - 15:47
Merging Bootloader HEX-File and Application HEX-File to one
Note that those are word addresses in the datasheet, not byte addresses. I believe the Intel hex format uses byte addresses. There are two bytes per word, so multiply the word...
Tuesday, 7 April 2015 - 20:25
Correct spelling? Diode ORed or OR'd or what?
I would argue that OR, as a function/operator, can be used a verb. In human language terms (or at least English terms), an operator (like OR, AND, ADD, MULTIPLY, etc) is the verb...
Tuesday, 7 April 2015 - 15:50
Correct spelling? Diode ORed or OR'd or what?
awneil wrote: An apostrophe indicates that something's been omitted - so what do you think is omitted in "Diode-OR'd" ? The "e", obviously.
Tuesday, 7 April 2015 - 04:47
Atmega1284 struct problem
berkay91 wrote: program can be bad, but according to my trials these codes works correctly several microcontroller like image which is added in below, ı want to know why...
Sunday, 5 April 2015 - 16:23
USART can not receive byte
khanjala wrote: this is a code I use for toggling LED int main(void) { DDRB = 0xff; while (1)   { PORTB ^= 0xff; _delay_ms(1000...
Monday, 30 March 2015 - 19:35