Post Created date
8 bit floating point arithmetic on atmega8535
You're in luck! The ATmega series all have hardware 8-bit multiply instructions (returning a 16-bit product) which makes it easier to implement floating-point multiplication. As...
Thursday, 2 July 2015 - 23:10
sending twos complement to a unsigned char.
joeymorin wrote: Just use bitfields: struct { int seven_bit_int : 7; } foo; . . . signed char bar; . . . bar = foo.seven_bit_int;The compiler will generate the appropriate...
Monday, 22 June 2015 - 14:12
sending twos complement to a unsigned char.
Ah, yes, I forgot the part where you need a positive value. Theusch's method should work.   I mentioned shifting and dividing because the shift puts the sign bit of the 7-bit...
Saturday, 20 June 2015 - 15:09
sending twos complement to a unsigned char.
Stuff the data in an int8_t, shift it left by one bit, and then divide by two. Or just copy the seventh bit to the eighth bit. Either method will give you a signed 8-bit value in...
Saturday, 20 June 2015 - 03:45
Have the progmem and 64kb ptr problems been fixed or shall I stay with BASCOM?
Foxcat385 wrote: Name one Linux phone that's not Android, but that's open source for GPL-less forking. Linux running underneath Android is still subject to the GPL. Android is...
Tuesday, 19 May 2015 - 23:50
avr-gcc never exits any functions
From your Makefile: CFLAGS += -mmcu=$(MCUARCH) -mmcu=$(MCU) -Os -Wall -std=gnu99Why do you specify -mmcu= twice with different values? I suspect that might cause gcc to build for...
Sunday, 10 May 2015 - 18:37
Have the progmem and 64kb ptr problems been fixed or shall I stay with BASCOM?
Foxcat385 wrote: I downloaded LunaAVR. I don't know will it count as commercial use if my software is free and open source, but running on my hardware and PCB which I will make...
Friday, 8 May 2015 - 03:12
uint8_t indexing in 256b ring buffer. What are disadvantages to using int overflow?
clawson wrote: idx = ++idx & 0x0F; This statement has undefined behavior.
Thursday, 7 May 2015 - 14:05
Suppress warning : Warning 5 initialization discards 'const' qualifier from pointer target type [enabled by default] ct3A
Wouldn't it be better to fix the code so that it doesn't discard the const qualifier in the first place? If the code actually does legitimately discard the const qualifier (I can...
Wednesday, 29 April 2015 - 20:16
Error 1, please explane
  Is that the AVR Plugin for Eclipse? It looks like a known issue: #65 Build fails if project name include a space.
Sunday, 26 April 2015 - 23:33
Trouble detecting End of Line using SoftwareSerial on ATTiny85
ThomasTesla wrote: From "This hardware allows the Atmega chip to receive serial communication even while working on other tasks,...
Wednesday, 22 April 2015 - 16:40
porting from AVR Gcc compiler to IAR compiler
inigo77 wrote: myprintf_P(str,...) {static const __farflash char string[] = str; printf_P(string,##__VA_ARGS__:)} The ## preprocessor operator is used to join two tokens into...
Wednesday, 22 April 2015 - 15:03