Microchip Technology Incorporated · NASDAQ:MCHP

Microchip Technology — Technical Presentation (March 2001)

23 slides from Microchip Technology's technical presentation, Mar 1, 2001

  1. Slide 1: Analog-to-Digital Converters

    Analog-to-Digital Converters Getting Started - Analog-to-Digital Converters © 3.1.2001 In this presentation we will look at the Analog-to-Digital Converter Peripherals with Microchip’s midrange PICmicro® Microcontrollers series. 1

  2. Slide 2: Analog-to-Digital Converters: Topics Covered

    Analog-to-Digital Converters Analog-to-Digital l Topics Covered: l Terminology l Configuration l Usage l Differences between 8- and 10- or 12-bit A/D l Additional Resources Getting Started - Analog-to-Digital Converters © 3.1.2001 Basic analog-to-digital converter terminology will be covered first,

  3. Slide 3: Analog-to-Digital Converter

    Analog-to-Digital Converter Analog-to-Digital l Converts an analog voltage level to a digital number l Digital Numbers can be effectively handled by microcontrollers, analog levels cannot l Digital numbers are non-fractional A/D 2.343 volts 87 Converter Getting Started - Analog-to-Digital Converters

  4. Slide 4: Input Range

    Input Range l The analog input voltage must be within the valid input range of the A/D for an accurate conversion l Input range set by reference voltages l Power and Ground l External References l Internal References Getting Started - Analog-to-Digital Converters © 3.1.2001 The analog-to-digital con

  5. Slide 5: Quantization

    Quantization l Refers to subdividing a space into small but measurable increments. l The maximum quantization error is 1/2 the increment size Quantization Result Limits 2.5V Input Voltage 88 2.4V 2.343V 87 2.3V 86 2.2V Getting Started - Analog-to-Digital Converters © 3.1.2001 The output of an analog

  6. Slide 6: Resolution

    Resolution l Resolution defines the number of possible output states l 2n states l n is the number of bits of the converter l 8-bit converter has 28=256 states l 10-bit converter has 210=1024 states l 12-bit converter has 212 = 4096 states l Higher resolution = less quantization error Getting Starte

  7. Slide 7: Simplified A/D Module Diagram

    Simplified A/D Module Diagram Input Pins Analog Mux SAR A/D Holding Cap Getting Started - Analog-to-Digital Converters © 3.1.2001 This is a simplified diagram of the analog-to-digital converter module. The analog input pins are connected to the inputs of an analog multiplexer which connects the sele

  8. Slide 8: Acquisition Time

    Acquisition Time l Acquisition time is the time required to charge and discharge the holding capacitor on the front end of an ADC l If sufficient time is not allowed for acquisition the conversion result will be inaccurate l Required acquisition time affected by: l Internal Analog Multiplexer Impeda

  9. Slide 9: Successive Approximation

    Successive Approximation l The A/D converters in most PICmicro MCUs are of the Successive Approximation type l Converts one bit at a time l Converts MSB first, LSB last l One A/D clock time required for each bit zero Input full scale 0 1/2 9/16 5/8 3/4 1 Getting Started - Analog-to-Digital Converter

  10. Slide 10: Conversion Time

    Conversion Time l Each bit requires one A/D clock period (TAD) for conversion l two to three additional A/D clocks required for settling time l After conversion the final value is written to the result register Getting Started - Analog-to-Digital Converters © 3.1.2001 The time required for the succe

  11. Slide 11: A/D Clock

    A/D Clock l Multiple Sources l 2TOSC (FOSC/2) l 8TOSC (FOSC/8) l 32TOSC (FOSC/32) l RC (dedicated internal) 4 or 6uS typical l Must meet minimum time Getting Started - Analog-to-Digital Converters © 3.1.2001 There are multiple sources for the analog-to-digital converter clock. These are the main osc

  12. Slide 12: A/D Conversion Steps

    A/D Conversion Steps l Configure I/O Pins l Select the Channel to Convert l Configure and Enable the A/D l Wait the Acquisition Time l Initiate the Conversion l Wait for the Conversion to Complete l Read the Result Getting Started - Analog-to-Digital Converters © 3.1.2001 The following steps are req

  13. Slide 13: Configuring I/O Pins

    Configuring I/O Pins l Configure pins used for A/D as inputs l Set bit in TRIS register that corresponds to desired A/D pin banksel TRISA ;assembler directive to select bank movlw b’11111111’ movwf TRISA ;set all PORTA pins as inputs Getting Started - Analog-to-Digital Converters © 3.1.2001 All pins

  14. Slide 14: Configuring I/O Pins (continued)

    Configuring I/O Pins (continued) l Select the desired options in the ADCON1 register l Configure pins used for A/D as analog pins l Select the A/D voltage reference banksel ADCON1 ;assembler directive to select bank movlw b’00000010’ movwf ADCON1 ;RA0,1,2,3,5 analog, VREF = VDD Getting Started - Ana

  15. Slide 15: Configure and Enable the A/D

    Configure and Enable the A/D l Select the desired options in the ADCON0 register l Select the channel to convert l Select the A/D clock source l Enable the A/D converter banksel ADCON0 ;assembler directive to select bank movlw b’01000001’ movwf ADCON0 ; channel 0, FOSC/8, enable A/D Getting Started

  16. Slide 16: Wait Acquisition Time

    Wait Acquisition Time l An appropriate acquisition time must be allowed for after selecting an input channel l A delay loop can be used ;20us delay loop with 4MHz oscillator frequency banksel count ;select bank movlw 0x06 movwf count ;initialize count loop decfsz count,F ;dec count, store in count g

  17. Slide 17: Initiate A/D Conversion

    Initiate A/D Conversion l The A/D conversion is initiated by setting the GO/DONE bit in the ADCON0 register. banksel ADCON0 ;select bank bsf ADCON0,GO ;initiate conversion Getting Started - Analog-to-Digital Converters © 3.1.2001 After the acquisition time has passed, the conversion can be started.

  18. Slide 18: Wait for A/D Conversion Completion

    Wait for A/D Conversion Completion l When the A/D conversion is complete the GO/DONE bit will be automatically cleared l Test GO/DONE bit in a loop until clear banksel ADCON0 ;select bank test btfsc ADCON0,GO ;conversion done? goto test ;not finished Getting Started - Analog-to-Digital Converters ©

  19. Slide 19: Read the Result

    Read the Result l Once the conversion has completed the result can be read banksel ADRES ;select bank movf ADRES,W ;move result into working register Getting Started - Analog-to-Digital Converters © 3.1.2001 Once the analog-to-digital conversion has completed, the result can be read. The result of t

  20. Slide 20: Differences between 8-bit and 10- or 12-bit A/D

    Differences between 8 -bit and 8-bit 10 10-- or 12 -bit A/D 12-bit l 10- or 12-bit A/Ds have two result registers, ADRESH and ADRESL l Format bit, ADCON1, ADFM selects right or left justification 12-bit Example ADRESH ADRESL LEFT B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 0 0 0 0 RIGHT 0 0 0 0 B11 B10 B9

  21. Slide 21: Additional Resources

    Additional Resources l Device Data Sheet l PICmicro Mid-Range Reference Manual l Application Notes l Using the A/D l AN546 l Amplifier Circuitry l AN682, AN722, AN723 l Temperature Sensors l AN679, AN684, AN685 Getting Started - Analog-to-Digital Converters © 3.1.2001 We have a number of additional

  22. Slide 22: Conclusion

    Conclusion l In addition to ADCs integrated on the PICmicro MCUs, Microchip also offers stand-alone 12-bit analog-to-digital converters Getting Started - Analog-to-Digital Converters © 3.1.2001 This concludes a brief examination of the analog-to-digital converter peripheral found on Microchip’s PICm

  23. Slide 23: Trademark notices

    The Microchip name, logo, PIC, PICmicro, PICMASTER, PICSTART, PRO MATE, KEELOQ, SEEVAL, MPLAB and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. Total Endurance, ICSP, In-Circuit-Serial Programming, FilterLab,

Microchip Technology — Technical Presentation (March 2001) on 6ix