Could not disagree more with those two statements ....................An MCU with no floating point is for most serious applications useless ....... I am sorry to say, but this is a dead-end street
+1. Take a cruise through the forums to find out what amazing things have been done with the Picaxe, integer math and all.Welcome to the PICAXE forum. Please don't criticize your tools when you buy the wrong ones for the job you have.
From PICAXE Manual 1 "Getting Started" page53I was planning to use the PICAXE for my model rockets.
So I translated the temperature program I already use in Arduino and Launchpad RockComp's in my rockets into PICAXE BASIC.
Then I did have a nasty surprise. No floating point math.
Not really hidden information IF the manuals are read.General Purpose Variables.
There are 14 or more general purpose byte variables. These byte variables are
labelled b0, b1 etc. Byte variables can store integer numbers between 0 and 255.
Byte variables cannot use negative numbers or fractions, and will ‘overflow’
without warning if you exceed the 0 or 255 boundary values (e.g. 254 + 3 = 1)
(2 - 3 = 255)
However for larger numbers two byte variables can be combined to create a word
variable, which is capable of storing integer numbers between 0 and 65535.
Hi what maths do you want to attempt to do, I am currently "fighting" the picaxe code to get around no floating point maths, but lots of people on here can give you a hand if you describe the maths you want to do within the picaxe.
If you tell us a bit more about what it is you want to do, people will be in a better position to give advice.I am going to give it a real try and build a timer and a temperature measuring RockComp.
readtemp12 input_pin, W_variable
W_variable = W_variable * 25/40
B_units = W_variable // 10
B_tens = W_variable / 10 // 10
B_hundreds = W_variable / 100 // 10
serout diplay_pin, baud_rate, (#B_hundreds, #B_tens, ",", #B_units)
Checkout some blog posts for my "AXEtimeter" model rocketry datalogger based on the 14M2 and other bits.As the subject is to do with 'model rockets' here is a video of a PICAXE getting involved in some real rocketry;
http://www.youtube.com/watch?v=jsfL19FV3qg
Actual launch is at about 18 seconds
Hallo Hendriks,One more Dutchie here
Gasp-this sounds hot stuff! No wonder you don't have to measure negative temps ... FWIW Maxim's esteemed DS18B20 (DS = Dallas Semiconductor) has an operating temperature range of -55°C to +125°C and is accurate to ±0.5°C over the range of -10°C to +85°C.-just temp changes in a model rocket body tube.
The DS18B20 is not particularly fast at returning a result, up to 750mS, but that is more down to the device than the PICAXE.Yes, I have ordered a DS18B20.
Yes, but what sort of temperature variation are you expecting ?The 750ms can be a problem.
I wanted to sample the temperature every 0.1 of a second or so.
750ms = 3/4 of a second.
In 750ms a rocket can travel hundreds of meters.
Ah, good question.Yes, but what sort of temperature variation are you expecting ?
The thermal mass of the DS18B20 (or LM35) will mean that the recorded temperature will lag considerably behind the surface temperature, so reading it every 100mS wont tell you much, apart from what the temperature was a while ago.
I guess your rocket won't be as high flying as I was thinking lolI don't have to measure negative temps.
Just temp changes in a model rocket body tube.
It suggests how you can minimise the effect, yes, but only that. I am guessing the suggestions are to do with long term (relativly stable) measuments, not to do with fast moving changes and keeping them within a few hundread milli seconds of the surface temperaure.The LM35 Datasheet explains how to mitigate the effects of thermal mass as well lead/pin temperature.
Yes.Small bead thermistors have a very small thermal mass and response time
I seem to recall temperature changes at about 4F/1000ft altitude? And these rockets move quite quickly.So, assuming my guess is correct, the temperature is only going to change very slowly, so recording it every 100mS does not seem to serve any purpose.
AH, but not all things in live must have a purpose.So, assuming my guess is correct, the temperature is only going to change very slowly, so recording it every 100mS does not seem to serve any purpose.
You tell me, I am not one for guessing too much on this lind of stuff. That is just a guess, isn't it?. I would much rather do some math from the datasheet specs then test & measure and get a somewhat accurate idea.If you put a DS18B20 on a surface that is, say 2C higher than ambient, how long before the sensor reports a 1C rise, several seconds maybe ?