12位ADC升级移植内部8位ADC-12-Bit ADC U

来源: 本站整理 作者:佚名 2009-04-23 15:14:00
Abstract: This ar TIcle explains how to upgrade the ADC conversion resolu TIon of an 87C752 microcontroller from 8 bits to 12 bits. The analog-to-digital converter is replaced automa TIcally by sensing the presence of the external MAX186 or MAX188 A to D.

The simple circuit of Figure 1 (plus a software rou TIne) lets you substitute a multichannel, 12-bit A/D converter for the 8-bit A/D converter internal to an 87C752 microcontroller. Thus, a single assembly can implement both the low- and high-performance versions of a system. The software mentioned can be downloaded from EDN's free electronic bulletin board service (BBS)*.


Figure 1. The connections shown enable this µC to subsistute an external 12-bit A/D converter for its internal 8-bit converter. Replacing the external converter with the resister network causes the µC to resume use of its converter.

A socket lets you plug in the external A/D converter when you need it; otherwise you plug in the network of ten 10Ω resistors. At power-up, the µC executes a routine that looks for the external converter. If present, it is used; if not, the internal 8-bit converter is used. (Internally, the chip handles all conversion results as 12-bit values.)

This idea relies on the fact that the 87C752's five A/D-input pins can also serve as the bidirectional pins of an 8051 port (port 1). The resistor network connects the internal A/D converter directly to the applied analog inputs. Or, replacing the network with the external A/D converter connects those inputs to corresponding channels on that converter, and the µC's A/D-input pins (now acting as a bidirectional port) serve as a digital interface to the converter. By fortune and design, the change from external to internal converter is effected by simple pin-for-pin jumpers across the socket.

The assembly-language software routine "looks" for the external converter by triggering a conversion and noting whether or not the converter's busy flag (SSTRB) goes low. If it does, the µC sets an internal global flag (AD12) that tells it to use its external-converter routines for each subsequent conversion. This action is transparent to the calling routine. The conversion result, returned as bytes ADHI and ADLO, has the same format in either case except the four LSBs are zero for 8-bit-converter data.

Note that the µC's full scale is 5V, but the converter shown (MAX186) sets its full-scale input range with an internal reference of 4.096V. Software resolves the incompatibility in this example. Otherwise, you can replace the MAX186 with a MAX188 (a similar device with no internal reference) plus a separate 5V reference.

* Set modem to 2400 baud, 8 data bits, no parity, and 1 stop bit. Dial (617) 558-4241 and log on. (New users must set up an account; this is free.) Type SS/DI_SIG to select the Design Ideas section, RK1554 to select this idea, and D for downloading the file. Select protocol, download the file, log off, and then "unzip" the file.

A similar article appeared in the July 7, 1994 issue of EDN magazine.

专题

查看更多
IC品牌故事

IC 品牌故事 | 三次易主,安世半导体的跨国迁徙

IC 品牌故事 | 开放合作+特色深耕,华虹的突围之路

IC 品牌故事 | Wolfspeed:从LED到SiC,被中国厂商围追堵截的巨头

人形机器人

市场 | 全球首家机器人6S店在深圳龙岗开业

方案 | Allegro解决方案助力机器人应用提升效率、可靠性和创新

方案 | 爱仕特SiC三电平方案:突破工商储能PCS高效极限

毫米波雷达

毫米波雷达 | 智能驾驶不可或缺的4D毫米波雷达技术全解析

毫米波雷达 | 有哪些热门毫米波雷达芯片和解决方案?

毫米波雷达 | 超百亿美元的毫米波雷达都用在了哪里?

0
收藏
0