nRF: Change analog reference voltage

Datasheet reading explains one reason why readings might have been 10% low.
This commit is contained in:
Jeff Epler 2019-09-16 18:33:05 -05:00
parent 2b560015c9
commit c56186da8c
1 changed files with 5 additions and 1 deletions

View File

@ -108,5 +108,9 @@ uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) {
} }
float common_hal_analogio_analogin_get_reference_voltage(analogio_analogin_obj_t *self) { float common_hal_analogio_analogin_get_reference_voltage(analogio_analogin_obj_t *self) {
return 3.3f; // With internal reference, single ended input (grounded negative
// input), and a gain of 1/6 the input range will be:
// Input range = (0.6 V)/(1/6) = 3.6 V
// The AIN0-AIN7 inputs cannot exceed VDD, or be lower than VSS. (36.8)
return 3.6f;
} }