Post Created date
Replacing small floats with integer maths
jtw_11 wrote: I get to approx 10^300 during the first pass... That would exceed the range of a 32 bit float, max is approx 10^^38. A 64 bit double is max approx 10^^308
Thursday, 15 April 2021 - 08:21
DS18B20 ROM reads alternate bytes
Another point not related to your original problem. Your temperature conversion (unsigned to signed) is suspect. You have the result already at this point, since temperature is...
Saturday, 10 April 2021 - 20:45
DS18B20 ROM reads alternate bytes
This may be a separate issue, but your use of hex2a(uint8_t*s, char*buff)is strange. s is pointer to array of uint8_t (with 8 or 9 entries by the looks of it), and you loop until...
Saturday, 10 April 2021 - 09:11
Questions regarding splitting project into multiple files !!!!
Heisen wrote:I see many times it's recommended to include .h file in it's own .c file but as I understand .h file is made for including in other .c files like main.c etc. What is...
Sunday, 4 April 2021 - 20:45
Trying to understand 32U4 USB control read: DOC 22.12
liudr wrote: So if the firmware anticipates no bulk OUT transactions on EP0   I'm a bit rusty on this, but Endpoint 0 is reserved for the default control pipe isn't it? It...
Friday, 26 March 2021 - 22:43
Using two .h files to avoid link and scoping problems, maybe.
For gcc, what i was saying in #15 (at least for C, don't know if C++ is different)   -fno-common            In C code,...
Sunday, 21 March 2021 - 19:57
Using two .h files to avoid link and scoping problems, maybe.
james_millar wrote: No, I don't care on this point how professional programmers go about their business.  I was looking for problems with this approach that I had never...
Sunday, 21 March 2021 - 09:53
[Solved] Pointers ++
ka7ehk wrote: uint8_t MyVersion = *MyCal.version;   It's that pesky operator precedence thing again. You could do MyVersion = (*MyCal).version to force the dereference...
Saturday, 20 March 2021 - 10:28
Usart Buad rate warning for 115200 baud
You haven't said what FCPU is. I will guess 16MHz given mention of error of -3.5% for U2X=0 and 2.1% for U2X=1   I don't have a utils/setbaud.h in my setup, I do have util/...
Saturday, 13 March 2021 - 12:05
struct initializers is (not?) supported?
analityk wrote: initlializers filed must be in this same order in initializer list and in struct field definition. That is all. That's not true for C (C99 onwards). I think your...
Sunday, 7 March 2021 - 16:30
How big is ~uint8_t?
This is definitely a useful warning, however on the version of avr-gcc i have here avr-gcc (GCC) 4.9.2 I still get the warning with the following code. The cast back to uint8_t...
Wednesday, 24 February 2021 - 22:47
How to make a script for AVR programming on Ubuntu?
If it helps, a more minimal example of a Makefile. Only has rule for c files, would need extending for asm files. It should be petty obvious what you need to change (C_SRC, MCU,...
Saturday, 20 February 2021 - 15:04