串口终于通了...ADC是有漂移
这个结果是在EMSTM32V1上用ADC的例程得到的结果.
42;31m AD value = 0x0F41 [0m
[42;31m AD value = 0x0F44 [0m
[42;31m AD value = 0x0F53 [0m
[42;31m AD value = 0x0F42 [0m
[42;31m AD value = 0x0F44 [0m
[42;31m AD value = 0x0F46 [0m
[42;31m AD value = 0x0F41 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F44 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F42 [0m
[42;31m AD value = 0x0F40 [0m
[42;31m AD value = 0x0F42 [0m
[42;31m AD value = 0x0F46 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F30 [0m
[42;31m AD value = 0x0F41 [0m
[42;31m AD value = 0x0F43 [0m
[42;31m AD value = 0x0F43 [0m
[42;31m AD value = 0x0F3C [0m
[42;31m AD value = 0x0F44 [0m
[42;31m AD value = 0x0F44 [0m
[42;31m AD value = 0x0F3B [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F45 [0m
[42;31m AD value = 0x0F46 [0m
家里没表,先来个估算吧.
假定Vref=3.30V. 12位ADC
vd1=0x0f30=3888
v1=vd1*Vref/2^12=3888*3.3/4096=3.132421875V
vd2=0x0f46=3910
v2=vd2*Vref/2^12=3910*3.3/4096=3.150146484375V
从这个结果可以看出有近18mV的漂移~~~
当然这个没加入软件滤波...
如果外电压在15V左右采用1/5分压电路后,会有90mV的漂移~~~
没看板子的采样保持电路,所以现在没有发言权~~~