From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] pc87360 voltage reference constants
Date: Fri, 12 Aug 2005 19:50:38 +0000 [thread overview]
Message-ID: <20050812195032.12472f35.khali@linux-fr.org> (raw)
In-Reply-To: <42FCC357.1000802@divsol.com>
Hi Jim,
> Im looking to understand why my temps are so high,
> esp in comparison to values from my soekris as obtained from
> http://phk.freebsd.dk/soekris/env4801/
>
> VREF = 1.214 V245 = 2.450
> Temp 2 (status=0x81) 54 C
>
> in your code,
>
> data->in_vref = (i&0x02) ? 3025 : 2966;
> dev_dbg(&new_client->dev, "Using %s reference voltage\n",
> (i&0x02) ? "external" : "internal");
>
> youve got 2 magical constants, where are they from ?
> I cant find mention of them in the pdf,
3.025 is 1.235 * 2.45. Page 227 of the datasheet mentions internal Vref
= 1.235V, and at page 180, section 11.3.2 has: "Analog input voltage is
measured relative to 2.45 * Vref".
In section 14.4.1, external Vref is given at 1.211V, and full scale is
given at 2.097, which happens to be 1.211 * 2.45.
This is where the numbers are coming from. Now I always found it strange
that you could pick an external voltage with a *lower* value than the
internale voltage, and not much lower at that. Remember that I do not
have a PC87366 chip myself, so had no chance to measure the physical
values at a chip's pins to confirm that the driver does the right thing.
If you are using an external reference, and it is NOT 1.211 volt, then I
am not surprised if your voltages are not correct.
Note that the reference voltage is used to compute the voltages and the
thermistor-based temperatures, NOT the diode-based temperatures. The TMS
logical device is influenced by the reference voltage, but the value
isn't used in computations AFAIR.
> BTW, (since Im writing), my patchset for pc87366 sensors-dev-attrs
> (done against rc4-mm1), also applies (clean, iirc) to rc5-mm1, and
> works there.
I'm sorry, I didn't have the time to look at it yet. I'm currently busy
with i2c core changes and other drivers (i2c-viapro and it87.) Please be
patient.
--
Jean Delvare
next prev parent reply other threads:[~2005-08-12 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-12 17:43 [lm-sensors] pc87360 voltage reference constants Jim Cromie
2005-08-12 19:50 ` Jean Delvare [this message]
2005-08-13 5:55 ` Jim Cromie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050812195032.12472f35.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.