internal error at line 405 file 'avr.cpp' (by simon)
Hi Jonathan
I have this timer program and the problem is that i need to set up one counter to value '43000' and the biggest value accepted is '32000' . How can solve the problem ?
Thank you .
(no subject) (by Jonathan Westhues)
LDmicro uses 16 bit signed integer math. This means that the most positive number representable is 2^15 - 1 = 32767, and the most negative is -2^15 = -32768.
So there is no way to represent a number greater than 32767. I would suggest working in different units, or cascading multiple counters, or otherwise writing the code to avoid numbers that cannot be represented as 16 bit signed integers.
Though it's a bug that you don't get a nice warning, as you do for other ops.