INTEGRATED CIRCUITS EIE/AN93017 Using the analog-to-digital converter of the 8XC552 microcontroller Theo van Daele, Philips Semiconductors Product Concept & Application Laboratory Eindhoven, the Netherlands 1994 Jun 28 Philips Semiconductors Philips Semiconductors Application note Using the analog-to-digital converter of the 8XC552 microcontroller EIE/AN93017 Author: Theo van Daele, Philips Semiconductors Product Concept & Application Laboratory Eindhoven, the Netherlands SUMMARY On the 80C552 microcontroller, an 8-input 10-bit ADC is available. To get correct results from the ADC, the slew-rate of the input signal during sampling must be limited. 10 Bit accuracy will be obtained if the layout of the 80C552 application is done correctly. EMC measures must be taken into account. Some software examples are given on how to use the ADC. 2.0 INTERNAL OPERATION OF THE ADC 2.1 General Description Figure 1 shows a general block diagram of the ADC. The inputs of P5 are connected to a multiplexer and an input buffer with Schmitt-trigger inputs. When the digital value on P5 must be read (e.g., with a MOV A,P5 instruction), the output of the Schmitt-trigger is taken. This output can be used for further processing. An analog input signal on P5 that must be converted is selected by the input multiplexer. The bits ADCON.0 . . ADCON.2 of the ADCON special function register select the input signal. The output of the multiplexer is connected to the input of a comparator. The sampling capacitor is included in the comparator. The ADC control block of the ADC controls the timing of the sampling and conversion. After the input signal is sampled, the actual analog-to-digital conversion starts. The comparator compares the input signal VIN with the output of the 10-bit DAC VDAC. The output voltage of the DAC is determined by the output of the successive approximation register (SAR). The range of the DAC signal varies between AVREF and AVREF_. These two signal levels also define the voltage range of the input signal. 1.0 INTRODUCTION The 80C552 microcontroller has an on-chip ADC. The converter consists of an 8 input analog multiplexer, and a 10-bit binary successive approximation ADC. A conversion takes 50 machine cycles (is 20s at 30MHz oscillator frequency). The ADC has dedicated analog supply and reference voltages to minimize influence form digital circuitry. The DAC of the successive approximation ADC is a resistor ladder network. This ensures that there no missing codes. To obtain the 10-bit accuracy, it is important to pay attention to the design of the application. First the operation of the ADC will be described. Then design and layout subjects are described that can influence the accuracy of the conversion result. References: 1. 80C51-based 8-bit microcontrollers (Data Handbook IC20 1994) 2. Electro Magnetic Compatibility and Printed Circuit Board (PCB) Constraints (ESG89001) SELECT RESET/SAMPLE ADC CONTROL P5 MUX 1 OF 8 VIN START/STOP COMPARATOR 8 AVref+ VDAC D Continua »