12.07.2015 Views

SUB-20 User Manual - Dimax

SUB-20 User Manual - Dimax

SUB-20 User Manual - Dimax

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

46<strong>SUB</strong>-<strong>20</strong><strong>SUB</strong>-<strong>20</strong> APIParameters· data - buffer to store conversion result(s)· mux - ADC input channel multiplexer control code(s). See table below.· reads - number of results to readADC mux codeSingle EndedDifferentialPositiveDifferentialNegativeADC_S0ADC0ADC_S1ADC1ADC_S2ADC2ADC_S3ADC3ADC_S4ADC4N.A.ADC_S5ADC5ADC_S6ADC6ADC_S7ADC7ADC_D10_10XADC1 ADC0 10ADC_D10_<strong>20</strong>0X ADC1 ADC0 <strong>20</strong>0ADC_D32_10X ADC3 ADC2 10ADC_D32_<strong>20</strong>0X ADC3 ADC2 <strong>20</strong>0ADC_D01 ADC0 ADC1ADC_D21 ADC2 ADC1ADC_D31 ADC3 ADC1ADC_D41 ADC4 ADC1N.A.ADC_D51 ADC5 ADC1ADC_D61 ADC6 ADC1ADC_D71 ADC7 ADC1N.A.ADC_D02 ADC0 ADC2ADC_D12 ADC2 ADC2ADC_D32 ADC3 ADC2ADC_D42 ADC4 ADC2ADC_D52 ADC5 ADC2ADC_1_1V Internal 1.1VADC_GNDAnalog GNDN.A.ADC ResultFor single ended conversion:GainFor differential:ADC is a result of conversion. Note that the result of differential conversion is signed and can be negative.Return valueOn success function returns 0. Otherwise error code.Exampleint adc, adc_buf[3], adc_mux[3];© <strong>20</strong>13 xdimax.com rev 2.17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!