Analysis of Problems in Using A/D Converter ADμC812

Publisher:WhisperingRainLatest update time:2011-02-13 Keywords:A/D  ADμC812 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Problems in using A/D converter

The ADC conversion module integrated in ADμC812 includes an 8-channel, 12-bit, single-power A/D converter. These A/D converters are composed of conventional successive approximation converters based on capacitor DACs, and the received analog input range is 0 to +VREF (+2.5V). In addition, this module also provides users with on-chip reference and calibration features, and all components in the module can be easily set through 3 register SFR interfaces. In short, the ADC module of ADμC812 has performance comparable to that of general ADC chips, and is simple to operate, highly reliable, and has an acquisition rate of up to 200kHz.

(1) Reference voltage

The 2.5V reference voltage for the A/D converter can be provided on-chip or driven by an external reference via the VREF pin. If the internal reference is used, 100nF capacitors should be connected between the VREF and CREF pins and AGND for decoupling. These decoupling capacitors should be placed close to the VREF and CREF pins. To achieve the specified performance, it is recommended that when an external reference is used, the reference should be between 2.3V and the analog power supply AVDD.

Since the on-chip reference is high-precision, low-drift, and factory-calibrated, and this reference voltage appears at the VREF pin when the ADC or DAC is enabled, the on-chip reference can be used as a 2.5V reference power supply when expanding the system. If the on-chip reference is used in a microconverter, it should be buffered on the VREF pin and a 100nF capacitor should be connected between this pin and AGND.

In practical applications, special attention should be paid to the fact that the internal VREF will remain powered down until one of the ADC or DAC peripheral modules is powered up by their respective enable bits.

(2) Analog input

Compared with other ADC chips, the ADC module of ADμC812 has a disadvantage, that is, the analog input range for normal operation of ADC is 0~+2.5V; and the allowed input voltage range can only be positive voltage (0~+5V). Experiments have shown that if the input analog voltage exceeds +2.5V (the maximum value is +5V), the sampling result of ADC is the maximum value (0FFFH). Although the result is incorrect, it does not affect the normal operation of ADμC812; however, once a negative analog voltage is input, it will affect the normal operation of ADμC812, which is manifested as the disappearance of the ADC reference voltage (VREF=+2.5V) and incorrect sampling results. If a negative voltage is input for a long time, the chip may be damaged. Therefore, in actual applications, if it is found that there is no voltage at the VREF terminal after starting the ADC, the chip should be reset immediately and the acquisition and amplification part of the analog input signal should be checked. Only after ensuring that the analog signal entering ADμC812 is within the range of 0~+2.5V, the ADC can be started again. In actual applications, the input analog voltage should be guaranteed to be a positive level.

Problems with using parallel I/O ports

Like other microcontrollers, ADμC812 also has 4 general data ports (P0~P3) to exchange data with external devices, and in addition to being used as general I/O, some ports can also implement external memory operations. Other ports are multiplexed with other functions of peripheral devices on the device.

(1)P1 port

It is worth noting that in ADμC812, ports 0, 2, and 3 are bidirectional ports, while port 1 is an input-only port. In the figure, it can be seen that the circuit of port P1 includes a bit latch and input buffer, but no output driver, so port P1 can only be configured as digital input or analog input, and cannot be used for output.

When the P1 port is used as an analog input, it corresponds to the 8-channel analog-to-digital conversion input ports ADC0~ADC7 in ADμC812. If in actual use, it is not necessary to use all 8-channel ADCs, the remaining P1 port pins can be set as digital inputs, but it should be noted that it is different from the general I/O port used as digital input for the standard 8051 microcontroller, and high level is considered valid. Therefore, when the P1 port is used as a digital input, before detecting whether there is an input signal, 0 must be written to the corresponding port, and then judged. This requires that when designing the system, a pull-down resistor should be added to the P1 port used as a digital input, which is generally several kΩ.

Port P1 latch and input buffer

Figure P1 port latch and input buffer

(2) P2 port

