当前位置:网站首页>单片机:PCF8591硬件接口
单片机:PCF8591硬件接口
2022-06-13 03:38:00 【DC-STDIO】
PCF8591硬件接口(电路图引脚图)
PCF8591 是一个单电源低功耗的8位 CMOS 数据采集器件,具有4路模拟输入,1路模拟输出和一个串行 I2C 总线接口用来与单片机通信。与前面讲过的 24C02 类似,3个地址引脚 A0、A1、A2 用于编程硬件地址,允许最多8个器件连接到 I2C 总线而不需要额外的片选电路。器件的地址、控制以及数据都是通过 I2C 总线来传输,我们先看一下 PCF8591 的原理图,如图所示。

其中引脚1、2、3、4是4路模拟输入,引脚5、6、7是 I2C 总线的硬件地址,8脚是数字地 GND,9脚和10脚是 I2C 总线的 SDA 和 SCL。12脚是时钟选择引脚,如果接高电平表示用外部时钟输入,接低电平则用内部时钟,我们这套电路用的是内部时钟,因此12脚直接接 GND,同时11脚悬空。13脚是模拟地 AGND,在实际开发中,如果有比较复杂的模拟电路,那么 AGND 部分在布局布线上要特别处理,而且和 GND 的连接也有多种方式,这里大家先了解即可。在我们板子上没有复杂的模拟部分电路,所以我们把 AGND 和 GND 接到一起。14脚是基准源,15脚是 DAC 的模拟输出,16脚是供电电源 VCC。
PCF8591 的 ADC 是逐次逼近型的,转换速率算是中速,但是它的速度瓶颈在 I2C 通信上。由于 I2C 通信速度较慢,所以最终的 PCF8591 的转换速度,直接取决于 I2C 的通信速率。由于 I2C 速度的限制,所以 PCF8591 得算是个低速的 AD 和 DA 的集成,主要应用在一些转换速度要求不高,希望成本较低的场合,比如电池供电设备,测量电池的供电电压,电压低于某一个值,报警提示更换电池等类似场合。
Vref 基准电压的提供有两种方法。一是采用简易的原则,直接接到 VCC 上去,但是由于 VCC 会受到整个线路的用电功耗情况影响,一来不是准确的 5 V,实测大多在 4.8 V 左右,二来随着整个系统负载情况的变化会产生波动,所以只能用在简易的、对精度要求不高的场合。方法二是使用专门的基准电压器件,比如 TL431,它可以提供一个精度很高的 2.5 V 的电压基准,这是我们通常采用的方法。如图所示。

图中 J17 是双排插针,大家可以根据自己的需求选择跳线帽短接还是使用杜邦线连接其它外部电路,二者都是可以的。在这个地方,我们直接把 J17 的3脚和4脚用跳线帽短路起来,那么现在 Vref 的基准源就是 2.5 V 了。分别把5和6、7和8、9和10、11和12用跳线帽短接起来的话,那么我们的 AIN0 实测的就是电位器的分压值,AIN1 和 AIN2 测的是 GND 的值,AIN3测的是 +5 V 的值。这里需要注意的是,AIN3 虽然测的是 +5 V 的值,但是对于 AD 来说,只要输入信号超过 Vref 基准源,它得到的始终都是最大值,即255,也就是说它实际上无法测量超过其 Vref 的电压信号的。需要注意的是,所有输入信号的电压值都不能超过 VCC,即 +5 V,否则可能会损坏 ADC 芯片。
边栏推荐
- LVS四层负载均衡集群(3)集群功能分类 - HPC
- Doris data import broker load
- [test development] blog system - LoadRunner performance test (publish blog function benchmark test)
- Lambda终结操作查找与匹配findFirst
- ONNX+TensorRT+YoloV5:基于trt+onnx得yolov5部署1
- C language programming - input a string arbitrarily from the keyboard, calculate the actual number of characters and print out. It is required that the string processing function strlen() cannot be us
- Part II. S3. intuitionistic fuzzy multi-attribute decision-making method when attribute weight is intuitionistic fuzzy number
- C language programming -- input a string (including letters, numbers, punctuation marks, and space characters) from the keyboard, calculate the actual number of characters and print out, that is, it d
- Spark Optimization -- differences and policy selection of RDD cache (cache, persist, checkpoint)
- Detailed explanation of MySQL storage process
猜你喜欢

(9) Explain broadcasting mechanism in detail

Spark kernel (execution principle) environment preparation /spark job submission process
![[200 opencv routines by youcans] 201 Color space conversion of images](/img/99/36ba75cda08fd816dce83eaeea9e8d.png)
[200 opencv routines by youcans] 201 Color space conversion of images

无人机避障四种常见技术中,为何大疆首选双目视觉

【测试开发】文件压缩项目实战

大五人格学习记录

Carbon neutralization & Patent Innovation: multi indicator data such as patent panels (original documents) of provinces, cities and counties, and the number of low-carbon patents authorized

Cross border M & a database: SDC cross border database, Thomson database, A-share listed company M & a database and other multi index data (4w+)

LVS四層負載均衡集群(5)LVS概述

2000-2019 enterprise registration data of all provinces, cities and counties in China (including longitude and latitude, registration number and other multi indicator information)
随机推荐
Byte stream & buffer stream
Getting started with Oracle
Lambda终结操作count
footstep
Mobile communication exercises
Data of all bank outlets in 356 cities nationwide (as of February 13, 2022)
Scala sets (array, list, set, map, tuple, option)
SQL injection case demonstration and preventive measures
Spark optimization - data skew solution
GoFrame第五天
[test development] automated test selenium (III) -- unittest framework analysis
Two Chinese vector map data with map review number
UnionPay commerce - merchant statistics service platform
CXGRID keeps the original display position after refreshing the data
微信扫描二维码无法下载文件的解决办法
Wechat payment configuration
【 développement d'essais 】 sélénium d'essais automatisés (Ⅲ) - - analyse du cadre unitest
C language programming -- input a string (including letters, numbers, punctuation marks, and space characters) from the keyboard, calculate the actual number of characters and print out, that is, it d
2000-2019 enterprise registration data of all provinces, cities and counties in China (including longitude and latitude, registration number and other multi indicator information)
Simulink code generation: table lookup module and its code