Lessons learned on AMDC firmware for reading voltage on AMDS sensor cards #426
elsevers
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Abstract
This
show and tell
summarizes the following two lessons learned on how to properly read voltage from AMDS sensor cards:Problematic legacy code
In our research group, code along the following lines has propagated through most of our research projects for reading the AMDS sensor card voltages:
There are two problems here:
0.00125
does not match the ADC configuration (at least for the current card), which maps an input voltage ofVRef
to a digital value of0xFFFF
. See Fig. 47 on page 21 of the datasheet.Correct code
The problems in the above code are resolved in the following code:
Note that this code:
out
Beta Was this translation helpful? Give feedback.
All reactions