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Ω.
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.
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.
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
- Popular Resources
- Popular amplifiers
- A Complete Illustrated Guide to Operational Amplifier Applications (Written by Wang Zhenhong)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Please recommend a development board
- Dr. MC is available for viewing. Can be discussed openly
- How to quickly write the output logic expression of CMOS logic gate circuit
- Recommendations for components encountered in peak sampling circuit design
- Follow and comment to win gifts! Micron 2022 Taipei International Computer Show Keynote Speech Highlights: Data Center Special
- Prize-winning quiz | How much do you know about Fujitsu's Ferroelectric Random Access Memory FRAM?
- Want to make an embedded machine learning wearable system
- Web front-end/back-end matters, non-technical issues!
- A large bounce occurs on the DC power supply
- "Let's practice together in 2021" + Work hard to become the horns of the ox in the Year of the Ox