Design of serial interface between AD7543 and 89C2051
This paper introduces the method of realizing serial interface through the P1 port of 89C2051 with 12-bit serial input digital-to-analog converter AD7543.
Keywords: D/A converter, microcontroller, serial interface
1 Introduction
AD7543 is a 12-bit CMOS single-chip serial input digital-to-analog converter (DAC) produced by AD Company of the United States. It is a precision multiplication DAC designed for serial interface. Its digital data is input one bit at a time from high to low. The main characteristics and technical indicators of AD7543:
Resolution 12 bits
Non-linearity error ±1/2LSB
Input method Serial
Serial Load Positive or Negative Strobe
Initialization Asynchronous Clear Input
Working voltage: +5V
Maximum power consumption 400mW
The on-chip logic circuit of AD7543 consists of a 12-bit serial input parallel output shift register (register A) and a 12-bit DAC input register (register B). The data appearing on the SRI pin of AD7543 is loaded into register A at a fixed time when the rising edge of the select input signal STB1, STB2 or STB4 or the falling edge of STB3 (selected by the user). Once register A is full, the data of register A is loaded into register B under the control of the load pulse.
2 Interface mode
89C2051 is a high-performance single-chip microcomputer, which is highly compatible with the MCS51 series instructions. Since there is no dedicated serial data interface, the interface with AD7543 can only be realized through programmable I/O pins and corresponding software. As shown in Figure 1, P1.0 is the serial data output port, which is connected to SRI of AD5743; STB1, one of the four control input terminals of register A inside AD7543, is connected to P1.1 as a pulse for receiving data, STB2 and STB4 are grounded, and STB3 is connected to +5V; the clear input CLR of register B of AD7543 is connected to P1.3; the two control load input terminals LD1 and LD2 of register B are grounded and connected to P1.2 respectively. After the hardware circuit connection is completed, the remaining is software work.
The rich instruction system of the 51 series brings great convenience to the D/A conversion of serial input. Assuming that the 12-bit data is placed in the R2 and R3 registers of the single-chip microcomputer, the serial data transmission can be realized by operating the accumulator A, carry flag and P1 port of the single-chip microcomputer. The following is a list of D/A conversion subroutines:
STATR: CLR P1.3
CLR P1.3
SETB P1.2
CLR C
CLR A
MOVA, R2
MOV R7, #4
LOOP1: PLC A
DJNE R7, LOOP1
MOV R7, #4
LOOP2: LCALL PRD
DJNE R7, LOOP2
CLR C
CLR A
MOV A,R3
MOV R7, #8
LOOP3: LCALL PRD
DJNE R7, LOOP3
CPL P1.2 loads data and starts conversion
RET
Read data subroutine:
PRD: RLC A
MOV P1.0, C
SETB P1.1
CPL P1.1
RET
The program given above can be used as a subroutine to call the serial interface between the AD7543 converter and the 51 series microcontroller.
3 Conclusion
This interface method makes full use of the software and hardware resources of the microcontroller itself and simplifies the circuit design. However, because the data is read in one by one and is also related to the number of data bits of the converter, this interface method is only suitable for occasions where time requirements are not high.
1 Tu Shiliang et al. Microcontroller Software Design Technology. Science and Technology Fangxian Publishing House Chongqing Branch
2 AT89C Series MCU Technical Manual. Beijing Willim Electronic Technology Co., Ltd.
Previous article:Development and implementation of virtual oscilloscope based on USB interface
Next article:PS2 interface MINI-DIN connector interface definition diagram
Recommended ReadingLatest update time:2024-11-17 00:57
- 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
- Burning port, are these two resistors necessary? Data pull-up, clock pull-down
- Device and PA circuit-level verification of high-power GaN model library
- Today's live broadcast: TI's latest application of millimeter-wave radar in the automotive field
- Constant current source is used in hardware design
- Brief analysis of three detection methods for faulty cables
- How to write software I2C for HC32F460
- Sound detection system
- What is an API? What is an SPI?
- Problems with the function of zero-crossing detection circuit
- ST MEMS Device Resource Library-Other Application Documents