* [lm-sensors] 8-bit ADC, LSB = 8mV - 2.048V or 2.04V?
@ 2009-10-08 13:46 Ian Pilcher
2009-10-08 14:08 ` Jean Delvare
2009-10-09 19:31 ` Ian Pilcher
0 siblings, 2 replies; 3+ messages in thread
From: Ian Pilcher @ 2009-10-08 13:46 UTC (permalink / raw)
To: lm-sensors
Thanks to the nonsensical responses I'm getting from MSI, I'm digging in
to the W83627EHF datasheet to try to figure out what's connected to what
on my board.
According to the datasheet, this chip uses an 8-bit analog-to-digital
converter for voltage measurements, where the least significant bit
represents 8 mV. They state that this results in a maximum measurement
of 2.048 V (2048 mV), but I can't figure out their math:
bit 0 (LSB) 8 mV
bit 1 16 mV
bit 2 32 mV
bit 3 64 mV
bit 4 128 mV
bit 5 256 mV
bit 6 512 mV
bit 7 1024 mV
---------
2040 mv (2.04 V)
====
Am I missing something?
Thanks!
--
====================================
Ian Pilcher arequipeno@gmail.com
====================================
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] 8-bit ADC, LSB = 8mV - 2.048V or 2.04V?
2009-10-08 13:46 [lm-sensors] 8-bit ADC, LSB = 8mV - 2.048V or 2.04V? Ian Pilcher
@ 2009-10-08 14:08 ` Jean Delvare
2009-10-09 19:31 ` Ian Pilcher
1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2009-10-08 14:08 UTC (permalink / raw)
To: lm-sensors
Hi Ian,
On Thu, 08 Oct 2009 08:46:57 -0500, Ian Pilcher wrote:
> Thanks to the nonsensical responses I'm getting from MSI, I'm digging in
> to the W83627EHF datasheet to try to figure out what's connected to what
> on my board.
>
> According to the datasheet, this chip uses an 8-bit analog-to-digital
> converter for voltage measurements, where the least significant bit
> represents 8 mV. They state that this results in a maximum measurement
> of 2.048 V (2048 mV), but I can't figure out their math:
>
> bit 0 (LSB) 8 mV
> bit 1 16 mV
> bit 2 32 mV
> bit 3 64 mV
> bit 4 128 mV
> bit 5 256 mV
> bit 6 512 mV
> bit 7 1024 mV
> ---------
> 2040 mv (2.04 V)
> ====>
> Am I missing something?
You are mathematically correct, but the datasheet is possibly correct
too ;)
By their analog nature, ADC chips don't map discrete voltage values to
their digital representation, but voltage _ranges_. For example, a
voltage of 16 mV would be represented as 0x02 but a voltage of 17 mV
would be represented as 0x02 too. So the reality isn't that "16 mV is
represented as 0x02" but rather "voltages ranging from 16 mV to 24 mV
are represented as 0x02" so that all values within the ADC range are
covered.
Under this light, you understand that the values represented by 0xff
would be not just 2.040 V but any value between 2.040 V and 2.048 V,
which means that the datasheet is correct.
In practice this is an error of 0.2%, which you can just ignore. The
error incurred by scaling resistors and electrical noise is at least as
important.
--
Jean Delvare
http://khali.linux-fr.org/wishlist.html
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] 8-bit ADC, LSB = 8mV - 2.048V or 2.04V?
2009-10-08 13:46 [lm-sensors] 8-bit ADC, LSB = 8mV - 2.048V or 2.04V? Ian Pilcher
2009-10-08 14:08 ` Jean Delvare
@ 2009-10-09 19:31 ` Ian Pilcher
1 sibling, 0 replies; 3+ messages in thread
From: Ian Pilcher @ 2009-10-09 19:31 UTC (permalink / raw)
To: lm-sensors
On 10/08/2009 09:08 AM, Jean Delvare wrote:
> Under this light, you understand that the values represented by 0xff
> would be not just 2.040 V but any value between 2.040 V and 2.048 V,
> which means that the datasheet is correct.
I guess 2.048 is easier to write than 2.04799999999999999999999999. ;-)
Thanks!
--
====================================
Ian Pilcher arequipeno@gmail.com
====================================
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-09 19:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 13:46 [lm-sensors] 8-bit ADC, LSB = 8mV - 2.048V or 2.04V? Ian Pilcher
2009-10-08 14:08 ` Jean Delvare
2009-10-09 19:31 ` Ian Pilcher
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.