adc smartpin x and y regs
I've been playing with P2 atod in FlexBasic.
pinstart(16, (p_adc_1x) or (p_adc) ,13 , 0) do print int(rdpin(16)) pausems 1000 loop
This works and for an input of
0.0v I get 2980-2985
0.5v readings I get are 4592-4597 and
3.3v I get 13570 - 13579
from the scattered docs, I gather-
the value 13 above represents the regx= 001101
and that the two msbits '00' set up 'sinc2 sampling mode'
and that the bits '0-3' set up the number of sample bits= 2-18.
So 1101 sets the sample bits to what?
It looks like 14 bits as in 0-16384
If thats the case then 1110=14= 15bits?
and 1111=15= 16 bits?
so looks like bits value of bits 0-3 +1?
but if I substitute 14 for the above value 13 for regx I get a value of 0.
Can someone please explain and point me to some docs covering the adc x and y reg values and what sinc modes mean in real life.
ps had to put int around the print function as it was actually printing in hex (flexpin version 5.1- not the latest!)