Interface circuit between serial 12-bit ADC and computer

Publisher:光速思考Latest update time:2011-03-01 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, IC manufacturers have devised various methods of implementing interfaces, with particular emphasis on reducing the number of I/O pins on IC interfaces. One such device is the MAX187, a 12-bit analog-to-digital converter (ADC). You can use serial data communication techniques to create an interface with this ADC. The analog-to-digital conversion and data transfer of the MAX187 require only three digital I/O lines. You can use the Centronics printer port of a PC to create a simple interface between the MAX187 and a PC (Figure 1). You can enable or disable the MAX187 (pin 3) by setting the pin high or low, respectively. If you leave this pin open, the internal reference voltage (4.096V) is disabled, and you must apply an external reference voltage to the REF pin (pin 4). In other cases, this pin is connected to a 4.7μF bypass capacitor C1. Digital data from the MAX187 is transferred to the processing unit 1 bit at a time using an external clock pulse on the SCLK pin (pin 8).
A complete data transfer requires 13 external clock pulses. The falling edge of the first clock pulse latches the first data bit (MSB) at the DOUT pin (pin 6). The output data bit changes at the falling edge of the next external clock pulse, and the serial data bits can be read until the falling edge of the next clock cycle. The analog/digital conversion starts when the ADC pin (pin 7) becomes low. This pin must be

The OUT pin must remain low until the entire A/D conversion cycle is completed, and then the serial data is transmitted. The change of the DOUT pin from low to high indicates the EOC (end of conversion) state. Then, the serial 12-bit data can be transmitted. The operation of the MAX187 is controlled by software. The software should be able to generate all the control signals required to successfully complete the conversion and should be able to detect the EOC state. It should also be able to generate 13 external clock pulses to read the serial 12-bit data and convert it into parallel data.
The software that controls the operation of the MAX187 is Turbo C++ version 3.0 (downloadable from the Web version of the "Design Examples" on the www.edn.com website). In the code, Port defines the Centronics port of the PC that interfaces with the MAX187. Write Port defines the port used to initialize the A/D conversion and generate external clock pulses. Read Port defines the port used to read EOC and serial data from the ADC. After pulling the CS pin and SCLK pin to a low level, the EOC loop checks the EOC state. If a valid EOC does not occur, the loop will continue to operate. Once a valid EOC occurs, the first of 13 clock cycles occurs and latches the first data bit (MSB). After this, the routine calls a subroutine (get_adc()). The subroutine generates the remaining external clock cycles to read the 12-bit serial data. The subroutine also converts the received serial data into parallel data (adc_val). This conversion is done by shifting adc_val left by one bit, thereby multiplying the previous data by 2, and if the value of the serial data bit is 1, 1 is added to the parallel data. Once the parallel data is ready, the subroutine returns this value and displays it on the screen.
It is easy to interface a 12-bit serial ADC to a PC

Figure 1 It is easy to implement an interface between a 12-bit serial ADC and a PC.

Reference address:Interface circuit between serial 12-bit ADC and computer

Previous article:Schematic diagram of D/A converter and microcontroller interface (double buffer working mode)
Next article:A Design of CMOS Data Interface Circuit Based on PWM

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号