NRF51822之ADC(1)

本文详细介绍了nRF51系列微控制器中ADC的配置方法,包括输入电压范围的选择、分压电阻和电容的设置等。通过合理配置可以确保ADC的分辨率得到充分利用,并避免信号饱和的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在开始讲解的前,我们不生产水,我们只是大自然的搬运工。开始搬手册(nRF51 Series Reference Manual Version 3.0)上的资料

 

AIN0----------------P0.27

AIN1----------------P0.26

AIN2----------------P0.01

AIN3----------------P0.02

AIN4----------------P0.03

AIN5----------------P0.04

AIN6----------------P0.05

AIN7----------------P0.06

 

Set input voltage range
It is very important you configure the ADC so the input voltage range and the ADC voltage range is matching.If the input voltage range is lower than the ADC voltage range, the resolution will not be fully utilized.If the input voltage range is higher than the ADC voltage range, all values above the maximum ADC voltage range will be limited to the maximum value, also called the saturation point.Input voltage range and saturation point depends on the configured ADC reference voltage and the chosen prescaling. If the 1.2 V VBG internal reference voltage is used, the ADC range will be 0-1.2 V with a saturation point of 1.2 V. This means that your AIN signal with 1/1 prescaling should be in the range 0-1.2V in order to obtain proper conversion. Input above 1.2 V will be converted to the maximum ADC value.However, if you use, for example, 1/3 prescaling for your AIN input the input is scaled down to 1/3. The effect
is that your AIN voltage range is 0 - 3.6 V because the 3.6 V input voltage is scaled down to 3.6 / 3 = 1.2V. Table 1 shows examples of reference voltage and prescaling settings and the corresponding saturation points for ADC AIN input.

Saturation point examples

 

 

Voltage divider
There are two rules to follow to find the maximum input voltage allowed on the AIN pins:
1. The ADC should not be exposed to higher voltage than 2.4 V on an AIN pin after prescaling: Input voltage x prescaling = max. 2.4 V.

2. A GPIO pin must not be exposed to higher voltage than VDD + 0.3 V, according to the Absolute maximum ratings from the nRF51x22 Product Specification.

For example, when using 2/3 prescaling, you can expose 2.4 V / (2/3) = 3.6 V to an AIN pin. To not violate rule 2, VDD must be 3.3 V or higher.Table 2 shows examples on maximum voltages that can be exposed to an ADC AIN pin, depending on the supply voltage and your prescaling settings

 

累了,搬书就搬到这里休息一会儿。留下问题?如何选择ADC的AIN管脚的分压电阻和电容呢?http://files.cnblogs.com/files/libra13179/ADC_voltage_divider.pdf

官方提供参考

https://devzone.nordicsemi.com/blogs/30/measuring-lithium-battery-voltage-with-nrf51/

 

转载于:https://www.cnblogs.com/libra13179/p/5801762.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值