
Abstract :Introduction of a will PIC16C711 chip 8-bit A / D up to 11 methods. This method, the circuit is simple, fast, can improve application performance and low cost single chip , has a potential market value . Keywords :PIC16C711 microcontroller A / D resolution Currently, the embedded microcontroller A / D is generally 8-10 , can not meet the high-resolution signal processing applications demands ; and external high resolution A / D will significantly increase the cost , because A / D converter With its median price increase doubled . This paper presents a raise PIC16C711 microcontroller chip A / D resolution of the method, PIC16C711 -chip 8-bit A / D increased to 11 . PIC series, this method also applies to other microcontroller . American Microchip Introduces 8-bit microcontroller PIC16C711 microcontroller is a high cost performance . Its low price, small package , using CMOS technology, with OTP type , developing them very convenient. It includes a 4-way 8-bit high speed A / D, it expanded to 11 , you can greatly improve application performance and low cost single chip . First, the hardware circuit Achieve the extended schematic shown in Figure 1 . 8 equivalent of precision resistor R 0 ~ 5V reference voltage will be divided into eight files , each file range is 0.625V. 8 taps were then choose one analog switches CD4051 8 8 input channel selection control terminal C, B, A by the PIC16C711 microcontroller RB2, RB1, RB0 control . IC2 and IC3 for the high input impedance op amp , IC2 constitute a follower , IC3 constitute a precision differential amplifier . Click to enlarge Second , the working principle To achieve 11 A / D conversion from the PIC16C711 to do 2 8 A / D conversion is complete . PIC16C711 has four analog input channels RA0 ~ RA3, the analog input channels multiplexed into one sample retainer to the A / D converter. External reference voltage Vref can also come from internal VDD, A / D converters are successive approximation conversion results ( 8 ) into ADRES register . In the A / D converter before the inevitable choice of suitable access , provision of adequate sampling time . The user can set the A / D control register ADCON0 and ADCON1 to control its conversion process , while A / D conversion of the state will be reflected in the ADCON0 . First convert the voltage Vi to be sent to do a PIC16C711 to RA0 channel A / D conversion . According to figures from the amount converted by the software calculates Vi 8 file location where the file with Vi Vi minus the threshold voltage . Will enlarge the difference from 8-bit , making it a 0 ~ 5V voltage signal , and then sent to the RA1 PIC16C711 do 1 channel A / D conversion, digital income is 11 AD converter 8-bit low , but CBA is the stall High- 3 , in order to achieve 11 A / D conversion . Examples are as follows : Suppose the input voltage Vi is 3V, the RA0 -channel process control PIC16C711 first for the first 1 A / D conversion , the result is 153 , that is 3 / 5 × 255 = 153, corresponding to 8-bit digital to 10,011,001 . The low five shield, was 10000000 , cycle shifted to the right 5 times , was 00,000,100 , then the corresponding low- 3 is Vi = 3V voltage stall , that is, 4 files , CBA = 100, process the stalls by the RB2, RB1, RB0 output , as the 8- channel analog switches select a choice to CD4051 output of 2.5V, that is 5 / 8 × 4 = 2.5V. The voltage amplifier followed by the IC2 , and then carried out by the differential amplifier IC3 . Designed to adjust R11, R12, R13 and R14 of the resistance , so that the magnification of 8 bits , then get the output amplifier IC3 Vo = 8 (Vi-2.5) = 8 (3-2.5) = 4.0V. Select RA1 2nd channel A / D conversion , the result is 11001100 , which is 11 A / D conversion result of the low 8 bits . 100 stalls for the 11 A / D conversion of the high- 3 , together are the 11 A / D conversion results 10,011,001,100 . Third , the program The following is a complete instruction set using the PIC16C711 11 A / D conversion of the program segment . BSF STATUS, RP0; select page 1 MOVLW 00000010B; RA0, RA1 as analog channels MOVWF ADCON1; internal reference voltage BCF STATUS, RP0; select page 0 MOVLW 11000001B; select RA0 channel and the internal clock MOVWF ADCON0 MOVLW .125; delay 125s;Waiting for input CALL WAIT; stability BSF ADCON0, GO; start the A / D LOOP BTFSC ADCON0, GO; determine A / D has completed GOTO LOOP MOVF ADRES, W; obtain conversion results ANDLW 0E0; shield low 5 MOVWF D1; into D1 BCF STATUS,C RRF D1, 1; 5th shift right RRF D1,1 RRF D1,1 RRF D1,1 RRF D1,1 MOVF D1, W MOVWF PORTB; stalls out MOVLW 11001001B; election RA1 channel MOVWF ADCON0 MOVLW .60; delay 60s; CALL WAIT BSF ADCON0, GO; start A / D LOOP1 BTFSC ADCON0, GO; determine A / D has completed GOTO LOOP1 MOVF ADRES, W; A / D conversion results exist D0 Movwf D0 WAIT MOVWF TEMP; delay subroutine NEXT DECFSZ TEMP,1 GOTO NEXT RETURN Achieved in this way 11 A / D conversion speed PIC16C711 basically single-cycle instruction , 4MHz oscillation frequencies in 1 instruction cycles;, for a second A / D converter 20, the shortest times;; 2 A / D converter 40s;; two op conversion time 20µs×2=40µs. The total conversion time of 100s;Level . This article describes the method of circuit is simple , fast , convenient debugging has been developed for our single chip boiler temperature control system to achieve the desired results . For the other with 8-bit , 10-bit A / D MCU with a little change can be used more efficiently.