ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
Help Reading in Analog Values
J Gary Mull
Tue, 13 Oct 1998 00:11:06 -0400

 Tue, 13 Oct 1998 00:11:06 -0400
I am trying to read in temperature on ECS and I do not know how to do the
calculation using the ECS 32 bit arithmetic.

If I simply multiply the value of the ouput of the analog sensor by 2 I am
overstating the temperature several degrees.  What I need to do is mutiply
the value times 1.961 to get an average temperature.  I do not know how to
set up an ECS event with the 32 bit arithmetic.

I have an example from 12 bit at 5 volts but it does not work for my 8 bit.
Any help would be appreciated.

        Gary

Info from HV
Info from HV

                 
The analog inputs operate from 0 to 5 VDC and provide 8-bit resolution.
When an analog input is read, the voltage is converted into a value between
0 and 255 (00h to FFh).  This gives a resolution of 19.61mV (5V ÷ 255
steps).  To determine the actual voltage from the value read in, multiply
the value by 19.61mV. 



jgary@atl.mindspring.com   Gary at Home 
jgmull@us.ibm.com          Gary at Work

  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.