1 / 10

Self study assignment AD-converter

Self study assignment AD-converter. Explain in detail how to use the 10 bits AD-converter (PIC16F688 chapter 8) (or PIC16F684 chapter 9). What you need to study?. At least: The general architecture of the PCI controller.

daria
Télécharger la présentation

Self study assignment AD-converter

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Self study assignmentAD-converter Explain in detail how to use the 10 bits AD-converter (PIC16F688 chapter 8) (or PIC16F684 chapter 9)

  2. What you need to study? At least: • The general architecture of the PCI controller. • Document about AD-converter, see study material.(different methods for AD-conversion) • Data sheet PIC16F688=> Section study 8.0, completeYou are using the C-language, so it is not necessary to understand the macro instruction in detail. • Don’t forget to search on the internet for additional information.

  3. Include in your self tuition at least the next topics • Figure 8-1, 8-2 • Figure 8-4 global • Register • Table 8-2 Summery of associated ADC registers • 8-1 ADCON0, • 8-2 ADCON1 • ADC result register (ADFM see ADCON0) • ADFM=0: 8-3 ADRESH, 8-4 ADRESL • ADFM=0: 8-6 ADRESH, 8-5 ADRESL • PICkit1 board description, • pot meter: which input?

  4. Questions • What is the role of the Chold “=Holding Capacitor”and SS “=Sampling Switch”see page 67,and 74 • What does VCFG bit select? • How to use the Go/Done bit? • Explain figure 8-2 • See also 8.2.5 and Example 8-1 (in C language, see next sheet) • In our program we need to use the 8 most significant bits of the result.How we can do that? • We are using the 4 MHz internal clock.Which setting for the ADCS<2:0> we will need?

  5. Example 8-1but now in the C language //code snip see data sheet page 70 Uns8 ResultHi, ResultLo ; ADCON1= 0b.0111.0000; //ADC Frc clock TRISA.0=1; //set RA0 to input ANSEL.0=1; //set RA0 to analogue ADCON0=0b.1000.0001; //set right justify, Vdd=Vref, An0, On SampleTime(); //Acquistion delay ADCON.1=1; //Start conversion While(ADCON.1!=0) /*wait until conversion is ready*/ ; ResultHi= ADRESH; ResultLo= ADRESL;

  6. From Reference Manuals for the mid-range MCU Family(document 33023a)

More Related