Cannot get comparator to work in PIC16F887


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Cannot get comparator to work in PIC16F887

    Hi,
    If portA.5=1 then ...
    As far as I can see comparator 1's output is on PortA.4 - not PortA.5.
    And, if you're not actually driving anything with the comparator you don't need to have it "connected" to the physical output. In order to get its state you might as well read CM1CON0.6 (the C1OUT bit).

    /Henrik.

  2. #2
    Join Date
    Aug 2014
    Location
    Denmark
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: Cannot get comparator to work in PIC16F887

    Thanks for your answer - the PortA.5 was a typo error - I use PortA.4 in my sorce - I do not need to use the pin to read the result - only intern in pic but when that don't work I was trying to get it on a pin so it was visable on my develebment board.

    - can you tell me if my setup of the comparator look ok ?

    Best regards Erik

  3. #3
    Join Date
    Aug 2014
    Location
    Denmark
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: Cannot get comparator to work in PIC16F887

    Just want to tell you that I get it to work now - there was nothing wrong in my code but the PIC I used was damaged - when trying new pic all works fine - thanks again

    Regrads Erik

Similar Threads

  1. Replies: 2
    Last Post: - 31st May 2013, 19:19
  2. help with pic16f887
    By lerameur in forum mel PIC BASIC Pro
    Replies: 60
    Last Post: - 11th December 2010, 22:38
  3. PIC16F887 and DS1307
    By menta in forum General
    Replies: 21
    Last Post: - 29th September 2008, 18:05
  4. PIC16F887, turn off..
    By xobx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 18th October 2007, 06:55

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts