A standalone Floating Point Maths Chip that connects to PICAXE? Do you mean something like this? http://www.picaxestore.com/index.php/en_gb/picaxe/add-on-modules/fpu003.htmlWill Picaxe ever develop a chip with a millisecond timer and floating point math,
either as a standalone or one that can feed the timing and math (integer)results to
a very capable chip like the 20X2?
Al
Inglewoodpete pretty much hit the nail on the head. This subject has come up many times. For fast floating pointA good question. Rev Ed's bread and butter is the UK education market, so I'd imagine that future development would be largely driven by that.
Where did you find a "chip" with floating point math? How about a datasheet reference?chip with a millisecond timer and floating point math,
The base PICs that PICAXE is built on can deal with floats (and handle floating point math).Where did you find a "chip" with floating point math? How about a datasheet reference?
Can you be more specific? We poor old BASIC programmers don't really understand what you are referring to unless you spell it out.... can deal with floats ....
I'm not sure what you're looking for. If using C, you can assign a variable of type "Float" and then do math with it.Can you be more specific? We poor old BASIC programmers don't really understand what you are referring to unless you spell it out.
fnumber1 = 1.234;
fnumber2 = 4.321;
floatResult = addFloat (fnumber1, fnumber2);
inumber1 = 123;
inumber2 = 321;
intResult = addInt (inumber1, inumber2);
serOut ("Hello, I am a PIC 12F1840\r\n");
serOut ("Float Result: ");
char * output;
int status;
output = ftoa(floatResult, &status);
serOut (output);
serOut ("\r\n");
serOut ("Int Result: ");
itoa (str, intResult, 10);
serOut (str);
serOut ("\r\n");
Hello, I am a PIC 12F1840
Float Result: 5.555056
Int Result: 444
Hello, I am a PIC 12F1840
Float Result: 5.555000
Int Result: 444
A look at the manual shows that the X2 chips can already provide a millisecond timer on both timer1 and timer3.Will Picaxe ever develop a chip with a millisecond timer
andWith a 4MHz resonator this means a minor tick occurs every 64us (32us at
8MHz, 16us at 16MHz, 8us at 32MHz, 4us at 64MHz).
If 15625 minor ticks @4MHz gives a 1 second delay then 15.625 minor ticks, rounded up to 16, @4MHz gives about a 1ms delay.We know that at 4MHz each minor tick takes 64us and 1 second is equivalent to
1000000 us. Therefore we require 15625 (1000000 / 64) minor ticks to give us a
1 second delay. Finally 65536 - 15625 = 49910, so our preload value become
49910.
I have done some work with the uM-FPU. its specified to allow 10ms for a calculation to complete. On the subject of that little device, I thought I had heard a rumour that it is no longer being produced.Note: Storing ints and floats in variables, and adding those variables together and storing the result in another variable takes...about 10 instruction cycles for the INT and 240 instruction cycles for the float.
So, Floating point math is MUCH slower.
Yikes! Even my 240 cycles was "only" 30us. 10ms would be some serious number crunching!I have done some work with the uM-FPU. its specified to allow 10ms for a calculation to complete.