Hardware
You need an MCU with multiple digital and analogue I/O’s. You connect all the rows to the digital I/O's and columns to the analogue I/O’s or vice versa (typically there are a limited number of analogue I/O’s available so if not a square matrix you would connect the analogue to the lowest number). Standard chips are available with 8,16 or 32 analogue I/O’s. The digital lines would be used to ‘drive' the voltage into the sensors and the analogue lines used to ‘read’ the output. The read lines are connected to ground via a reference resistor (typically 10k or 4.7k) and the voltage between the sensor and the reference resistor is measured by the analogue I/O. Usually a reference resistor is required for each analogue line although if suitable isolation is available between the analogue lines in the MCU it may be possible to use just one reference resistor. Again depending on the MCU impedance and isolation additional diodes and or high resistance buffers may be required. Typically 8 bit AtoD resolution is suitable for most HMI applications but if high position and/or pressure accuracy is require 10bit may be advantageous.

Scanning method
The first digital line is set to High and all others set to Low or Ground or Floating (differing ghosting and/or cross talk effects will be seen depending on how the additional digital lines are set) then each analogue line is measured sequentially while the others are set to to low or ground or floating (as above different results will be seen depending on the choice). Once all analogue lines are read the next digital line is set to high and all others as above and the analogue lines read again. This is repeated till all sensor cells are read.

文章讲述了如何使用MCU处理带有多个数字和模拟I/O的硬件系统,尤其是如何连接行和列以进行数据读取。通常,模拟I/O用于读取传感器输出,而数字I/O用于驱动电压。扫描方法涉及逐个测量模拟线路,同时管理数字线路的状态以避免干扰。8位A/D分辨率适用于大多数HMI应用,但高精度需求可能需要10位分辨率。
5793

被折叠的 条评论
为什么被折叠?



