Propeller and smt 16030 digital temp sensor - very basics
dubbel_j
Posts: 2
Hi
I just managed to get a Propeller1 and Smt16030 digital temperature sensor. I don't have previous experience about Propeller or microcontrollers or that temp sensor.
Could somebody point me to the correct direction for reading a temperature using that temp sensor and Propeller. I have looked some datasheets and currently I just need to print the temperature using Parallax Seriel Terminal.
Also I just blinked some leds using Propeller .
I just managed to get a Propeller1 and Smt16030 digital temperature sensor. I don't have previous experience about Propeller or microcontrollers or that temp sensor.
Could somebody point me to the correct direction for reading a temperature using that temp sensor and Propeller. I have looked some datasheets and currently I just need to print the temperature using Parallax Seriel Terminal.
Also I just blinked some leds using Propeller .
Comments
Here's what I came up with:
It compiles but it's untested. I don't have a sensor to test it with.
Make sure and take a look at page 222 of the Propeller Manual to see how to use waitpeq. I think I used it correctly but I don't use waitpeq in Spin often.
I used scaled integer math. I think all the values stay safely below the 32-bit overflow but I could be wrong.
If you try the code, I hope you post the output. When posting output, it helps if you use code tags. Click "Reply With Quote" to see how I used code tags with the above code, and use the same tags when posting code or output from the PST.
The code could be greatly improved by taking multiple readings and averaging the readings.
Edit: I just noticed I left some comments from a previous project in the program. I deleted these comments from the forum code but the attached code still has these extra comments.
This is way more than I expected to get. I think I have time to test this on next weekend. I will let you know is this working or not!