Skip to content

Commit 354cdc7

Browse files
committedOct 29, 2016
gpdevboard: updated ADC reference to 1.024 V
1 parent 145d35e commit 354cdc7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎src/gpdevboard/protocol.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,11 @@ bool ReadADC(hdevice hdev, double &value)
492492
(frame.m_payload[2] << 8) |
493493
(frame.m_payload[3] << 0);
494494
value = (double)(((int32_t)intValue) >> 8) / 0x90000;
495+
496+
//Datasheet comes back as a fraction of full scale
497+
//Multiply by the 1.024V reference
498+
value *= 1.024;
499+
495500
return true;
496501
}
497502

‎src/gpdevboard/utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ bool SocketTest(hdevice hdev, SilegoPart part)
470470
tuple<TPConfig, TPConfig, double> sequence[] =
471471
{
472472
make_tuple(TP_GND, TP_FLIMSY_PULLUP, 0.0),
473-
make_tuple(TP_VDD, TP_FLIMSY_PULLDOWN, 1.0),
473+
make_tuple(TP_VDD, TP_FLIMSY_PULLDOWN, 1.024),
474474
};
475475

476476
for(auto config : sequence)

0 commit comments

Comments
 (0)
Please sign in to comment.