Shop OBEX P1 Docs P2 Docs Learn Events
ADC question — Parallax Forums

ADC question

                    fltl    pin
                    wrpin   ##( P_ADC | P_ADC_GIO ), pin
                    wxpin   #%00_1101,              pin
                    wypin   #0,                     pin
                    dirh    pin
                    waitx   ##( 8192 << 2 )
                    rdpin   callo_tmp,              pin

                    fltl    pin
                    wrpin   ##( P_ADC | P_ADC_VIO ), pin
                    wxpin   #%00_1101,              pin
                    wypin   #0,                     pin
                    dirh    pin
                    waitx   ##( 8192 << 2 )
                    rdpin   calhi_tmp,              pin

I used this bit of code to read the 0v and 3.3v on one of my analog inputs, but the level measured for 0v was around 2-3K counts which I found odd. And the 3.3V level was around 13K counts. Why is the spread between these so small when using 14 bit SINC2 sampling mode?

Comments

Sign In or Register to comment.