PIC18F reference pin

Discussion in 'General Electronics Chat' started by Dritech, May 10, 2014.

  1. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    Hi all,

    I am going to use a single comparator from the PIC18f. One of the inputs is also used for the ADC external reference. Does that mean I cannot set the reference of the ADC?
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    Which PIC? What is driving the comparator inputs?
     
  3. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    PIC18F4550. At the input of the comparator I will be connecting a potentiometer.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    You could use mode 011 (see figure 22-1) and ignore what C1 does, put your pot on C2. You loose the RA0 pin in digital mode, but it still works fine as an analog pin. You'll need to as analog to use the D2A anyway.
     
Loading...