下面的是火~哥的一天攻破K60资料里的程序段:
case ADC0_DP0:
case ADC0_DP1:
case ADC0_DP3:
case ADC0_DM0: // ADC0_DM0
case ADC0_DM1: // ADC0_DM1
case ADC0_SE16: // ADC0_SE16
case Temp0_Sensor: // Temperature Sensor,内部温度测量,可用ADC函数
case VREFH0: // 参考高电压,可用ADC函数 ,结果恒为 2^n-1
case VREFL0: // 参考低电压,可用ADC函数 ,结果恒为 0
break; //这部分管脚不用配置复用
case ADC1_SE16: // ADC1_SE16
case VREF_OUTPUT: // VREF Output
case ADC1_DM0: // ADC1_DM0
case ADC1_DM1: // ADC1_DM1
case Temp1_Sensor:
case VREFH1: // 参考高电压,可用ADC函数 ,结果恒为 2^n-1
case VREFL1: // 参考低电压,可用ADC函数 ,结果恒为 0
break;
没用差分模式,用的单端。
datasheet里面有这么一段:All DADPx inputs may be used as single-ended inputs if the DIFF bit is low.
In certain MCU configurations, some DADMx inputs may also be used as single-ended
inputs if the DIFF bit is low. Refer to the Chip Configuration chapter for ADC
connections specific to this MCU.