I am using CC2540 in measuring resistances under 2M. So I configured the build-in ADC to do the job. I used a variable resistor (2M ohm max) to test the hardware and software setting. At low resistance , everything works and the linearity is there. However, when the resistance goes above 50k ohm the reading jumpes to maximum very quickly. Therefore I suspect it's the input pull up resistor (about 200k) which is causing the problem. Is there a way to turn off this pull up resistance when p0_0 is configured as an ADC input pin? If it can not be turned off, how can I measure resistance above 1M ohm? Thanks!
↧