Abstract: MAX1247 is a new 12-bit A/D converter produced by MAXIM Company in the United States. The article introduces its functions, working modes and conversion parameters, and gives the software interface program between MAX1247 and MCS-51.
MAX1247 is a 12-bit A/D converter. It features a four-channel multiplexer and a high-bandwidth sample/hold. The SPI bus structure can be used to connect to the microcontroller. Its power supply voltage is between +2.7 and +5.25V. It can realize 4-way or 2-way data conversion, and can realize multiple conversion modes through software.
1 Pinout
The pin arrangement of MAX1247 is shown in Figure 1, and the function description of each pin is as follows:
Pin 1 (VDD): power supply terminal
Pins 2~5 (CH0~CH3): four sampling analog signal input terminals;
Pin 6 (COM): Ground reference voltage for analog signal input. In single-channel mode, this pin must be connected to ground and must be stable at -0.5LSB~+0.5LSB.
Pin 7 (SHDN): Turn off the input control terminal. When it is low, it will power down the device; when it is high, it will put the reference buffer amplifier in internal compensation mode; when it is floating, it will put the reference buffer amplifier in external compensation mode. ;
Pin 8 (VREF): ADC reference input, which is the reference voltage for analog-to-digital conversion. This pin can be used to control the voltage range of the mode input. The maximum voltage of this pin is 5.05V;
Pin 9 (REFADJ): Input of the reference buffer amplifier. To disable the reference buffer amplifier, it needs to be pulled to VDD;
Pin 10 (AGND): Analog ground;
Pin 11 (DGND): digital ground;
Pin 12 (DOUT): Serial data output, data is output on the falling edge of SCLK. When CS is high, this terminal is in a high impedance state;
Pin 13 (SSTRB): Conversion end pin. When in internal clock mode and the chip starts to convert, this pin goes low, but if the conversion ends, this pin goes high; in external clock mode, before the MSB starts to form, this pin pin remains high for one clock pulse.
Pin 14 (DIN): Serial data input, data is latched on the rising edge of SCLK;
Pin 15 (CS): Chip select signal;
Pin 16 (SCLK): Serial clock input, used for input and output of serial data.
2 working mode
MAX1247 has four working modes, the details are as follows:
●UNIpolar/Bipolar: In UNIpolar mode, the analog input signal amount can be between 0V~VREF, while in Bipolar mode, the analog input signal amount can be between -VREF/2~VREF/2;
●Full power-down/fast power-down: power-down mode;
●Internal clock mode/External clock mode (internal clock/external clock): In external clock mode, the external clock not only controls the movement of data in and out, but also drives analog-to-digital conversion, and requires that the analog-to-digital conversion must be within a certain time. End within 10 seconds, otherwise the conversion result will be reduced. If the frequency of the external clock is lower than 100kHz, it is best to use the internal clock mode; in the internal clock mode, the chip will automatically generate the conversion clock, which makes the microcontroller no longer need to actively generate the conversion clock. The conversion result can be read in (the read-in and read-out clock can be in the range of 0~2MHz);
●Single-ended/Differential: In Single-ended mode, the input signal voltage and the COM port form a relative voltage. In Differential mode, CH0/CH1 will also form a differential input, and CH2/CH3 will form a differential input. Therefore, in Single-ended mode, a maximum of four analog inputs can be formed, while in Differential mode, a maximum of four analog inputs can be formed. Two analog inputs, channel selection in single channel mode and differential input mode are shown in Table 1.
Table 1 Channel selection
single channel mode | SEL2 | SEL1 | SEL0 | CH0 | CH1 | CH2 | CH3 | COM |
0 | 0 | 1 | + | - | ||||
1 | 0 | 1 | + | - | ||||
0 | 1 | 0 | + | - | ||||
1 | 1 | 0 | + | - | ||||
Differential input mode | SEL2 | SEL1 | SEL0 | CH0 | CH1 | CH2 | CH3 | |
0 | 0 | 1 | + | - | ||||
0 | 1 | 0 | + | - | ||||
1 | 0 | 1 | - | + | ||||
1 | 1 | 0 | - | + |
3 The beginning and end of analog-to-digital conversion
When CS is low, by sending a control byte from the CLK terminal to the DIN pin, the first arriving logic "1" bit can be defined as the start of the control word (MSB). The format of the control word is as follows
: The explanations of the characters are listed in Table 2. When the chip receives the control word, the device starts analog-to-digital conversion. After a period of delay, it receives the data on ROUT, which is the converted digital quantity. Pulling CS high will end this conversion process.
Table 2 Explanation of each control word
Bit | Name |
explain |
7 | START | When CS is strobe, this bit is 1 to indicate the start of a control word |
6 | SEL2 | These 3 bits select which of the four channels is used in this conversion (see Table 3) |
5 | SEL1 | |
4 | SEL0 | |
3 | UNI/BIP | i=Single-end 0=differential |
2 | SGL/DIF | I=Single-end 0=differential |
1 0 (LSB) |
PD1 PD0 |
PD1 PD0 Mode 0 0 Full power-down mode 0 1 Fast power-down mode 1 0 Internal clock mode 1 1 External clock mode |
4 Relationship between analog quantities and digital quantities
4.1 Relationship
For Bipolar mode, the voltage range of the input analog quantity is -VREF+Vcom~+VREF+Vcom. Divide the voltage range into 4096 equal parts, then 1LSB=VREF/4096, and the corresponding digital voltage range is 8FF~7FF, for example: 000 represents Vcom, 7FF represents +VREF+Vcom.
For UNIpolar mode, the input analog voltage range is Vcom~VREF+Vcom. Divide the voltage range into 4096 equal parts, then 1LSB=VREF/4096, and the corresponding digital voltage range is 000~FFF, for example: 000 represents Vcom , FFF stands for +VREF+Vcom.
4.2 Digital output
MAX1247 outputs a total of two bytes, each byte is high-order first, and its structure is as follows:
5 Interface program
The following takes sending command words to the main MAX1247 and receiving sample data from the MAX1247 as an example to give an example of a simple interface program.
send1247data: ;Send command word subroutine (A is the command to be sent)
mov rotcount,#08h
clr do
clr cs ; turn CS low
rot-next:
nop
nop
clr clk ; turn CLK low
rlc a ;move out the first position
movdin,c
setb clk ;send the first bit
djnz rotcount,rot-next
nop
clr clk ; start conversion
setb cs; pull chip select high
ret
recdata:; data receiving subroutine
clrdin
clr cs; pull chip select low
nop
nop
setb clk
mov rotcount,#08h
recl-next:
clr clk; send falling edge
nop
nop
mov c,do; move data in
rlc a
setb clk
nop
dinz rotcount,recl-next
push a; save the received high-bit data
mov rotcount,#08h; prepare for reception
rec2-next:
clr clk ; send falling edge
nop
nop
mov c,do
rlc a
setb clk
nop
djnz rotcount,rec2-next
setb cs
mov b,a
pop a
ret
Previous article:Principle and application of A/D converter ADS8320
Next article:A 12-bit dual-channel high-speed data acquisition and processing system
Recommended ReadingLatest update time:2024-11-16 22:53
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Digilent Vivado library
- Teach you to learn 51 single chip microcomputer-C language version (Second Edition) (Song Xuefeng)
- Raspberry Pi Development in Action (2nd Edition) ([UK] Simon Monk)
- 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
- Show off the boards (Launchpad and Arduino)
- Application of independent watchdog IWDG in STM32F4 series MCU
- [RVB2601 Creative Application Development] Practice 6-Multi-level menu display test
- Disassembly preview, guess what is going to be disassembled?
- It's time to meet again, 2019 TI Embedded Products Seminar
- Please help me with external interrupt and digital tube display (just look at the problem of interrupt trigger)
- The Youth Robotics Technical Level Test is a competition between electricians and their children, right? The Level 5 Test uses ESP32
- Power amplifier experiment case (II) - Application of ultrasonic transducer in submarine sonar system
- [Flower carving hands-on] Interesting and fun music visualization series of small projects (06) --- dot matrix spectrum lamp
- [ESP32-S2-Kaluga-1 Review] 1. Delayed unboxing review