Labrador/Old Matlab Interface/expected_adc.m

9 lines
143 B
Mathematica
Raw Normal View History

2016-09-07 07:36:43 +01:00
function [res] = expected_adc(vout)
vinp = vout/11;
vinn = 0;
vref = 1.65;
gain = 1;
top = 128;
res = int16((vinp - vinn)/vref * gain * top);