PIC_Lecture 13 : Embedded C program for ADC of PIC18FXX | Using ADC Module of PIC Microcontroller

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 10

  • @dbanerjee2467
    @dbanerjee2467 3 года назад +1

    Thank you so much. It helped me to clear all doubt regarding ADC in PIC18f Uc

  • @2bit661
    @2bit661 3 года назад +4

    void main(void)
    {
    unsigned int Ch_result;
    TRISA = 0xFF /* set all A ports as input */
    ADCON1 = 0x00; /* Vrefs +/- are set to VDD/VSS and configure all pins as analog */
    ADCON2 =0x92; /* right justified, 4Tad and Fosc/32. */
    ADRESH=0;
    ADRESL=0;
    while(1)
    {
    ADCON0=0b00000001; // Select Channel 0, Go=0, ADON =1
    ADCON0bits.GO=1; // providing Start of Conversion Signal =1
    while (ADCON0bits.GO ==1 ); // Wait for end of conversion
    Ch_result = ADRES; // store 10 bit result ADRESH-ADRESL
    // register in variable Ch_result
    }
    }

  • @NMPVevoOfficial
    @NMPVevoOfficial 2 года назад +1

    Thanks for the video!
    But how can we modify the code so that the program reads the inputs of 4 sensors and displays its digital
    one-to-one representation Thank you

  • @fermanshahflash3303
    @fermanshahflash3303 Год назад +1

    Thankyou very muchh :')))))))))))))))

  • @Achintya7185
    @Achintya7185 3 года назад

    Mam Make a video on interrupt pic microcontroller plz

  • @jboy4real
    @jboy4real 3 года назад

    How do we monitor the 13 channels ADC at once if we can connect the 13 channels at once

    • @lawalumardaura
      @lawalumardaura 3 года назад

      Use TDMA

    • @2bit661
      @2bit661 3 года назад

      I don't know about this chip, but on similar chips the ADC is multiplexed, meaning all the channels use the one ADC. But, Tight Man, maybe you know something I don't.

  • @shahrukhp3355
    @shahrukhp3355 4 года назад

    Thanks mam