As mentioned above, the P2 port of ADμC812 is also a bidirectional port, including input buffer, output latch and output driver. Through the port SFR corresponding to the P2 port, each port pin of the P2 port can be independently configured as digital input or digital output, and read and write access to them. These are the same as the use of the P2 port of a general microcontroller as a general I/O port.

But when ADμC812 is connected to an external data memory, port P2 is used not only to output the middle 8-bit address (A8~A15), but also to output the high 8-bit address (A16~A23), which is similar to port P0. The difference is that port P0 multiplexes the data and address bus, while port P2 multiplexes the middle and high byte address bus. Therefore, when port P2 is used for external data memory with expanded capacity, the high byte address should also be latched through a latch, as shown in Figure 4.

P2 port address latch

Figure P2 port address latch

External addressing issues

Unlike other single-chip microcomputers, ADμC812 has 24 address lines. Its addressable external data memory space is 16MB. This large storage space can meet the needs of many application fields. Since the external data memory space is as high as 16MB, it is not enough to use DPTR as an indirect address register. Therefore, the data pointer of ADμC812 is composed of three 8-bit registers, namely DPP (page byte register), DPH (high byte register) and DPL (low byte register), which provide memory addresses when performing internal and external code access or external data access. Like other single-chip microcomputers, DPTR is still composed of two registers, DPH and DPL, and the usage is the same; and DPP is a register used to transmit the highest 8-bit address of A23~A16, which is equivalent to dividing the external data register into 1 page every 64KB, and different DPP values ​​will correspond to different pages, so it is named page register.

The impact of SPI serial port on P3 port

To facilitate the communication between MCU and various peripheral devices, ADμC812 provides three serial I/O ports: UART interface, I2C compatible serial interface and serial peripheral interface (SPI). Among them, SPI interface is an industrial standard synchronous serial interface, which allows MCU to communicate with various peripheral devices in serial mode (8-bit data is sent and received synchronously at the same time). Since only 4 lines are needed to directly interface with a variety of standard peripheral devices, SPI interface is widely used in serial communication.

However, when we use the SPI serial port of ADμC812 for communication, we find that it is different from other chips (with SPI serial port function). The enabling of this SPI serial port will affect the P3 port. The phenomenon is as follows: no matter what the actual input level of the P3 port is, the internal latch of the P3 port is determined to be a high level, so the judgment transfer instructions such as JB or JNB in ​​the program will lose their effect. This shows that enabling the SPI serial port will make the P3 port only be used as an output port. Therefore, when using the SPI serial port and the P3 port as input ports at the same time, in order to avoid errors, the SPI serial port must be disabled before each P3 port detects the input signal.

Keywords:A/D  ADμC812 Reference address:Analysis of Problems in Using A/D Converter ADμC812

Previous article:Temperature compensation circuit to offset +2%/°C temperature coefficient
Next article:Choosing the Best Buffer Amplifier for High-Speed ​​Analog-to-Digital Conversion

Recommended ReadingLatest update time:2024-11-16 21:37

Application of 16-bit A/D converter CS5521 in two-color infrared signal detection
    Abstract: In view of the characteristics of weak output signal and large variation range of infrared signal sensor, a design method of programmable infrared signal detection circuit based on 16-bit A/D converter CS5521 is introduced.     Dual-color infrared detection is a highly anti-interference heat source det
[Analog Electronics]
Application of 12-bit A/D converter ADS7864 in power grid harmonic analyzer
1 Introduction With the increase of electricity consumption, the harmonic pollution of the power grid has become increasingly serious, which requires the power monitoring equipment to monitor the harmonic components of the power grid in a timely and accurate manner. In the power grid harmonic analyzer developed
[Power Management]
Application of 12-bit A/D converter ADS7864 in power grid harmonic analyzer
Enabling higher performance from high-resolution A/D converters
How can the A/D converter achieve maximum performance? While the obvious answer is good design and board layout, there are other techniques we can use to gain performance gains. There are actually some simple techniques we can use to push A/D converter performance beyond specification requirements. In order to achieve
[Analog Electronics]
Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号