The Industrial Control text is available for free download from www.parallax.com -> Stamps in Class Tutorials.· It has circuits and example programs for the LM34.· I think these examples will get you a running start. · The LM34 is similar to the LM335 in that its output varies by 10 mv/degree, and it is measured with the ADC0831 and the BASIC Stamp in the Industrial Control text.· · The differences are in the pin map and the fact that it's calibrated for degrees Kelvin instead of Fahrenheit.· It also has a different pin map, so you'll need to check the datasheet for which pin goes to Vss, Vdd, and Vout/adj.·
Go to www.national.com and get the datasheet for the ADC0804. Build the circuit shown on page 24, but instead of LEDs, connect the ADC0804's DB0...DB7 to the BASIC Stamp's P0...P7. Also, get rid of the momentary switch and connect P8 to the /WR/INTR node. Then, you can use a test program like this to display the ADC values:
' {$STAMP BS2}
' {$PBASIC 2.5}
measurement VAR Byte
' Kickstart converter
HIGH 8
LOW 8
HIGH 8
INPUT 8
' Main routine
DO
measurement = INL
DEBUG HOME, "Binary value: ", BIN8 measurement, CR,
"Decimal value: ", DEC3 measurement
PAUSE 100
LOOP
Post Edited (Andy Lindsay (Parallax)) : 2/14/2005 2:35:19 AM GMT
Comments
·
The LM34 is similar to the LM335 in that its output varies by 10 mv/degree, and it is measured with the ADC0831 and the BASIC Stamp in the Industrial Control text.·
·
The differences are in the pin map and the fact that it's calibrated for degrees Kelvin instead of Fahrenheit.· It also has a different pin map, so you'll need to check the datasheet for which pin goes to Vss, Vdd, and Vout/adj.·
Go to www.national.com and get the datasheet for the ADC0804. Build the circuit shown on page 24, but instead of LEDs, connect the ADC0804's DB0...DB7 to the BASIC Stamp's P0...P7. Also, get rid of the momentary switch and connect P8 to the /WR/INTR node. Then, you can use a test program like this to display the ADC values:
Post Edited (Andy Lindsay (Parallax)) : 2/14/2005 2:35:19 AM GMT