You can set up the sensor to output PWM and then measure pulse length. Only trouble is, to set up the sensor you need the EVB90614 evaluation board and their somewhat buggy software. I did it this way and it worked okay for me.
You can set up the sensor to output PWM and then measure pulse length. Only trouble is, to set up the sensor you need the EVB90614 evaluation board and their somewhat buggy software. I did it this way and it worked okay for me.
They have a sample program posted on their website in assembler. I've reviewed it and it seems pretty straight forward. I'll try to write some code in PicBasic using the I2C commands and post it here if I'm successful
Here's my subroutine. It worked like a charm!
read_temp:
sensortemp = 0
reg = $07
addr = 0
I2CRead Tda, Tcl, addr, reg, [sensortemp.lowbyte, sensortemp.highbyte]
Return
I used a 18F6720 using a define of 4 mhz, with sensortemp defined as a word.
reg and addr were defined as bytes. Tda and Tcl were pin assigments.
reg $07 sets the sensor to send Object Temperature 1.
Last edited by rtsandiego; - 20th September 2009 at 01:14.
Bookmarks