打印
[Kinetis]

咨询K60里ADC16的自动校准使用

[复制链接]
976|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
ronczch1|  楼主 | 2015-7-13 16:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
奥德赛| | 2015-7-14 09:03 | 只看该作者
是不是只有写入这两个寄存器才能校准呢

使用特权

评论回复
板凳
FSL_TICS_ZJJ| | 2015-7-16 16:54 | 只看该作者
关于这个问题,楼主可以看K60的用户手册,在ADC的校正功能那里讲的很清楚。
35.4.7 Calibration function
The ADC contains a self-calibration function that is required to achieve the specified
accuracy. Calibration must be run, or valid calibration values written, after any reset and
before a conversion is initiated. The calibration function sets the offset calibration value,
the minus-side calibration values, and the plus-side calibration values. The offset
calibration value is automatically stored in the ADC offset correction register (OFS), and
the plus-side and minus-side calibration values are automatically stored in the ADC plusside
and minus-side calibration registers, CLPx and CLMx. The user must configure the
ADC correctly prior to calibration, and must generate the plus-side and minus-side gain
calibration results and store them in the ADC plus-side gain register (PG) after the
calibration function completes.


To complete calibration, the user must generate the gain calibration values using the
following procedure:
1. Initialize or clear a 16-bit variable in RAM.
2. Add the plus-side calibration results CLP0, CLP1, CLP2, CLP3, CLP4, and CLPS to
the variable.
3. Divide the variable by two.
4. Set the MSB of the variable.
5. The previous two steps can be achieved by setting the carry bit, rotating to the right
through the carry bit on the high byte and again on the low byte.
6. Store the value in the plus-side gain calibration register PG.
7. Repeat the procedure for the minus-side gain calibration value.

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

5

主题

14

帖子

0

粉丝